qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/11] vfio/igd: Detect IGD by OpRegion and enable OpRegion automatically
@ 2025-04-21 16:31 Tomita Moeko
  2025-04-21 16:31 ` [PATCH 01/11] vfio/igd: Restrict legacy mode to Gen6-9 devices Tomita Moeko
                   ` (10 more replies)
  0 siblings, 11 replies; 21+ messages in thread
From: Tomita Moeko @ 2025-04-21 16:31 UTC (permalink / raw)
  To: Alex Williamson, Cédric Le Goater
  Cc: qemu-devel, Corvin Köhne, Tomita Moeko

As proposed in a previous discussion [1], detect IGD devices based on
whether it has VFIO_REGION_SUBTYPE_INTEL_IGD_OPREGION exposed by kernel
and enables OpRegion access by default. This enables out-of-the-box
display output support for IGD passthrough without having to manually
set x-igd-opregion=on, which probably saves effort for libvirt users.

This patchset also limits legacy mode to Gen6-9 devices, as Intel no
longer provides CSM support and VBIOS on newer IGD, and Seabios does not
support setting up the 64 bit BDSM register on Gen 11+ devices. Exposing
VGA ranges to guests by default on platforms without VGA mode support is
undesirable.

Additionally, as we enables OpRegion on IGD devices by default, and
Intel removes the BDSM register from Meteor Lake [2]. There seems to be
no extra register quirks rather than OpRegion required on newer devices.
To support them (and probably future devices), the generation limit is
removed, with BDSM quirk only applied to known Gen 6-12 devices. 

Note: I have not been able to test this on Meteor Lake or newer
platforms due to lack of hardware.


[1] https://lore.kernel.org/qemu-devel/20250325172239.27926-1-tomitamoeko@gmail.com/T/
[2] https://edc.intel.com/content/www/us/en/design/publications/14th-generation-core-processors-cfg-and-mem-registers/d2-f0-processor-graphics-registers/

Tomita Moeko (11):
  vfio/igd: Restrict legacy mode to Gen6-9 devices
  vfio/igd: Always emulate ASLS (OpRegion) register
  vfio/igd: Detect IGD device by OpRegion
  vfio/igd: Remove vfio_pci_igd_setup_opregion
  vfio/igd: Check vendor and device ID on GVT-g mdev
  vfio/igd: Enable OpRegion by default
  vfio/igd: Allow hotplugging with OpRegion enabled
  vfio/igd: Allow overriding GMS with 0xf0 to 0xfe on Gen9+
  vfio/igd: Only emulate GGC register when x-igd-gms is set
  vfio/igd: Remove generation limitation for IGD passthrough
  vfio/igd: Update IGD passthrough documentation

 docs/igd-assign.txt |  11 +-
 hw/vfio/igd.c       | 257 ++++++++++++++++++++++++--------------------
 hw/vfio/pci.c       |   2 +-
 3 files changed, 153 insertions(+), 117 deletions(-)

-- 
2.47.2



^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2025-04-28 15:24 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-21 16:31 [PATCH 00/11] vfio/igd: Detect IGD by OpRegion and enable OpRegion automatically Tomita Moeko
2025-04-21 16:31 ` [PATCH 01/11] vfio/igd: Restrict legacy mode to Gen6-9 devices Tomita Moeko
2025-04-24 22:57   ` Alex Williamson
2025-04-21 16:31 ` [PATCH 02/11] vfio/igd: Always emulate ASLS (OpRegion) register Tomita Moeko
2025-04-21 16:31 ` [PATCH 03/11] vfio/igd: Detect IGD device by OpRegion Tomita Moeko
2025-04-23  6:54   ` Corvin Köhne
2025-04-28 15:23     ` Tomita Moeko
2025-04-24 22:57   ` Alex Williamson
2025-04-21 16:31 ` [PATCH 04/11] vfio/igd: Remove vfio_pci_igd_setup_opregion Tomita Moeko
2025-04-21 16:31 ` [PATCH 05/11] vfio/igd: Check vendor and device ID on GVT-g mdev Tomita Moeko
2025-04-21 16:31 ` [PATCH 06/11] vfio/igd: Enable OpRegion by default Tomita Moeko
2025-04-21 16:31 ` [PATCH 07/11] vfio/igd: Allow hotplugging with OpRegion enabled Tomita Moeko
2025-04-24 22:57   ` Alex Williamson
2025-04-28 15:18     ` Tomita Moeko
2025-04-21 16:31 ` [PATCH 08/11] vfio/igd: Allow overriding GMS with 0xf0 to 0xfe on Gen9+ Tomita Moeko
2025-04-23  7:13   ` Corvin Köhne
2025-04-21 16:31 ` [PATCH 09/11] vfio/igd: Only emulate GGC register when x-igd-gms is set Tomita Moeko
2025-04-21 16:31 ` [PATCH 10/11] vfio/igd: Remove generation limitation for IGD passthrough Tomita Moeko
2025-04-23  7:19   ` Corvin Köhne
2025-04-21 16:31 ` [PATCH 11/11] vfio/igd: Update IGD passthrough documentation Tomita Moeko
2025-04-23  7:21   ` Corvin Köhne

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).