lkml.org 
[lkml]   [2023]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v3 1/1] PCI: Add translated request only flag for pci_enable_pasid()
Date
> From: Bjorn Helgaas <helgaas@kernel.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

\
 
 \ /
  Last update: 2023-03-27 00:00    [W:0.105 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site