Commit 8bb808ce authored by Kevin Tian's avatar Kevin Tian Committed by Alex Williamson
Browse files

vfio/pci: Disable qword access to the VGA region



Seems no reason to allow qword access to the old VGA resource. Better
restrict it to dword access as before.

Suggested-by: default avatarAlex Williamson <alex@shazbot.org>
Signed-off-by: default avatarKevin Tian <kevin.tian@intel.com>
Link: https://lore.kernel.org/r/20251218081650.555015-3-kevin.tian@intel.com


Signed-off-by: default avatarAlex Williamson <alex@shazbot.org>
parent dc85a469
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -363,7 +363,7 @@ ssize_t vfio_pci_vga_rw(struct vfio_pci_core_device *vdev, char __user *buf,
	 * to the memory enable bit in the command register.
	 */
	done = vfio_pci_core_do_io_rw(vdev, false, iomem, buf, off, count,
				      0, 0, iswrite, VFIO_PCI_IO_WIDTH_8);
				      0, 0, iswrite, VFIO_PCI_IO_WIDTH_4);

	vga_put(vdev->pdev, rsrc);