The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: yaxing guo <guoyaxing@bosc.ac.cn>
Cc: linux-kernel@vger.kernel.org, wangran@bosc.ac.cn,
	zhangjian@bosc.ac.cn, anxu@bosc.ac.cn
Subject: Re: [PATCH v2 3/3] doc: Add ABI documentation for uio_pci_sva driver sysfs attributes
Date: Fri, 26 Sep 2025 08:03:57 +0200	[thread overview]
Message-ID: <2025092658-reenact-nastiness-a195@gregkh> (raw)
In-Reply-To: <dbc55234-58b2-4d3f-8d0e-e78e148b9944@bosc.ac.cn>

On Fri, Sep 26, 2025 at 01:57:58PM +0800, yaxing guo wrote:
> Hi, Greg,
> 
> Thank you for your feedback.
> 
> On 9/25/2025 8:32 PM, Greg KH wrote:
> > On Thu, Sep 25, 2025 at 06:40:18PM +0800, Yaxing Guo wrote:
> > > Add ABI documentation for the sysfs interface provided by the
> > > uio_pci_sva driver, specifically the 'pasid' attribute.
> > > 
> > > The 'pasid' attribute exposes the Process Address Space ID (PASID)
> > > assigned by the IOMMU to the device for use with Shared Virtual
> > > Addressing (SVA). User-space UIO applications read this attribute
> > > to obtain the PASID and program it into the device's configuration
> > > registers, enabling the device to perform DMA using user-space
> > > virtual addresses.
> > > 
> > > This attribute appears under:
> > > /sys/bus/pci/drivers/uio_pci_sva/<pci_dev>/pasid
> > > 
> > > Signed-off-by: Yaxing Guo <guoyaxing@bosc.ac.cn>
> > > ---
> > >   .../ABI/testing/sysfs-driver-uio_pci_sva-pasid    | 15 +++++++++++++++
> > >   1 file changed, 15 insertions(+)
> > >   create mode 100644 Documentation/ABI/testing/sysfs-driver-uio_pci_sva-pasid
> > > 
> > > diff --git a/Documentation/ABI/testing/sysfs-driver-uio_pci_sva-pasid b/Documentation/ABI/testing/sysfs-driver-uio_pci_sva-pasid
> > > new file mode 100644
> > > index 000000000000..a6afa8c2775c
> > > --- /dev/null
> > > +++ b/Documentation/ABI/testing/sysfs-driver-uio_pci_sva-pasid
> > > @@ -0,0 +1,15 @@
> > > +What:		/sys/bus/pci/drivers/uio_pci_sva/<pci_dev>/pasid
> > > +Date:		September 2025
> > > +Contact:	Yaxing Guo <guoyaxing@bosc.ac.cn>
> > > +Description:
> > > +		Process Address Space ID (PASID) assigned by IOMMU driver to
> > > +		the device for use witch Shared Virtual Addressing (SVA).
> > 
> > "with", not "witch", right?
> > 
> > > +
> > > +		This read-only attribute exposes the PASID allocated by the
> > > +		IOMMU driver during sva device binding.
> > > +
> > > +		User-space UIO applications must read this attribute to
> > > +		obtain the PASID and program it into the device's configuration
> > > +		registers. This enables the device to perform DMA using
> > > +		user-space virtual address, with address translation handled
> > > +		by IOMMU.
> > 
> > What is a PASID?  What format is it in?
> > 
> > How can it then be used in userspace?  What is a "device configuration
> > register" and what api uses it?
> > 
> > And where is the userspace code that interacts with all of this?
> > 
> 
> The UIO userspace code is inherently tied to the hardware and its
> register layout. Therefore, there isn't a single open-source userspace
> implementation(In my job, this is for a simple FPAG-based test device used
> for iommu-sva functionality validation).

That's ok to publish it, userspace UIO drivers need to also be released
under an open license as they are explicitly tied to the kernel
interface.  Without that, it's hard to judge if the api is correct or
not.

thanks,

greg k-h

  reply	other threads:[~2025-09-26  6:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-25 10:40 [PATCH v2 1/3] uio: Add SVA support for PCI devices via uio_pci_generic_sva.c Yaxing Guo
2025-09-25 10:40 ` [PATCH v2 3/3] doc: Add ABI documentation for uio_pci_sva driver sysfs attributes Yaxing Guo
2025-09-25 12:32   ` Greg KH
2025-09-26  5:57     ` yaxing guo
2025-09-26  6:03       ` Greg KH [this message]
2025-09-25 12:29 ` [PATCH v2 1/3] uio: Add SVA support for PCI devices via uio_pci_generic_sva.c Greg KH
     [not found] ` <20250925104018.57053-2-guoyaxing@bosc.ac.cn>
2025-09-25 12:30   ` [PATCH v2 2/3] uio: Add Kconfig and Makefile support for UIO_PCI_GENERIC_SVA Greg KH
2025-09-25 12:30   ` Greg KH

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=2025092658-reenact-nastiness-a195@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=anxu@bosc.ac.cn \
    --cc=guoyaxing@bosc.ac.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wangran@bosc.ac.cn \
    --cc=zhangjian@bosc.ac.cn \
    /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