qemu/hw
Tomita Moeko 5aed8b0f0b 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>
2025-03-11 17:01:14 +01:00
..
9pfs 9pfs: improve v9fs_open() tracing 2025-02-06 17:10:46 +01:00
acpi hw/acpi: Prefer cached CpuClass over CPU_GET_CLASS() macro 2025-03-09 17:00:47 +01:00
adc include/hw/qdev-properties: Remove DEFINE_PROP_END_OF_LIST 2024-12-19 19:36:37 +01:00
alpha hw/boards: Do not create unusable default if=sd drives 2025-02-16 14:25:08 +01:00
arm hw/arm/aspeed_ast27x0: Sort the memmap table by mapping address 2025-03-09 14:36:53 +01:00
audio Accel & Exec patch queue 2024-12-21 11:07:00 -05:00
avr hw/boards: Do not create unusable default if=sd drives 2025-02-16 14:25:08 +01:00
block hw/xen: Add "mode" parameter to xen-block devices 2025-03-10 13:27:30 +01:00
char hw/char/sifive_uart: Free fifo on unrealize 2025-03-04 14:45:34 +01:00
core cpus: Remove CPUClass::has_work() handler 2025-03-09 17:00:47 +01:00
cpu hw/cpu/arm_mpcore: Remove default values for GIC external IRQs 2025-02-20 14:20:29 +00:00
cxl mem/cxl_type3: support 3, 6, 12 and 16 interleave ways 2025-02-21 07:18:42 -05:00
display qdev: Rename PropertyInfo member @name to @type 2025-03-06 10:30:58 +01:00
dma Accel & Exec patch queue 2024-12-21 11:07:00 -05:00
fsi hw: Use device_class_set_legacy_reset() instead of opencoding 2024-09-13 15:31:44 +01:00
gpio hw/gpio: npcm7xx: fixup out-of-bounds access 2025-03-07 10:08:19 +00:00
hppa hw/boards: Do not create unusable default if=sd drives 2025-02-16 14:25:08 +01:00
hyperv qapi: Move include/qapi/qmp/ to include/qobject/ 2025-02-10 15:33:16 +01:00
i2c hw/arm: Mark Allwinner Technology devices as little-endian 2025-02-16 14:41:46 +01:00
i386 Misc HW patches 2025-03-05 21:54:58 +08:00
ide Accel & Exec patch queue 2024-12-21 11:07:00 -05:00
input Accel & Exec patch queue 2024-12-21 11:07:00 -05:00
intc hw/intc/aspeed: Add Support for AST2700 INTCIO Controller 2025-03-09 14:36:53 +01:00
ipack hw/ipack: Remove legacy qemu_allocate_irqs() use 2025-01-31 19:36:44 +01:00
ipmi Accel & Exec patch queue 2024-12-21 11:07:00 -05:00
isa hw: Declare various const data as 'const' 2025-02-16 14:26:07 +01:00
loongarch hw/loongarch/virt: Enable cpu hotplug feature on virt machine 2025-03-05 09:39:18 +08:00
m68k hw/boards: Do not create unusable default if=sd drives 2025-02-16 14:25:08 +01:00
mem mem/cxl_type3: support 3, 6, 12 and 16 interleave ways 2025-02-21 07:18:42 -05:00
microblaze hw/ssi/xilinx_spi: Make device endianness configurable 2025-02-16 14:34:57 +01:00
mips accel/tcg: Rename 'hw/core/tcg-cpu-ops.h' -> 'accel/tcg/cpu-ops.h' 2025-03-06 15:46:17 +01:00
misc hw/misc/aspeed_scu: Add Support for AST2700/AST2750 A1 Silicon Revisions 2025-03-09 14:36:53 +01:00
net Revert "hw/net/net_tx_pkt: Fix overrun in update_sctp_checksum()" 2025-03-10 17:07:16 +08:00
nubus include/hw/qdev-properties: Remove DEFINE_PROP_END_OF_LIST 2024-12-19 19:36:37 +01:00
nvme vfio queue: 2025-03-07 07:39:21 +08:00
nvram qdev: Rename PropertyInfo member @name to @type 2025-03-06 10:30:58 +01:00
openrisc target/openrisc: Call cpu_openrisc_clock_init() in cpu_realize() 2025-03-06 15:46:18 +01:00
pci vfio queue: 2025-03-07 07:39:21 +08:00
pci-bridge pcie, virtio: Remove redundant pm_cap 2025-03-06 06:47:33 +01:00
pci-host hw/arm/fsl-imx8mp: Add PCIe support 2025-02-25 17:02:34 +00:00
ppc exec: Declare tlb_flush*() in 'exec/cputlb.h' 2025-03-08 07:56:14 -08:00
remote Memory pull request for 10.0 2025-02-19 08:36:26 +08:00
riscv hw/riscv: add IOMMU HPM trace events 2025-03-04 15:42:54 +10:00
rtc goldfish_rtc: Fix tick_offset migration 2025-03-04 15:42:54 +10:00
rx hw/rx: Allow execution without either bios or kernel 2025-02-16 14:45:38 +01:00
s390x * Bug fixes and some small improvements for functional tests 2025-03-08 11:31:26 +08:00
scsi block: remove unused BLOCK_OP_TYPE_DATAPLANE 2025-02-06 14:51:10 +01:00
sd hw/arm: Mark Allwinner Technology devices as little-endian 2025-02-16 14:41:46 +01:00
sensor hw: Make class data 'const' 2025-02-16 14:26:07 +01:00
sh4 exec: Declare tlb_flush*() in 'exec/cputlb.h' 2025-03-08 07:56:14 -08:00
smbios include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
sparc hw/boards: Do not create unusable default if=sd drives 2025-02-16 14:25:08 +01:00
sparc64 hw/boards: Do not create unusable default if=sd drives 2025-02-16 14:25:08 +01:00
ssi hw/ssi: Make flash size a property in NPCM7XX FIU 2025-02-20 14:20:29 +00:00
timer * qom: Use command line syntax for default values in help 2025-03-03 10:20:59 +08:00
tpm hw/tpm: Have TPM TIS sysbus device inherit from DYNAMIC_SYS_BUS_DEVICE 2025-02-16 14:25:07 +01:00
tricore hw/boards: Do not create unusable default if=sd drives 2025-02-16 14:25:08 +01:00
uefi docs: add uefi variable service documentation 2025-03-04 12:07:05 +01:00
ufs hw/ufs: Add temperature event notification support 2025-03-05 02:13:29 +01:00
usb hw/usb/hcd-xhci-pci: Adds property for disabling mapping in IRQ mode 2025-03-04 14:45:34 +01:00
vfio vfio/igd: Remove GTT write quirk in IO BAR 4 2025-03-11 17:01:14 +01:00
virtio pcie, virtio: Remove redundant pm_cap 2025-03-06 06:47:33 +01:00
vmapple hw/vmapple/vmapple: Add vmapple machine type 2025-03-04 14:45:34 +01:00
watchdog hw/arm: Mark Allwinner Technology devices as little-endian 2025-02-16 14:41:46 +01:00
xen xen: No need to flush the mapcache for grants 2025-03-10 13:28:03 +01:00
xenpv hw/boards: Do not create unusable default if=sd drives 2025-02-16 14:25:08 +01:00
xtensa hw/boards: Do not create unusable default if=sd drives 2025-02-16 14:25:08 +01:00
Kconfig Misc HW patches 2025-03-05 21:54:58 +08:00
meson.build Misc HW patches 2025-03-05 21:54:58 +08:00