diff options
author | Tomita Moeko <tomitamoeko@gmail.com> | 2025-03-07 02:01:21 +0800 |
---|---|---|
committer | Cédric Le Goater <clg@redhat.com> | 2025-03-11 17:01:14 +0100 |
commit | 5aed8b0f0be25d2554f8bd76211e43b51e58f736 (patch) | |
tree | 6555ecfe3d98564987f0ffafcf4677a66966e2f2 /hw/vfio/migration.c | |
parent | 825b96dbcee23d134b691fc75618b59c5f53da32 (diff) | |
download | qemu-5aed8b0f0be25d2554f8bd76211e43b51e58f736.zip qemu-5aed8b0f0be25d2554f8bd76211e43b51e58f736.tar.gz qemu-5aed8b0f0be25d2554f8bd76211e43b51e58f736.tar.bz2 |
vfio/igd: Remove GTT write quirk in IO BAR 4
The IO BAR4 of IGD devices contains a pair of 32-bit address/data
registers, MMIO_Index (0x0) and MMIO_Data (0x4), which provide access
to the MMIO BAR0 (GTTMMADR) from IO space. These registers are probably
only used by the VBIOS, and are not documented by intel. The observed
layout of MMIO_Index register is:
31 2 1 0
+-------------------------------------------------------------------+
| Offset | Rsvd | Sel |
+-------------------------------------------------------------------+
- Offset: Byte offset in specified region, 4-byte aligned.
- Sel: Region selector
0: MMIO register region (first half of MMIO BAR0)
1: GTT region (second half of MMIO BAR0). Pre Gen11 only.
Currently, QEMU implements a quirk that adjusts the guest Data Stolen
Memory (DSM) region address to be (addr - host BDSM + guest BDSM) when
programming GTT entries via IO BAR4, assuming guest still programs GTT
with host DSM address, which is not the case. Guest's BDSM register is
emulated and initialized to 0 at startup by QEMU, then SeaBIOS programs
its value[1]. As result, the address programmed to GTT entries by VBIOS
running in guest are valid GPA, and this unnecessary adjustment brings
inconsistency.
[1] https://gitlab.com/qemu-project/seabios/-/blob/1.12-stable/src/fw/pciinit.c#L319-332
Signed-off-by: Tomita Moeko <tomitamoeko@gmail.com>
Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
Tested-by: Alex Williamson <alex.williamson@redhat.com>
Reviewed-by: Corvin Köhne <c.koehne@beckhoff.com>
Link: https://lore.kernel.org/qemu-devel/20250306180131.32970-2-tomitamoeko@gmail.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'hw/vfio/migration.c')
0 files changed, 0 insertions, 0 deletions