Regression: x-igd-opregion=off ignored in VFIO IGD quirk handling
- Operating system: Arch
- kernel version: Linux 6.14.6-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 09 May 2025 17:36:18 +0000 x86_64 GNU/Linux
- kernel module: https://github.com/strongtz/i915-sriov-dkms
- Architecture: x86_64
- QEMU flavor: qemu-system-x86_64
- QEMU version: QEMU emulator version 10.0.50 (v10.0.0-995-g757a34115e)
- QEMU command line:
./qemu-system-x86_64 -M q35 -m 4096 -enable-kvm -hda fedora32.qcow2 \ -device vfio-pci,host=0000:00:02.1,romfile="/path/to/intelgopdriver_desktop.bin",x-vga=on,x-igd-opregion=off
Emulated/Virtualized environment
- Operating system: any
- OS/kernel version: any
- Architecture: x86_64
Description of problem
A regression in QEMU’s VFIO IGD initialization causes the x-igd-opregion=off
parameter to be ignored, resulting in an error when passing through an Intel iGPU SR-IOV Virtual Function (VF) at PCI address 00:02.1
: qemu-system-x86_64: -device vfio-pci,host=0000:00:02.1,...: Device does not supports IGD OpRegion feature: No such device
Automatic detection of IGD-OpRegion assumes any Intel iGPU (including GVT-g) will have it but SR-IOV VFs do not.
Steps to reproduce
- Configure an Intel iGPU with SR-IOV enabled, creating a VF at
00:02.1
. - Bind the VF to the
vfio-pci
driver:
echo 0000:00:02.1 > /sys/bus/pci/drivers/i915/unbind
either:
echo "8086 4680" > /sys/bus/pci/drivers/vfio-pci/new_id
or:
echo 0000:00:02.1 > /sys/bus/pci/drivers/vfio-pci/bind
- Run QEMU with the command line above, including
-device vfio-pci,host=0000:00:02.1,...,x-igd-opregion=off
.
Additional information
-
Hardware details:
00:02.1 VGA compatible controller [0300]: Intel Corporation AlderLake-S GT1 [8086:4680] (rev 0c)
- Host motherboard: MSI PRO Z690-A DDR4
- CPU: Intel Core i5 12600K
-
Regression cause: The issue was introduced by commit 7be29f2f, which changed
vfio_pci_igd_config_quirk
to detect OpRegion automatically, ignoringvdev->igd_opregion=false
. -
Proposed fix: I have a patch that adds checks for
vdev->igd_opregion
invfio_pci_igd_config_quirk
andvfio_pci_kvmgt_config_quirk
, skipping OpRegion handling whenx-igd-opregion=off
. The patch has been tested, confirming the VM starts without errors. I will submit it to qemu-devel@nongnu.org with a reference to this issue.