]> git.ipfire.org Git - thirdparty/qemu.git/commit
vfio/igd: Fix broken KVMGT OpRegion support
authorTomita Moeko <tomitamoeko@gmail.com>
Thu, 6 Mar 2025 18:01:30 +0000 (02:01 +0800)
committerCédric Le Goater <clg@redhat.com>
Tue, 11 Mar 2025 16:01:14 +0000 (17:01 +0100)
commite46b7af508c27a4e830818ac05fa3e2e4c33b416
tree59d3621937d0565de335924270a62eb4c57c7f2c
parent674f61117d3652c969bd9d04201615bb69614fa2
vfio/igd: Fix broken KVMGT OpRegion support

The KVMGT/GVT-g vGPU also exposes OpRegion. But unlike IGD passthrough,
it only needs the OpRegion quirk. A previous change moved x-igd-opregion
handling to config quirk breaks KVMGT functionality as it brings extra
checks and applied other quirks. Here we check if the device is mdev
(KVMGT) or not (passthrough), and then applies corresponding quirks.

As before, users must manually specify x-igd-opregion=on to enable it
on KVMGT devices. In the future, we may check the VID/DID and enable
OpRegion automatically.

Signed-off-by: Tomita Moeko <tomitamoeko@gmail.com>
Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
Tested-by: Alex Williamson <alex.williamson@redhat.com>
Reviewed-by: Corvin Köhne <c.koehne@beckhoff.com>
Link: https://lore.kernel.org/qemu-devel/20250306180131.32970-11-tomitamoeko@gmail.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
hw/vfio/igd.c