From: Jacob Pan <jacob.jun.pan@linux.intel.com>
To: iommu@lists.linux-foundation.org,
LKML <linux-kernel@vger.kernel.org>,
"Lu Baolu" <baolu.lu@linux.intel.com>,
Joerg Roedel <joro@8bytes.org>,
David Woodhouse <dwmw2@infradead.org>
Cc: "Yi Liu" <yi.l.liu@intel.com>,
"Tian, Kevin" <kevin.tian@intel.com>,
Raj Ashok <ashok.raj@intel.com>,
Alex Williamson <alex.williamson@redhat.com>,
"Christoph Hellwig" <hch@infradead.org>,
Jean-Philippe Brucker <jean-philippe@linaro.com>,
Jonathan Cameron <jic23@kernel.org>,
Eric Auger <eric.auger@redhat.com>,
Jacob Pan <jacob.jun.pan@linux.intel.com>
Subject: [PATCH 0/3] IOMMU user API enhancement
Date: Tue, 28 Jan 2020 22:02:01 -0800 [thread overview]
Message-ID: <1580277724-66994-1-git-send-email-jacob.jun.pan@linux.intel.com> (raw)
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
With future extension in mind, the UAPI structures passed from user to kernel
always starts with a mandatory version field (u32). While this is flexible
for extensions of individual structures, it is difficult to maintain support
of combinations of different version numbers.
This patchset introduces a unified UAPI version number that governs all the
UAPI data structure versions. When userspace query UAPI version for check on
compatibility, a single match would be sufficient.
After UAPI version check, users such as VFIO can also retrieve the matching
data structure size based on version and type. Kernel IOMMU UAPI support is
always backward compatible. Data structures are also only open to extension
and closed to modifications.
The introduction of UAPI version does not change the existing UAPI but rather
simplify the data structure version and size matching.
Thanks,
Jacob
Jacob Pan (3):
iommu/uapi: Define uapi version and capabilities
iommu/uapi: Use unified UAPI version
iommu/uapi: Add helper function for size lookup
drivers/iommu/intel-iommu.c | 3 ++-
drivers/iommu/intel-svm.c | 2 +-
drivers/iommu/iommu.c | 25 +++++++++++++++++++-
include/linux/iommu.h | 6 +++++
include/uapi/linux/iommu.h | 57 ++++++++++++++++++++++++++++++++++++++++-----
5 files changed, 84 insertions(+), 9 deletions(-)
--
2.7.4
next reply other threads:[~2020-01-29 5:57 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-29 6:02 Jacob Pan [this message]
2020-01-29 6:02 ` [PATCH 1/3] iommu/uapi: Define uapi version and capabilities Jacob Pan
2020-02-06 10:14 ` Auger Eric
2020-02-06 18:22 ` Jacob Pan
2020-01-29 6:02 ` [PATCH 2/3] iommu/uapi: Use unified UAPI version Jacob Pan
2020-01-29 6:02 ` [PATCH 3/3] iommu/uapi: Add helper function for size lookup Jacob Pan
2020-01-29 21:40 ` Alex Williamson
2020-01-29 22:19 ` Alex Williamson
2020-01-31 19:51 ` Jacob Pan
2020-01-31 23:51 ` Jacob Pan
2020-02-03 18:27 ` Alex Williamson
2020-02-03 20:41 ` Jacob Pan
2020-02-03 21:12 ` Alex Williamson
2020-02-03 22:41 ` Jacob Pan
2020-02-06 10:14 ` Auger Eric
2020-02-07 8:47 ` Jean-Philippe Brucker
2020-01-31 17:56 ` Jacob Pan
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=1580277724-66994-1-git-send-email-jacob.jun.pan@linux.intel.com \
--to=jacob.jun.pan@linux.intel.com \
--cc=alex.williamson@redhat.com \
--cc=ashok.raj@intel.com \
--cc=baolu.lu@linux.intel.com \
--cc=dwmw2@infradead.org \
--cc=eric.auger@redhat.com \
--cc=hch@infradead.org \
--cc=iommu@lists.linux-foundation.org \
--cc=jean-philippe@linaro.com \
--cc=jic23@kernel.org \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=yi.l.liu@intel.com \
/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).