lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <BN9PR11MB5276B53481C374BDE839824E8CCD9@BN9PR11MB5276.namprd11.prod.outlook.com> Date: Sat, 28 Jan 2023 07:52:07 +0000 From: "Tian, Kevin" <kevin.tian@...el.com> To: Bjorn Helgaas <helgaas@...nel.org>, Lu Baolu <baolu.lu@...ux.intel.com> CC: Bjorn Helgaas <bhelgaas@...gle.com>, "Rodel, Jorg" <jroedel@...e.de>, "Matt Fagnani" <matt.fagnani@...l.net>, Christian König <christian.koenig@....com>, Jason Gunthorpe <jgg@...dia.com>, Vasant Hegde <vasant.hegde@....com>, "Zhu, Tony" <tony.zhu@...el.com>, "linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>, "iommu@...ts.linux.dev" <iommu@...ts.linux.dev>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org> Subject: RE: [PATCH v3 1/1] PCI: Add translated request only flag for pci_enable_pasid() > From: Bjorn Helgaas <helgaas@...nel.org> > Sent: Saturday, January 28, 2023 1:31 AM > > On Sat, Jan 14, 2023 at 03:34:20PM +0800, Lu Baolu wrote: > > > @@ -353,12 +353,15 @@ void pci_pasid_init(struct pci_dev *pdev) > > * pci_enable_pasid - Enable the PASID capability > > * @pdev: PCI device structure > > * @features: Features to enable > > + * @flags: device-specific flags > > + * - PCI_PASID_XLATED_REQ_ONLY: The PCI device always use translated > type > > + * for all PASID memory requests. > > s/use/uses/ > > I guess PCI_PASID_XLATED_REQ_ONLY is something only the driver knows, > right? We can't deduce from architected config space that the device Yes > will produce PASID prefixes for every Memory Request, can we? > No, we can't. PASID cap only indicates that the device is capable of using PASID prefix, not a mandatory requirement on every memory request. Similar case is PRI. Having PRI enabled only means the device is capable of handling I/O page faults, not the indicator that it can 100% tolerate fault in every memory access. That is the main reason why vfio/iommufd can't simply skip pinning guest memory when seeing PRI enabled (well, though PRI is not supported yet). It has to be opted-in via a driver specific way e.g. a vfio variant driver. Thanks Kevin
Powered by blists - more mailing lists