Prerequisites
GPU passthrough requires IOMMU support in both the CPU and motherboard firmware, plus a few system-level configuration steps.
Add the appropriate kernel parameter for your CPU:
Intel:
intel_iommu=on iommu=pt
AMD:
amd_iommu=on iommu=pt
Edit /etc/default/grub:
GRUB_CMDLINE_LINUX_DEFAULT="... amd_iommu=on iommu=pt"
Apply and reboot:
sudo update-grub # Debian/Ubuntu
sudo grub-mkconfig -o /boot/grub/grub.cfg # Arch
Verify IOMMU is active after reboot:
dmesg | grep -i iommu | head -5
Create /etc/modules-load.d/vfio.conf:
vfio
vfio_iommu_type1
vfio_pci
sudo usermod -aG vfio $USER
Log out and back in. Verify:
groups | grep vfio
VFIO DMA-maps the entire guest RAM. The default memlock limit causes QEMU to fail:
vfio_container_dma_map(...) = -12 (Cannot allocate memory)
Fix:
sudo tee /etc/security/limits.d/vee-vfio.conf <<'EOF'
* - memlock unlimited
EOF
Log out and back in. Verify:
ulimit -l # should print "unlimited"
# List GPUs and their IOMMU groups
vee gpu list
# Bind to vfio-pci (run as root)
sudo vee gpu bind 08:00.0
# Verify — all devices in the IOMMU group should show vfio-pci
vee gpu status 08:00.0 --memory 16G
All devices in the IOMMU group (GPU + audio function) must be bound to vfio-pci together.