All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vasant Hegde via iommu <iommu@lists.linux-foundation.org>
To: <iommu@lists.linux-foundation.org>
Cc: Vasant Hegde <vasant.hegde@amd.com>
Subject: [PATCH v1 0/7] iommu/amd: Add Generic IO Page Table Framework Support for v2 Page Table
Date: Fri, 3 Jun 2022 16:51:00 +0530	[thread overview]
Message-ID: <20220603112107.8603-1-vasant.hegde@amd.com> (raw)

This series introduces a new usage model for the v2 page table, where it
can be used to implement support for DMA-API by adopting the generic
IO page table framework.

One of the target usecases is to support nested IO page tables
where the guest uses the guest IO page table (v2) for translating
GVA to GPA, and the hypervisor uses the host I/O page table (v1) for
translating GPA to SPA. This is a pre-requisite for supporting the new
HW-assisted vIOMMU presented at the KVM Forum 2020.

  https://static.sched.com/hosted_files/kvmforum2020/26/vIOMMU%20KVM%20Forum%202020.pdf

The following components are introduced in this series:

- Part 1 (patch 1-4 and 6)
  Refactor the current IOMMU page table code to adopt the generic IO page
  table framework, and add AMD IOMMU Guest (v2) page table management code.

- Part 2 (patch 5)
  Add support for the AMD IOMMU Guest IO Protection feature (GIOV)
  where requests from the I/O device without a PASID are treated as
  if they have PASID of 0.

- Part 3 (patch 7)
  Introduce new "amd_iommu_pgtable" command-line to allow users
  to select the mode of operation (v1 or v2).

See AMD I/O Virtualization Technology Specification for more detail.

  http://www.amd.com/system/files/TechDocs/48882_IOMMU_3.05_PUB.pdf

Note:
  This patchset is based on top of "iommu/amd: Add multiple PCI segments support" patchset [1].

[1] https://lore.kernel.org/linux-iommu/20220511072141.15485-1-vasant.hegde@amd.com/T/#t

Thanks,
Vasant


Changes from RFC -> v1:
  - Addressed review comments from Joerg
  - Reimplemented v2 page table

RFC patchset : https://lore.kernel.org/linux-iommu/20210312090411.6030-1-suravee.suthikulpanit@amd.com/T/#t

Suravee Suthikulpanit (5):
  iommu/amd: Refactor amd_iommu_domain_enable_v2
  iommu/amd: Update sanity check when enable PRI/ATS
  iommu/amd: Add support for Guest IO protection
  iommu/amd: Add support for using AMD IOMMU v2 page table for DMA-API
  iommu/amd: Introduce amd_iommu_pgtable command-line option

Vasant Hegde (2):
  iommu/amd: Fix sparse warning
  iommu/amd: Initial support for AMD IOMMU v2 page table

 .../admin-guide/kernel-parameters.txt         |   6 +
 drivers/iommu/amd/Makefile                    |   2 +-
 drivers/iommu/amd/amd_iommu_types.h           |   8 +-
 drivers/iommu/amd/init.c                      |  27 +-
 drivers/iommu/amd/io_pgtable_v2.c             | 407 ++++++++++++++++++
 drivers/iommu/amd/iommu.c                     |  90 ++--
 drivers/iommu/io-pgtable.c                    |   1 +
 include/linux/io-pgtable.h                    |   2 +
 8 files changed, 516 insertions(+), 27 deletions(-)
 create mode 100644 drivers/iommu/amd/io_pgtable_v2.c

-- 
2.27.0

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

             reply	other threads:[~2022-06-03 11:21 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-03 11:21 Vasant Hegde via iommu [this message]
2022-06-03 11:21 ` [PATCH v1 1/7] iommu/amd: Refactor amd_iommu_domain_enable_v2 Vasant Hegde via iommu
2022-06-03 11:21 ` [PATCH v1 2/7] iommu/amd: Update sanity check when enable PRI/ATS Vasant Hegde via iommu
2022-06-03 11:21 ` [PATCH v1 3/7] iommu/amd: Fix sparse warning Vasant Hegde via iommu
2022-06-23  8:03   ` Joerg Roedel
2022-06-23  9:42     ` Robin Murphy
2022-06-23 11:30       ` Joerg Roedel
2022-06-27 10:29       ` Vasant Hegde via iommu
2022-07-13  4:07         ` Vasant Hegde
2022-07-15 11:32           ` Robin Murphy
2022-06-03 11:21 ` [PATCH v1 4/7] iommu/amd: Initial support for AMD IOMMU v2 page table Vasant Hegde via iommu
2022-06-23  8:09   ` Joerg Roedel
2022-06-03 11:21 ` [PATCH v1 5/7] iommu/amd: Add support for Guest IO protection Vasant Hegde via iommu
2022-06-03 11:21 ` [PATCH v1 6/7] iommu/amd: Add support for using AMD IOMMU v2 page table for DMA-API Vasant Hegde via iommu
2022-06-03 11:21 ` [PATCH v1 7/7] iommu/amd: Introduce amd_iommu_pgtable command-line option Vasant Hegde via iommu
2022-06-23  8:12   ` Joerg Roedel
2022-06-28  7:53     ` Vasant Hegde via iommu
2022-07-06  9:11       ` Joerg Roedel
2022-06-23  8:15 ` [PATCH v1 0/7] iommu/amd: Add Generic IO Page Table Framework Support for v2 Page Table Joerg Roedel
2022-06-28  9:05   ` Vasant Hegde via iommu
2022-07-06  9:14     ` Joerg Roedel
2022-07-13  3:07       ` Suthikulpanit, Suravee

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=20220603112107.8603-1-vasant.hegde@amd.com \
    --to=iommu@lists.linux-foundation.org \
    --cc=vasant.hegde@amd.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.