diff options
| author | Tomita Moeko <tomitamoeko@gmail.com> | 2025-07-08 22:52:11 +0800 |
|---|---|---|
| committer | Cédric Le Goater <clg@redhat.com> | 2025-07-15 17:11:12 +0200 |
| commit | a59d06305fff9d10ddeeaebc66590af422362701 (patch) | |
| tree | 63c9a19753584f4e4271393faf73ad62b126ec45 /hw/vfio/helpers.c | |
| parent | 622740aad9f39c4266ce00d7478b32c7506e6642 (diff) | |
| download | focaccia-qemu-a59d06305fff9d10ddeeaebc66590af422362701.tar.gz focaccia-qemu-a59d06305fff9d10ddeeaebc66590af422362701.zip | |
vfio/pci: Introduce x-pci-class-code option
Introduce x-pci-class-code option to allow users to override PCI class code of a device, similar to the existing x-pci-vendor-id option. Only the lower 24 bits of this option are used, though a uint32 is used here for determining whether the value is valid and set by user. Additionally, to ensure VGA ranges are only exposed on VGA devices, pci_register_vga() is now called in vfio_pci_config_setup(), after the class code override is completed. This is mainly intended for IGD devices that expose themselves either as VGA controller (primary display) or Display controller (non-primary display). The UEFI GOP driver depends on the device reporting a VGA controller class code (0x030000). Signed-off-by: Tomita Moeko <tomitamoeko@gmail.com> Reviewed-by: Alex Williamson <alex.williamson@redhat.com> Link: https://lore.kernel.org/qemu-devel/20250708145211.6179-1-tomitamoeko@gmail.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'hw/vfio/helpers.c')
0 files changed, 0 insertions, 0 deletions