[PATCH v1] event/dlb2: add support for disabling PASID
Jerin Jacob
jerinjacobk at gmail.com
Thu Jun 8 07:38:25 CEST 2023
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.
> + if (rte_pci_read_config(pdev, &pasid_ctrl, 2, off) != 2)
> + pasid_ctrl = 0;
> +
> + if (pasid_ctrl) {
> + DLB2_INFO(dlb2_dev, "DLB2 disabling pasid...\n");
> +
> + pasid_ctrl = 0;
> + ret = rte_pci_write_config(pdev, &pasid_ctrl, 2, off);
> + if (ret != 2) {
> + DLB2_LOG_ERR("[%s()] failed to write the pcie config space at offset %d\n",
> + __func__, (int)off);
> + return ret;
> + }
> + }
> +
> return 0;
> }
>
> --
> 2.25.1
>
More information about the dev
mailing list