diff options
author | Tomita Moeko <tomitamoeko@gmail.com> | 2025-05-06 01:03:02 +0800 |
---|---|---|
committer | Cédric Le Goater <clg@redhat.com> | 2025-05-09 12:42:27 +0200 |
commit | 16cbb43302a228f804c067992f6f61787934f3e9 (patch) | |
tree | b9aa1eb4d20fa923e6dcbd0c9209da34a14d1ce6 | |
parent | 106cdbcef4ef1c99c2c66b68f8c3349363fac97b (diff) | |
download | qemu-16cbb43302a228f804c067992f6f61787934f3e9.zip qemu-16cbb43302a228f804c067992f6f61787934f3e9.tar.gz qemu-16cbb43302a228f804c067992f6f61787934f3e9.tar.bz2 |
vfio/igd: Enable OpRegion by default
As the presence of OpRegion is used to detect IGD device now, and
guest driver usually depends on OpRegion to work. Enable OpRegion
on IGD devices by default for out-of-the-box passthrough experience
(except pre-boot display output), especially for libvirt users.
Example of IGD passthrough with libvirt:
<hostdev mode="subsystem" type="pci" managed="yes">
<source>
<address domain="0x0000" bus="0x00" slot="0x02" function="0x0"/>
</source>
<rom file="/path/to/igd/rom"/>
<address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x0"/>
</hostdev>
Signed-off-by: Tomita Moeko <tomitamoeko@gmail.com>
Reviewed-by: Corvin Köhne <c.koehne@beckhoff.com>
Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
Tested-by: Alex Williamson <alex.williamson@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250505170305.23622-7-tomitamoeko@gmail.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
-rw-r--r-- | docs/igd-assign.txt | 4 | ||||
-rw-r--r-- | hw/vfio/pci.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/docs/igd-assign.txt b/docs/igd-assign.txt index 95beb76..fc44450 100644 --- a/docs/igd-assign.txt +++ b/docs/igd-assign.txt @@ -102,7 +102,7 @@ digital formats work well. Options ======= -* x-igd-opregion=[on|*off*] +* x-igd-opregion=[*on*|off] Copy host IGD OpRegion and expose it to guest with fw_cfg * x-igd-lpc=[on|*off*] @@ -124,7 +124,7 @@ Examples * Adding IGD with OpRegion and LPC ID hack, but without VGA ranges (For UEFI guests) - -device vfio-pci,host=00:02.0,id=hostdev0,addr=2.0,x-igd-legacy-mode=off,x-igd-opregion=on,x-igd-lpc=on,romfile=efi_oprom.rom + -device vfio-pci,host=00:02.0,id=hostdev0,addr=2.0,x-igd-legacy-mode=off,x-igd-lpc=on,romfile=efi_oprom.rom Guest firmware diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 6908bcc..e1fab21 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -3385,7 +3385,7 @@ static const Property vfio_pci_dev_properties[] = { DEFINE_PROP_BIT("x-req", VFIOPCIDevice, features, VFIO_FEATURE_ENABLE_REQ_BIT, true), DEFINE_PROP_BIT("x-igd-opregion", VFIOPCIDevice, features, - VFIO_FEATURE_ENABLE_IGD_OPREGION_BIT, false), + VFIO_FEATURE_ENABLE_IGD_OPREGION_BIT, true), DEFINE_PROP_BIT("x-igd-lpc", VFIOPCIDevice, features, VFIO_FEATURE_ENABLE_IGD_LPC_BIT, false), DEFINE_PROP_ON_OFF_AUTO("x-igd-legacy-mode", VFIOPCIDevice, |