DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Chen, Mike Ximing" <mike.ximing.chen@intel.com>
To: Chenbo Xia <chenbox@nvidia.com>,
	"Sevincer, Abdullah" <abdullah.sevincer@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"jerinj@marvell.com" <jerinj@marvell.com>,
	 "Richardson, Bruce" <bruce.richardson@intel.com>,
	"NBU-Contact-Thomas Monjalon (EXTERNAL)" <thomas@monjalon.net>,
	"Marchand, David" <david.marchand@redhat.com>,
	"nipun.gupta@amd.com" <nipun.gupta@amd.com>
Subject: RE: [PATCH v1] bus/pci: revise support PASID control
Date: Thu, 16 Nov 2023 17:43:12 +0000	[thread overview]
Message-ID: <IA0PR11MB7742FFCD36B8983A5A8914C6D9B0A@IA0PR11MB7742.namprd11.prod.outlook.com> (raw)
In-Reply-To: <32638DA6-5BAF-4935-BDAF-013950A1246E@nvidia.com>



> -----Original Message-----
> From: Chenbo Xia <chenbox@nvidia.com>
> Sent: Tuesday, November 14, 2023 8:54 PM
> To: Sevincer, Abdullah <abdullah.sevincer@intel.com>
> Cc: dev@dpdk.org; jerinj@marvell.com; Chen, Mike Ximing
> <mike.ximing.chen@intel.com>; Richardson, Bruce
> <bruce.richardson@intel.com>; NBU-Contact-Thomas Monjalon (EXTERNAL)
> <thomas@monjalon.net>; Marchand, David <david.marchand@redhat.com>;
> nipun.gupta@amd.com
> Subject: Re: [PATCH v1] bus/pci: revise support PASID control
> 
> On Nov 15, 2023, at 01:39, Sevincer, Abdullah <abdullah.sevincer@intel.com>
> wrote:
> >
> > External email: Use caution opening links or attachments
> >
> >
> >> +I don’t know about the details, so it means for different devices that support
> PASID, they have different offsets?
> >
> >> +Btw, Is this cap still not exposed to user space in latest kernel?
> >
> > Yes, may be different offsets for different devices.
> 
> But why? It’s not standard capability? In my understanding, standard cap should
> have the same offset definitions for all devices.

PASID is a part of extended capabilities. Its offset can be different for different devices.

> 
> > As of now it is not exposed to user. Bruce's test was on 6.2 generic
> > kernel (6.2.0-36-generic)
> 
> Will kernel plan to support that? I can see the related work was done by Intel but
> somehow it’s not merged into kernel. Could you give more information on this?
> 
Hi Chenbo,
As you may know there has been a lot of changes in iommu/vfio/SVA/pasid/SIOV 
support in Linux kernel recently. The PASID used to be disabled, but starting with
kernel 6.2 it is enabled in vfio-pci driver by default.  We did contact the kernel developers
on this issue. They seem to insist that enabling PASID is needed for whatever new features
they are developing. This breaks the DLB PF PMD as DLB HW requires the PASID to be
disable for PF to operate properly (otherwise the HW put DLB in a different mode). We 
will continue to talk to the kernel developers on this issue, but in the meantime would like
to provide this patch so that DPDK PF PMD can still work with latest kernels.

In term of exposing the PASID capability to the user space. We are aware of some patches
Submitted in conjunction to the changes mentioned above, for example, 
https://lkml.iu.edu/hypermail/linux/kernel/2309.3/02380.html
But we don’t know when and if it will be accepted into the kernel. Hopefully the patch will
be accepted so we don’t have to use the hard coded offset.

> If kernel does not want this to be exposed, it means userspace should not access
> this. No?
> 
The action (disabling PASID) only applies the targeted device. In the DLB PF PMD case,
the DPDK has full control of the device via vfio-pci.  It does not affect kernel and any
other device's operation.

Thanks
Mike
> /Chenbo


  reply	other threads:[~2023-11-16 17:43 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-06 17:05 [PATCH v7 0/2] *** Disable PASID for DLB Device *** Abdullah Sevincer
2023-11-06 17:05 ` [PATCH v7 1/2] bus/pci: support PASID control Abdullah Sevincer
2023-11-06 18:30   ` David Marchand
2023-11-06 18:50     ` Sevincer, Abdullah
2023-11-10  8:03       ` David Marchand
2023-11-13 15:51         ` Sevincer, Abdullah
2023-11-13 17:36           ` Sevincer, Abdullah
2023-11-13 17:27   ` [PATCH v1] bus/pci: revise " Abdullah Sevincer
2023-11-14 13:59     ` Chenbo Xia
2023-11-14 17:39       ` Sevincer, Abdullah
2023-11-15  1:53         ` Chenbo Xia
2023-11-16 17:43           ` Chen, Mike Ximing [this message]
2023-11-17  6:48             ` Chenbo Xia
2023-11-14 17:36     ` [PATCH v2] " Abdullah Sevincer
2023-11-17  6:55       ` Chenbo Xia
2023-11-21 15:50         ` Thomas Monjalon
2023-11-06 17:05 ` [PATCH v7 2/2] event/dlb2: fix disable PASID Abdullah Sevincer
2023-11-06 17:50 ` [PATCH v7 0/2] *** Disable PASID for DLB Device *** Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=IA0PR11MB7742FFCD36B8983A5A8914C6D9B0A@IA0PR11MB7742.namprd11.prod.outlook.com \
    --to=mike.ximing.chen@intel.com \
    --cc=abdullah.sevincer@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=chenbox@nvidia.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=nipun.gupta@amd.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).