> From: Bjorn Helgaas <helgaas@xxxxxxxxxx> > 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