vfio/igd: emulate GGC register in mmio bar0
authorTomita Moeko <tomitamoeko@gmail.com>
Fri, 6 Dec 2024 12:27:46 +0000 (20:27 +0800)
committerCédric Le Goater <clg@redhat.com>
Thu, 26 Dec 2024 06:23:37 +0000 (07:23 +0100)
commitea652c2beeaec51035f76aeb976af06858ee85ce
tree98ede3a84dd09e3450b548f795703503ca75d636
parent1a2623b5c9e7cb6c9cc69dd4b467c9cbb1c98877
vfio/igd: emulate GGC register in mmio bar0

The GGC register at 0x50 of pci config space is a mirror of the same
register at 0x108040 of mmio bar0 [1]. i915 driver also reads that
register from mmio bar0 instead of config space. As GGC is programmed
and emulated by qemu, the mmio address should also be emulated, in the
same way of BDSM register.

[1] 4.1.28, 12th Generation Intel Core Processors Datasheet Volume 2
    https://www.intel.com/content/www/us/en/content-details/655259

Signed-off-by: Tomita Moeko <tomitamoeko@gmail.com>
Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
Link: https://lore.kernel.org/r/20241206122749.9893-9-tomitamoeko@gmail.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
hw/vfio/igd.c