PCI Express VM Passthrough
Is about PCIe passthrough In VM like Proxmox or TrueNAS
Notes¶
- Disable ASPM to start with
- Connect a display or an dummy plug to the video card
Useful commands¶
dmesg -wtoo show hardware initialization errorslspcito list PCIe devices-kto show driver in uselspci -nnv | grep VGAto show list of display adapter
Display IOMMU groups¶
#!/bin/bash
shopt -s nullglob
for g in $(find /sys/kernel/iommu_groups/* -maxdepth 0 -type d | sort -V); do
echo "IOMMU Group ${g##*/}:"
for d in $g/devices/*; do
echo -e "\t$(lspci -nns ${d##*/})"
done;
done;
Dump vBIOS¶
lspci -nnv #to get the PCI address
cd /sys/bus/pci/devices/0000:01:00.0/
echo 1 > rom
cat rom > /tmp/image.rom
echo 0 > rom
Notes: - If you have an "input/output error", check if UEFI CSM is enabled (Legacy mode)
Blacklist modules¶
- with GRUB, add the required options
Links¶
- GPU pass through tutorial with a complete guide on how to setup the hypervisor and hide the VM environnement
- Proxmox guide with how to dump VGA Rom
- For Intel GPU