vfio/igd: add macro for declaring mirrored registers
authorTomita Moeko <tomitamoeko@gmail.com>
Fri, 6 Dec 2024 12:27:45 +0000 (20:27 +0800)
committerCédric Le Goater <clg@redhat.com>
Thu, 26 Dec 2024 06:23:37 +0000 (07:23 +0100)
commit1a2623b5c9e7cb6c9cc69dd4b467c9cbb1c98877
tree504661961b2915c79c6007c24275948a56ca4ecd
parent960f62770ae4c603f92317166495e4a59cf051fc
vfio/igd: add macro for declaring mirrored registers

igd devices have multipe registers mirroring mmio address and pci
config space, more than a single BDSM register. To support this,
the read/write functions are made common and a macro is defined to
simplify the declaration of MemoryRegionOps.

Signed-off-by: Tomita Moeko <tomitamoeko@gmail.com>
Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
Link: https://lore.kernel.org/r/20241206122749.9893-8-tomitamoeko@gmail.com
[ clg : Fixed conversion specifier on 32-bit platform ]
Signed-off-by: Cédric Le Goater <clg@redhat.com>
hw/vfio/igd.c