IOMMU Archive on
 help / color / Atom feed
From: Jacob Pan <>
	LKML <>,
	Joerg Roedel <>,
	David Woodhouse <>,
	Alex Williamson <>,
	Jean-Philippe Brucker <>
Cc: "Tian, Kevin" <>,
	Raj Ashok <>,
	Jonathan Cameron <>
Subject: [PATCH v2 0/4] User API for nested shared virtual address (SVA)
Date: Sat, 21 Sep 2019 17:07:46 -0700
Message-ID: <> (raw)

This set consists of IOMMU APIs to support SVA in the guest, a.k.a nested
SVA. As the complete SVA support is complex, we break down the enabling
effort into three stages:
1. PCI device direct assignment
2. Fault handling, especially page request service support
3. Mediated device assignment

Each stage includes common API and vendor specific IOMMU driver changes. This
series is the common uAPI for stage #1. It is intended to build consensus on
the interface which all vendors reply on.

This series is extracted from the complete stage1 set which includes VT-d code.

 - Use spinlock instead of mutex to protect ioasid custom allocators. This is
   to support callers in atomic context
 - Added more padding to guest PASID bind data for future extensions, suggested
   by Joerg.
After much thinking, I did not do name change from PASID to IOASID in the uAPI,
considering we have been using PASID in the rest of uAPIs. IOASID will remain
used within the kernel.

For more discussions lead to this series, checkout LPC 2019 VFIO/IOMMU/PCI
microconference materials.

Change log:
	- Addressed review comments by Jean on IOASID custom allocators, locking
	fix, misc control flow fix.
	- Fixed a compile error with missing header errno.h
	- Updated Jean-Philiippe's new email and updateded reviewed-by tag

Jacob Pan (2):
  iommu/ioasid: Add custom allocators
  iommu: Introduce guest PASID bind function

Jean-Philippe Brucker (1):
  iommu: Add I/O ASID allocator

Yi L Liu (1):
  iommu: Introduce cache_invalidate API

 drivers/iommu/Kconfig      |   4 +
 drivers/iommu/Makefile     |   1 +
 drivers/iommu/ioasid.c     | 422 +++++++++++++++++++++++++++++++++++++++++++++
 drivers/iommu/iommu.c      |  30 ++++
 include/linux/ioasid.h     |  76 ++++++++
 include/linux/iommu.h      |  36 ++++
 include/uapi/linux/iommu.h | 169 ++++++++++++++++++
 7 files changed, 738 insertions(+)
 create mode 100644 drivers/iommu/ioasid.c
 create mode 100644 include/linux/ioasid.h


iommu mailing list

             reply index

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-22  0:07 Jacob Pan [this message]
2019-09-22  0:07 ` [PATCH v2 1/4] iommu: Introduce cache_invalidate API Jacob Pan
2019-09-22  0:07 ` [PATCH v2 2/4] iommu: Add I/O ASID allocator Jacob Pan
2019-09-22  1:45   ` kbuild test robot
2019-09-22  0:07 ` [PATCH v2 3/4] iommu/ioasid: Add custom allocators Jacob Pan
2019-10-02 16:18   ` Jean-Philippe Brucker
2019-10-02 17:20     ` Jacob Pan
2019-09-22  0:07 ` [PATCH v2 4/4] iommu: Introduce guest PASID bind function Jacob Pan

Reply instructions:

You may reply publically 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:

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

  git send-email \ \ \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

IOMMU Archive on

Archives are clonable:
	git clone --mirror linux-iommu/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-iommu linux-iommu/ \
	public-inbox-index linux-iommu

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone