qemu-patch-raspberry4/hw/vfio
Alex Williamson ac2a9862b7 vfio-pci: Fix GTT wrap-around for Skylake+ IGD
Previous IGD, up through Broadwell, only seem to write GTT values into
the first 1MB of space allocated for the BDSM, but clearly the GTT
can be multiple MB in size.  Our test in vfio_igd_quirk_data_write()
correctly filters out indexes beyond 1MB, but given the 1MB mask we're
using, we re-apply writes only to the first 1MB of the guest allocated
BDSM.

We can't assume either the host or guest BDSM is naturally aligned, so
we can't simply apply a different mask.  Instead, save the host BDSM
and do the arithmetic to subtract the host value to get the BDSM
offset and add it to the guest allocated BDSM.

Reported-by: Alexander Indenbaum <alexander.indenbaum@gmail.com>
Tested-by: Alexander Indenbaum <alexander.indenbaum@gmail.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2017-02-10 13:12:03 -07:00
..
amd-xgbe.c all: Clean up includes 2016-02-23 12:43:05 +00:00
calxeda-xgmac.c hw/vfio: Clean up includes 2016-01-29 15:07:24 +00:00
common.c vfio: Add support for mmapping sub-page MMIO BARs 2016-10-31 09:53:04 -06:00
Makefile.objs vfio: spapr: Add DMA memory preregistering (SPAPR IOMMU v2) 2016-07-05 14:30:54 +10:00
pci-quirks.c vfio-pci: Fix GTT wrap-around for Skylake+ IGD 2017-02-10 13:12:03 -07:00
pci.c pci: Convert msix_init() to Error and fix callers 2017-02-01 03:37:18 +02:00
pci.h vfio/pci: Pass an error object to vfio_pci_igd_opregion_init 2016-10-17 10:57:59 -06:00
platform.c vfio/platform: Pass an error object to vfio_base_device_init 2016-10-17 10:58:01 -06:00
spapr.c memory: Replace skip_dump flag with "ram_device" 2016-10-31 09:53:03 -06:00
trace-events trace: clean up trace-events files 2017-01-31 17:12:15 +00:00