Some related files for KVM PCI passthrough that I actively use.
Print PCI devices grouped by IOMMU groups.
Rebinds the GPU to the host nvidia driver. Used to restore GPU access to the host after the VM shuts down.
Isolate the GPU from the host by binding it to the vfio-pci driver. This will not work without Loading vfio-pci early configured.
A simple description of my setup process.
A hook script handling machine prepare, started, and release stages. It will hide specified partition and launch Scream when machine boots. This file must be placed in /etc/libvirt/hooks/ and made executable.
Libvirt XML with PCI passthrough enabled.