IGD(GPU) Passthrough and iommu on the latest Proxmox VE(2020)

Please note: since 4.18.16 vfio-pci is compiled-in, no longer a module.
Make sure your CPU supports vt-d.

It works on my Proxmox 6.2, kernel version 5.4.34-1-pve. If you have an alternative PVE version. The IGD Passthrough method in this article may not work proper.

Enable the IOMMU:

#for intel
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on"
#GPU passthrough 
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on video=efifb:off,vesafb:off vfio-pci.ids=[device id]"
#then
update-grub

IGD(GPU) Passthrough:
Look up IGD device id:

#run
lspci -nn | grep "VGA":

result like this , the xxxx:xxxx is your device id.

#
#
00:02.0 VGA compatible controller [0300]: Intel Corporation UHD Graphics 600 [8086:3185] (rev 03)
#
#

Edit blacklist:

echo "blacklist snd_hda_intel" >> /etc/modprobe.d/pve-blacklist.conf
echo "blacklist snd_hda_codec_hdmi" >> /etc/modprobe.d/pve-blacklist.conf
echo "blacklist i915" >> /etc/modprobe.d/pve-blacklist.conf
echo"options kvm ignore_msrs=1">>/etc/modprobe.d/kvm.conf
#then
update-initramfs -u
reboot

For more information, see https://pve.proxmox.com/wiki/Pci_passthrough