From: Kevin Tian <kevin.tian@intel.com>
To: Alex Williamson <alex@shazbot.org>, Ankit Agrawal <ankita@nvidia.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>, Yishai Hadas <yishaih@nvidia.com>,
Shameer Kolothum <skolothumtho@nvidia.com>,
Kevin Tian <kevin.tian@intel.com>,
Ramesh Thomas <ramesh.thomas@intel.com>,
Yunxiang Li <Yunxiang.Li@amd.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 2/2] vfio/pci: Disable qword access to the VGA region
Date: Thu, 18 Dec 2025 08:16:50 +0000 [thread overview]
Message-ID: <20251218081650.555015-3-kevin.tian@intel.com> (raw)
In-Reply-To: <20251218081650.555015-1-kevin.tian@intel.com>
Seems no reason to allow qword access to the old VGA resource. Better
restrict it to dword access as before.
Suggested-by: Alex Williamson <alex@shazbot.org>
Signed-off-by: Kevin Tian <kevin.tian@intel.com>
---
drivers/vfio/pci/vfio_pci_rdwr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/vfio/pci/vfio_pci_rdwr.c b/drivers/vfio/pci/vfio_pci_rdwr.c
index 25380b7dfe18..b38627b35c35 100644
--- a/drivers/vfio/pci/vfio_pci_rdwr.c
+++ b/drivers/vfio/pci/vfio_pci_rdwr.c
@@ -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);
--
2.43.0
next prev parent reply other threads:[~2025-12-18 8:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-18 8:16 [PATCH v2 0/2] vfio/pci: Fix issues with qword access Kevin Tian
2025-12-18 8:16 ` [PATCH v2 1/2] vfio/pci: Disable qword access to the PCI ROM bar Kevin Tian
2025-12-18 9:20 ` Chen, Farrah
2025-12-18 8:16 ` Kevin Tian [this message]
2025-12-23 23:41 ` [PATCH v2 0/2] vfio/pci: Fix issues with qword access Alex Williamson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251218081650.555015-3-kevin.tian@intel.com \
--to=kevin.tian@intel.com \
--cc=Yunxiang.Li@amd.com \
--cc=alex@shazbot.org \
--cc=ankita@nvidia.com \
--cc=jgg@ziepe.ca \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ramesh.thomas@intel.com \
--cc=skolothumtho@nvidia.com \
--cc=yishaih@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox