]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
vfio/pci: Disable qword access to the PCI ROM bar
authorKevin Tian <kevin.tian@intel.com>
Thu, 18 Dec 2025 08:16:49 +0000 (08:16 +0000)
committerAlex Williamson <alex@shazbot.org>
Tue, 23 Dec 2025 21:07:08 +0000 (14:07 -0700)
commitdc85a46928c41423ad89869baf05a589e2975575
tree0cf11be06fef778c72d6a33f854a5f4eb26f3129
parent9448598b22c50c8a5bb77a9103e2d49f134c9578
vfio/pci: Disable qword access to the PCI ROM bar

Commit 2b938e3db335 ("vfio/pci: Enable iowrite64 and ioread64 for vfio
pci") enables qword access to the PCI bar resources. However certain
devices (e.g. Intel X710) are observed with problem upon qword accesses
to the rom bar, e.g. triggering PCI aer errors.

This is triggered by Qemu which caches the rom content by simply does a
pread() of the remaining size until it gets the full contents. The other
bars would only perform operations at the same access width as their
guest drivers.

Instead of trying to identify all broken devices, universally disable
qword access to the rom bar i.e. going back to the old way which worked
reliably for years.

Reported-by: Farrah Chen <farrah.chen@intel.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220740
Fixes: 2b938e3db335 ("vfio/pci: Enable iowrite64 and ioread64 for vfio pci")
Cc: stable@vger.kernel.org
Signed-off-by: Kevin Tian <kevin.tian@intel.com>
Tested-by: Farrah Chen <farrah.chen@intel.com>
Link: https://lore.kernel.org/r/20251218081650.555015-2-kevin.tian@intel.com
Signed-off-by: Alex Williamson <alex@shazbot.org>
drivers/vfio/pci/nvgrace-gpu/main.c
drivers/vfio/pci/vfio_pci_rdwr.c
include/linux/vfio_pci_core.h