]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
vfio/pci: Disable qword access to the PCI ROM bar
authorKevin Tian <kevin.tian@intel.com>
Tue, 6 Jan 2026 02:11:44 +0000 (02:11 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Jan 2026 09:17:21 +0000 (10:17 +0100)
commita9040eac434b1f0dbc85bbe50bce50d94afc6a91
tree6e24409658b764065dc2076ef50bb843edb67768
parente7a7d7e629c2abcc0ade47b148ebe71d5832ead9
vfio/pci: Disable qword access to the PCI ROM bar

[ Upstream commit dc85a46928c41423ad89869baf05a589e2975575 ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/vfio/pci/nvgrace-gpu/main.c
drivers/vfio/pci/vfio_pci_rdwr.c
include/linux/vfio_pci_core.h