On Thu, Jun 8, 2023 at 7:38 AM Jerin Jacob <jerinjac...@gmail.com> wrote: > > On Thu, Jun 8, 2023 at 2:31 AM Abdullah Sevincer > <abdullah.sevin...@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.sevin...@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). 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. -- David Marchand