All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] iommu/virtio: Add identity domains
@ 2021-10-13 12:10 ` Jean-Philippe Brucker
  0 siblings, 0 replies; 38+ messages in thread
From: Jean-Philippe Brucker @ 2021-10-13 12:10 UTC (permalink / raw)
  To: virtualization, iommu
  Cc: Jean-Philippe Brucker, kevin.tian, mst, sebastien.boeuf, will,
	jasowang

Support identity domains, allowing to only enable IOMMU protection for a
subset of endpoints (those assigned to userspace, for example). Users
may enable identity domains at compile time
(CONFIG_IOMMU_DEFAULT_PASSTHROUGH), boot time (iommu.passthrough=1) or
runtime (/sys/kernel/iommu_groups/*/type = identity).

Patches 1-2 support identity domains using the optional
VIRTIO_IOMMU_F_BYPASS_CONFIG feature. The feature bit is not yet in the
spec, see [1] for the latest proposal.

Patches 3-5 add a fallback to identity mappings, when the feature is not
supported.

Note that this series doesn't touch the global bypass bit added by
VIRTIO_IOMMU_F_BYPASS_CONFIG. All endpoints managed by the IOMMU should
be attached to a domain, so global bypass isn't in use after endpoints
are probed. Before that, the global bypass policy is decided by the
hypervisor and firmware. So I don't think Linux needs to touch the
global bypass bit, but there are some patches available on my
virtio-iommu/bypass branch [2] to test it.

QEMU patches are on my virtio-iommu/bypass branch [3] (and the list)

[1] https://www.mail-archive.com/virtio-dev@lists.oasis-open.org/msg07898.html
[2] https://jpbrucker.net/git/linux/log/?h=virtio-iommu/bypass
[3] https://jpbrucker.net/git/qemu/log/?h=virtio-iommu/bypass

Jean-Philippe Brucker (5):
  iommu/virtio: Add definitions for VIRTIO_IOMMU_F_BYPASS_CONFIG
  iommu/virtio: Support bypass domains
  iommu/virtio: Sort reserved regions
  iommu/virtio: Pass end address to viommu_add_mapping()
  iommu/virtio: Support identity-mapped domains

 include/uapi/linux/virtio_iommu.h |   8 ++-
 drivers/iommu/virtio-iommu.c      | 113 +++++++++++++++++++++++++-----
 2 files changed, 101 insertions(+), 20 deletions(-)

-- 
2.33.0

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

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

end of thread, other threads:[~2021-10-22 12:26 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-13 12:10 [PATCH 0/5] iommu/virtio: Add identity domains Jean-Philippe Brucker
2021-10-13 12:10 ` Jean-Philippe Brucker
2021-10-13 12:10 ` [PATCH 1/5] iommu/virtio: Add definitions for VIRTIO_IOMMU_F_BYPASS_CONFIG Jean-Philippe Brucker
2021-10-13 12:10   ` Jean-Philippe Brucker
2021-10-13 12:10 ` [PATCH 2/5] iommu/virtio: Support bypass domains Jean-Philippe Brucker
2021-10-13 12:10   ` Jean-Philippe Brucker
2021-10-14  3:25   ` Tian, Kevin
2021-10-14  3:25     ` Tian, Kevin
2021-10-14  3:27   ` Tian, Kevin
2021-10-14  3:27     ` Tian, Kevin
2021-10-13 12:10 ` [PATCH 3/5] iommu/virtio: Sort reserved regions Jean-Philippe Brucker
2021-10-13 12:10   ` Jean-Philippe Brucker
2021-10-13 12:10 ` [PATCH 4/5] iommu/virtio: Pass end address to viommu_add_mapping() Jean-Philippe Brucker
2021-10-13 12:10   ` Jean-Philippe Brucker
2021-10-13 12:10 ` [PATCH 5/5] iommu/virtio: Support identity-mapped domains Jean-Philippe Brucker
2021-10-13 12:10   ` Jean-Philippe Brucker
2021-10-14  3:00 ` [PATCH 0/5] iommu/virtio: Add identity domains Tian, Kevin
2021-10-14  3:00   ` Tian, Kevin
2021-10-18 11:37   ` joro
2021-10-18 11:37     ` joro
2021-10-21  6:42     ` Tian, Kevin
2021-10-21  6:42       ` Tian, Kevin
2021-10-18 15:23   ` Jean-Philippe Brucker
2021-10-18 15:23     ` Jean-Philippe Brucker
2021-10-18 15:34     ` Michael S. Tsirkin
2021-10-18 15:34       ` Michael S. Tsirkin
2021-10-19  1:22       ` Jason Wang
2021-10-19  1:22         ` Jason Wang
2021-10-19 15:31         ` Jean-Philippe Brucker
2021-10-19 15:31           ` Jean-Philippe Brucker
2021-10-21  6:45     ` Tian, Kevin
2021-10-21  6:45       ` Tian, Kevin
2021-10-21  6:48 ` Tian, Kevin
2021-10-21  6:48   ` Tian, Kevin
2021-10-22 10:16 ` Michael S. Tsirkin
2021-10-22 10:16   ` Michael S. Tsirkin
2021-10-22 12:26   ` Jean-Philippe Brucker
2021-10-22 12:26     ` Jean-Philippe Brucker

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.