iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Jacob Pan <jacob.jun.pan@linux.intel.com>
To: Jacob Pan <jacob.pan.linux@gmail.com>
Cc: "Tian, Kevin" <kevin.tian@intel.com>,
	Raj Ashok <ashok.raj@intel.com>, Jonathan Corbet <corbet@lwn.net>,
	Jean-Philippe Brucker <jean-philippe@linaro.com>,
	Alex Williamson <alex.williamson@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Christoph Hellwig <hch@infradead.org>,
	iommu@lists.linux-foundation.org,
	David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH v8 0/7] IOMMU user API enhancement
Date: Tue, 8 Sep 2020 10:33:30 -0700	[thread overview]
Message-ID: <20200908103330.569cdcce@jacob-builder> (raw)
In-Reply-To: <1598898300-65475-1-git-send-email-jacob.jun.pan@linux.intel.com>

Hi Joerg, Alex, and all.

Just wondering if there are any more comments? We have discussed this
at LPC, there are other patches depending on this set.

Thanks,

Jacob

On Mon, 31 Aug 2020 11:24:53 -0700
Jacob Pan <jacob.pan.linux@gmail.com> wrote:

> IOMMU user API header was introduced to support nested DMA
> translation and related fault handling. The current UAPI data
> structures consist of three areas that cover the interactions between
> host kernel and guest:
>  - fault handling
>  - cache invalidation
>  - bind guest page tables, i.e. guest PASID
> 
> Future extensions are likely to support more architectures and vIOMMU
> features.
> 
> In the previous discussion, using user-filled data size and feature
> flags is made a preferred approach over a unified version number.
> https://lkml.org/lkml/2020/1/29/45
> 
> In addition to introduce argsz field to data structures, this
> patchset is also trying to document the UAPI design, usage, and
> extension rules. VT-d driver changes to utilize the new argsz field
> is included, VFIO usage is to follow.
> 
> This set is available at:
> https://github.com/jacobpan/linux.git vsva_v5.8_uapi_v8
> 
> Thanks,
> 
> Jacob
> 
> 
> Changelog:
> v8
> 	- Rebased to v5.9-rc2
> 	- Addressed review comments from Eric Auger
> 	  1. added a check for the unused vendor flags
> 	  2. commit message improvements
> v7
> 	- Added PASID data format enum for range checking
> 	- Tidy up based on reviews from Alex W.
> 	- Removed doc section for vIOMMU fault handling
> v6
> 	- Renamed all UAPI functions with iommu_uapi_ prefix
> 	- Replaced argsz maxsz checking with flag specific size checks
> 	- Documentation improvements based on suggestions by Eric
> Auger Replaced example code with a pointer to the actual code
> 	- Added more checks for illegal flags combinations
> 	- Added doc file to MAINTAINERS
> v5
> 	- Addjusted paddings in UAPI data to be 8 byte aligned
> 	- Do not clobber argsz in IOMMU core before passing on to
> vendor driver
> 	- Removed pr_warn_ for invalid UAPI data check, just return
> -EINVAL
> 	- Clarified VFIO responsibility in UAPI data handling
> 	- Use iommu_uapi prefix to differentiate APIs has in-kernel
> caller
> 	- Added comment for unchecked flags of invalidation
> granularity
> 	- Added example in doc to show vendor data checking
> 
> v4
> 	- Added checks of UAPI data for reserved fields, version, and
> flags.
> 	- Removed version check from vendor driver (vt-d)
> 	- Relaxed argsz check to match the UAPI struct size instead
> of variable union size
> 	- Updated documentation
> 
> v3:
> 	- Rewrote backward compatibility rule to support existing code
> 	  re-compiled with newer kernel UAPI header that runs on older
> 	  kernel. Based on review comment from Alex W.
> 	  https://lore.kernel.org/linux-iommu/20200611094741.6d118fa8@w520.home/
> 	- Take user pointer directly in UAPI functions. Perform argsz
> check and copy_from_user() in IOMMU driver. Eliminate the need for
> 	  VFIO or other upper layer to parse IOMMU data.
> 	- Create wrapper function for in-kernel users of UAPI
> functions v2:
> 	- Removed unified API version and helper
> 	- Introduced argsz for each UAPI data
> 	- Introduced UAPI doc
> 
> 
> Jacob Pan (7):
>   docs: IOMMU user API
>   iommu/uapi: Add argsz for user filled data
>   iommu/uapi: Introduce enum type for PASID data format
>   iommu/uapi: Use named union for user data
>   iommu/uapi: Rename uapi functions
>   iommu/uapi: Handle data and argsz filled by users
>   iommu/vt-d: Check UAPI data processed by IOMMU core
> 
>  Documentation/userspace-api/iommu.rst | 211
> ++++++++++++++++++++++++++++++++++
> MAINTAINERS                           |   1 +
> drivers/iommu/intel/iommu.c           |  25 ++--
> drivers/iommu/intel/svm.c             |  13 ++-
> drivers/iommu/iommu.c                 | 205
> +++++++++++++++++++++++++++++++--
> include/linux/iommu.h                 |  35 ++++--
> include/uapi/linux/iommu.h            |  25 ++-- 7 files changed, 470
> insertions(+), 45 deletions(-) create mode 100644
> Documentation/userspace-api/iommu.rst
> 

[Jacob Pan]
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

      parent reply	other threads:[~2020-09-08 17:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-31 18:24 [PATCH v8 0/7] IOMMU user API enhancement Jacob Pan
2020-08-31 18:24 ` [PATCH v8 1/7] docs: IOMMU user API Jacob Pan
2020-08-31 18:24 ` [PATCH v8 2/7] iommu/uapi: Add argsz for user filled data Jacob Pan
2020-08-31 18:24 ` [PATCH v8 3/7] iommu/uapi: Introduce enum type for PASID data format Jacob Pan
2020-08-31 18:24 ` [PATCH v8 4/7] iommu/uapi: Use named union for user data Jacob Pan
2020-08-31 18:24 ` [PATCH v8 5/7] iommu/uapi: Rename uapi functions Jacob Pan
2020-08-31 18:24 ` [PATCH v8 6/7] iommu/uapi: Handle data and argsz filled by users Jacob Pan
2020-09-03  9:06   ` Auger Eric
2020-09-08 22:59   ` Alex Williamson
2020-08-31 18:25 ` [PATCH v8 7/7] iommu/vt-d: Check UAPI data processed by IOMMU core Jacob Pan
2020-09-01  3:08   ` Lu Baolu
2020-09-03  8:56   ` Auger Eric
2020-09-08 17:33 ` Jacob Pan [this message]

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=20200908103330.569cdcce@jacob-builder \
    --to=jacob.jun.pan@linux.intel.com \
    --cc=alex.williamson@redhat.com \
    --cc=ashok.raj@intel.com \
    --cc=corbet@lwn.net \
    --cc=dwmw2@infradead.org \
    --cc=hch@infradead.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jacob.pan.linux@gmail.com \
    --cc=jean-philippe@linaro.com \
    --cc=kevin.tian@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    /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).