linux-stable/drivers/vfio
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
..
fsl-mc Merge branch 'v5.16/vfio/diana-fsl-reset-v2' into v5.16/vfio/next 2021-10-11 15:50:49 -06:00
mdev vfio: simplify iommu group allocation for mediated devices 2021-09-30 12:46:44 -06:00
pci vfio/pci: Fix OpRegion read 2021-11-30 11:41:49 -07:00
platform
Kconfig
Makefile
vfio.c vfio: remove all kernel-doc notation 2021-11-30 11:41:43 -07:00
vfio.h vfio: clean up the check for mediated device in vfio_iommu_type1 2021-09-30 12:46:44 -06:00
vfio_iommu_spapr_tce.c vfio/spapr_tce: reject mediated devices 2021-09-30 12:46:44 -06:00
vfio_iommu_type1.c vfio/iommu_type1: remove IS_IOMMU_CAP_DOMAIN_IN_CONTAINER 2021-09-30 12:46:45 -06:00
vfio_spapr_eeh.c
virqfd.c