linux/drivers/vfio/pci
Zhenyu Wang 8704e89349 vfio/pci: Fix OpRegion read
This is to fix incorrect pointer arithmetic which caused wrong
OpRegion version returned, then VM driver got error to get wanted
VBT block. We need to be safe to return correct data, so force
pointer type for byte access.

Fixes: 49ba1a2976 ("vfio/pci: Add OpRegion 2.0+ Extended VBT support.")
Cc: Colin Xu <colin.xu@gmail.com>
Cc: Alex Williamson <alex.williamson@redhat.com>
Cc: Dmitry Torokhov <dtor@chromium.org>
Cc: "Xu, Terrence" <terrence.xu@intel.com>
Cc: "Gao, Fred" <fred.gao@intel.com>
Acked-by: Colin Xu <colin.xu@gmail.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Link: https://lore.kernel.org/r/20211125051328.3359902-1-zhenyuw@linux.intel.com
[aw: line wrap]
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2021-11-30 11:41:49 -07:00
..
Kconfig vfio/pci: Introduce vfio_pci_core.ko 2021-08-26 10:36:51 -06:00
Makefile vfio/pci: Introduce vfio_pci_core.ko 2021-08-26 10:36:51 -06:00
trace.h vfio/pci: Cleanup license mess 2019-01-22 11:06:05 -07:00
vfio_pci_config.c vfio/pci: Introduce vfio_pci_core.ko 2021-08-26 10:36:51 -06:00
vfio_pci_core.c Merge branch 'v5.16/vfio/hch-cleanup-vfio-iommu_group-creation-v6' into v5.16/vfio/next 2021-09-30 12:55:35 -06:00
vfio_pci_igd.c vfio/pci: Fix OpRegion read 2021-11-30 11:41:49 -07:00
vfio_pci_intrs.c vfio/pci: Introduce vfio_pci_core.ko 2021-08-26 10:36:51 -06:00
vfio_pci_rdwr.c vfio/pci: Introduce vfio_pci_core.ko 2021-08-26 10:36:51 -06:00
vfio_pci_zdev.c Merge branches 'v5.15/vfio/spdx-license-cleanups', 'v5.15/vfio/dma-valid-waited-v3', 'v5.15/vfio/vfio-pci-core-v5' and 'v5.15/vfio/vfio-ap' into v5.15/vfio/next 2021-08-26 11:08:50 -06:00
vfio_pci.c vfio/pci: Introduce vfio_pci_core.ko 2021-08-26 10:36:51 -06:00