vi /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet amd_iommu=on"
or
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on"
then restart grub
update-grub
command
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/backlist.conf
echo "blacklist radeon" >> /etc/modprobe.d/blacklist.conf
echo "blacklist nvidia" >> /etc/modprobe.d/blacklist.conf
echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf
lsbpci -v
list your hardware and get the VGA id
lspvi -n -s <id>
example
lspci -n -s 04:00.0
echo "options vfio-pci ids=<id>,<idN> disable_vga=1" > /etc/modprobe.d/vfio.conf
refreshs this configs
update-initramfs -u
reset
Windows and virtio-win
vi /etc/pve/qemu-server/<vm-id>.conf
# add two lines
cpu: host,hidden=1,flags=+pcid
args: -cpu 'host,+kvm_pv_unhalt,+kvm_pv_eoi,hv_vendor_id=NV43FIX, kvm=off'