[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1580277724-66994-1-git-send-email-jacob.jun.pan@linux.intel.com>
Date: Tue, 28 Jan 2020 22:02:01 -0800
From: Jacob Pan <jacob.jun.pan@...ux.intel.com>
To: iommu@...ts.linux-foundation.org,
LKML <linux-kernel@...r.kernel.org>,
"Lu Baolu" <baolu.lu@...ux.intel.com>,
Joerg Roedel <joro@...tes.org>,
David Woodhouse <dwmw2@...radead.org>
Cc: "Yi Liu" <yi.l.liu@...el.com>,
"Tian, Kevin" <kevin.tian@...el.com>,
Raj Ashok <ashok.raj@...el.com>,
Alex Williamson <alex.williamson@...hat.com>,
"Christoph Hellwig" <hch@...radead.org>,
Jean-Philippe Brucker <jean-philippe@...aro.com>,
Jonathan Cameron <jic23@...nel.org>,
Eric Auger <eric.auger@...hat.com>,
Jacob Pan <jacob.jun.pan@...ux.intel.com>
Subject: [PATCH 0/3] IOMMU user API enhancement
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
Powered by blists - more mailing lists