nano /etc/default/grub # modify
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on"
nano /etc/modules # append
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd
echo "blacklist radeon" >> /etc/modprobe.d/blacklist.conf
echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf
echo "blacklist nvidia" >> /etc/modprobe.d/blacklist.conf
echo "options vfio_iommu_type1 allow_unsafe_interrupts=1" > /etc/modprobe.d/iommu_unsafe_interrupts.conf
echo "options kvm ignore_msrs=1" > /etc/modprobe.d/kvm.conf
lspci -v | grep VGA
0a:00.0 VGA compatible controller: Matrox Electronics Systems Ltd. G200eR2 (prog-if 00 [VGA controller])
42:00.0 VGA compatible controller: NVIDIA Corporation GP102 [GeForce GTX 1080 Ti] (rev a1) (prog-if 00 [VGA controller])
lspci -n -s 42:00
echo "options vfio-pci ids=10de:1b06,10de:10ef" > /etc/modprobe.d/vfio.conf
update-grub
update-initramfs
reboot
bios: ovmf
boot: order=scsi0
cores: 2
cpu: host
cpuunits: 2048
efidisk0: local-lvm:vm-105-disk-1,size=4M
hostpci0: 42:00,pcie=1,x-vga=1
ide2: none,media=cdrom
machine: q35
memory: 4096
name: Miner
net0: virtio=6E:26:42:2E:63:56,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
scsi0: local-lvm:vm-105-disk-0,size=1964M
scsihw: virtio-scsi-pci
smbios1: uuid=6c867c83-f66b-435d-81a6-863e4eb65979
sockets: 1
vmgenid: 01d0e964-274c-4c52-afe1-369c944779dc