vfio/igd: Detect IGD by OpRegion and enable OpRegion automatically
Status from this message: Applied to vfio-next.
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest9 patches 2 repliesApplied
- v19 patches 16 repliesSuperseded
Changes in v3 from the cover letter
* Addressed a nit in patch #8
Patches in v3 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | vfio/igd: Restrict legacy mode to Gen6-9 devicesdocs/ hw/ | +6 | 0 replies | |
| 2/9 | vfio/igd: Always emulate ASLS (OpRegion) registerhw/ | +9 | 0 replies | |
| 3/9 | vfio/igd: Detect IGD device by OpRegionhw/ | +16 | 0 replies | |
| 4/9 | vfio/igd: Check vendor and device ID on GVT-g mdevhw/ | +12 | 0 replies | |
| 5/9 | vfio/igd: Check OpRegion support on GVT-g mdevhw/ | +6 | 0 replies | |
| 6/9 | vfio/igd: Enable OpRegion by defaultdocs/ hw/ | +3 | 0 replies | |
| 7/9 | vfio/igd: Allow overriding GMS with 0xf0 to 0xfe on Gen9+hw/ | +41 | 0 replies | |
| 8/9 | vfio/igd: Only emulate GGC register when x-igd-gms is sethw/ | +26 | 0 replies | |
| 9/9 | vfio/igd: Remove generation limitation for IGD passthroughdocs/ hw/ | +27 | 0 replies |
Reviews trailers per patch
None of the 9 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Corvin Köhne | Alex Williamson |
|---|---|---|
| Series | R-b | R-b T-b |
| 1/9 | ||
| 2/9 | ||
| 3/9 | ||
| 4/9 | ||
| 5/9 | ||
| 6/9 | ||
| 7/9 | ||
| 8/9 | ||
| 9/9 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 0/9] vfio/igd: Detect IGD by OpRegion and enable OpRegion automatically
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/[email protected]
[2] https://edc.intel.com/content/www/us/en/design/publications/14th-generation-core-processors-cfg-and-mem-registers/d2-f0-processor-graphics-registers/
Changelog:
v3:
* Addressed a nit in patch #8
v2:
* Removed "Allow hotplugging with OpRegion enabled", hotplugging is always forbidden.
* Test device is not hotplugged and get opregion in a single function.
* Update documentation along with code changes.
* Minor code style fixes.
Tomita Moeko (9):
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: Check vendor and device ID on GVT-g mdev vfio/igd: Check OpRegion support on GVT-g mdev vfio/igd: Enable OpRegion by default
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
docs/igd-assign.txt | 11 ++- hw/vfio/igd.c | 220 ++++++++++++++++++++++++++------------------ hw/vfio/pci.c | 2 +- 3 files changed, 138 insertions(+), 95 deletions(-)
Signature · 1 line
2.47.2