]> git.ipfire.org Git - thirdparty/qemu.git/commit
vfio/igd: Always emulate ASLS (OpRegion) register
authorTomita Moeko <tomitamoeko@gmail.com>
Mon, 5 May 2025 17:02:58 +0000 (01:02 +0800)
committerCédric Le Goater <clg@redhat.com>
Fri, 9 May 2025 10:42:27 +0000 (12:42 +0200)
commit1d5f84f349d27f1d3ea6a0a6261253269fc1cf68
tree39e802d45b38ba8df46d5fa77cb465b9b301edce
parentdd69d846046f697863ebbd18f9a3544d36720476
vfio/igd: Always emulate ASLS (OpRegion) register

ASLS register represents the base address of OpRegion, and it is
programmed with HPA. In IGD passthrough scenario, it needs to be
reprogrammed with GPA by guest firmware. To prevent guest accessing
wrong memory range, ASLS should always be emulated and cleared.

In GVT-g scenario, emulating ASLS is unnecessary as access is handled
by kvmgt backend [1].

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/i915/gvt/cfg_space.c?h=v6.14#n295

Signed-off-by: Tomita Moeko <tomitamoeko@gmail.com>
Reviewed-by: Corvin Köhne <c.koehne@beckhoff.com>
Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
Tested-by: Alex Williamson <alex.williamson@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250505170305.23622-3-tomitamoeko@gmail.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
hw/vfio/igd.c