iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Replace Intel SVM with IOMMU SVA APIs
@ 2020-02-24 23:26 Jacob Pan
  2020-02-24 23:26 ` [PATCH 1/2] iommu/vt-d: report SVA feature with generic flag Jacob Pan
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Jacob Pan @ 2020-02-24 23:26 UTC (permalink / raw)
  To: iommu, LKML, Lu Baolu, Joerg Roedel, David Woodhouse
  Cc: Tian, Kevin, Dave Jiang, Raj Ashok, Jean-Philippe Brucker

Shared virtual address (SVA) capable accelerator device drivers on Intel
platform are required to call VT-d driver directly to bind a device with
a given address space. It is conceptually incorrect with the following
reasons:
- A device driver is bypassing IOMMU generic layer
- Device driver cannot be reused across architectures
- Opens a door to duplicated code

Generic SVA APIs was introduced[1] and partially merged upstream which
created a common ground for vendor IOMMU driver to consolidate SVA code.

On the other hand, Uacce (Unified/User-space-access-intended Accelerator
Framework) [2] is emerging to be a generic user-kernel interface for SVA
capable devices.

IOMMU generic SVA APIs are used by Uacce. Therefore, replacing VT-d SVM
code with IOMMU SVA APIs are required by device drivers want to use
Uacce.

The features below will continue to work but are not included in this patch
in that they are handled mostly within the IOMMU subsystem.
- IO page fault
- mmu notifier

Consolidation of the above will come after generic IOMMU sva code[1].
There should not be any changes needed for accelerator device drivers
during this time.

References:
[1] http://jpbrucker.net/sva/
[2] https://lkml.org/lkml/2020/1/15/604

Jacob Pan (2):
  iommu/vt-d: Report SVA feature with generic flag
  iommu/vt-d: Replace intel SVM APIs with generic SVA APIs

 drivers/iommu/intel-iommu.c |   8 +++
 drivers/iommu/intel-svm.c   | 123 ++++++++++++++++++++++++--------------------
 include/linux/intel-iommu.h |   7 +++
 include/linux/intel-svm.h   |  85 ------------------------------
 4 files changed, 83 insertions(+), 140 deletions(-)

-- 
2.7.4

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-03-24 15:48 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-24 23:26 [PATCH 0/2] Replace Intel SVM with IOMMU SVA APIs Jacob Pan
2020-02-24 23:26 ` [PATCH 1/2] iommu/vt-d: report SVA feature with generic flag Jacob Pan
2020-02-24 23:34   ` Jacob Pan
2020-02-24 23:26 ` [PATCH 1/2] iommu/vt-d: Report " Jacob Pan
2020-03-20  9:30   ` Jean-Philippe Brucker
2020-02-24 23:26 ` [PATCH 2/2] iommu/vt-d: Replace intel SVM APIs with generic SVA APIs Jacob Pan
2020-02-25 19:10   ` Christoph Hellwig
2020-02-26  7:31     ` Jean-Philippe Brucker
2020-03-18 20:13   ` Jacob Pan
2020-03-20  9:29   ` Jean-Philippe Brucker
2020-03-20  9:43     ` Jean-Philippe Brucker
2020-03-23 23:01     ` Raj, Ashok
2020-03-24  1:42       ` Lu Baolu
2020-03-24 15:53     ` Jacob Pan

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).