[PATCH v1] event/dlb2: add support for disabling PASID

Chen, Mike Ximing mike.ximing.chen at intel.com
Thu Jun 8 16:25:22 CEST 2023


> From: Jerin Jacob <jerinjacobk at gmail.com>
> Sent: Thursday, June 8, 2023 7:32 AM
> To: David Marchand <david.marchand at redhat.com>
> Cc: Sevincer, Abdullah <abdullah.sevincer at intel.com>; Gaetan Rivet <grive at u256.net>; Thomas Monjalon
> <thomas at monjalon.net>; dev at dpdk.org; jerinj at marvell.com; Chen, Mike Ximing
> <mike.ximing.chen at intel.com>
> Subject: Re: [PATCH v1] event/dlb2: add support for disabling PASID
> 
> On Thu, Jun 8, 2023 at 12:59 PM David Marchand <david.marchand at redhat.com> wrote:
> >
> > On Thu, Jun 8, 2023 at 7:38 AM Jerin Jacob <jerinjacobk at gmail.com> wrote:
> > >
> > > On Thu, Jun 8, 2023 at 2:31 AM Abdullah Sevincer
> > > <abdullah.sevincer at intel.com> wrote:
> > > >
> > > > vfio-pci driver in Linux kernel 6.2 enables PASID by default.
> > > > In DLB hardware, enabling PASID puts DLB in SIOV mode. This breaks
> > > > DLB PF-PMD mode. For DLB PF-PMD mode to function properly PASID
> > > > needs to be disabled for kernel 6.2.
> > > >
> > > > In this commit this issue is addressed and PASID is disabled by
> > > > writing a zero to PASID control register.
> > > >
> > > > Signed-off-by: Abdullah Sevincer <abdullah.sevincer at intel.com>
> > >
> > > > +       /* The current Linux kernel vfio driver does not expose PASID capability to
> > > > +        * users. It also enables PASID by default, which breaks DLB PF PMD. We have
> > > > +        * to use the hardcoded offset for now to disable PASID.
> > > > +        */
> > > > +       pasid_cap_offset = DLB2_PCI_PASID_CAP_OFFSET;
> > > > +
> > > > +       off = pasid_cap_offset + DLB2_PCI_PASID_CTRL;
> > >
> > > +++ additional folks.
> > >
> > > Is make sense to move this helper function to PCI common for
> > > disabling PASID for a PCI device so that other driver can use if
> > > needed as the implementation is not specific to DLB2.
> >
> > Yes, having a helper sounds like a first step (and we probably have
> > more helpers to add seeing how drivers tend to redefine non vendor
> > specific pci configs, but that's another story).
> 
> @Abdullah Sevincer  Please move the implementation to code PCI code.
> 
> >
> > Now, about PASID being enabled by default with Linux 6.2, is this
> > breaking of dlb PF something special? Or can we expect many (all?)
> > other devices to break too?
> > If so, maybe we should disable it in the pci common code.
> 
> @Abdullah Sevincer Is implicitly enabling SIOV based on PASID configuration DLB2 behavior or general PCI
> behavior that may affect other NIC's?

PASID capability is required for SIOV, but not needed for PF mode.  
It makes sense to disable PASID in any PF mode that uses the vfio-pci driver (which enables PASID by
Default since kernel 6.2).

> 
> >
> >
> > --
> > David Marchand
> >


More information about the dev mailing list