All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH v2 0/5] Add virtio-iommu driver
@ 2017-11-17 18:52 ` Jean-Philippe Brucker
  0 siblings, 0 replies; 50+ messages in thread
From: Jean-Philippe Brucker @ 2017-11-17 18:52 UTC (permalink / raw)
  To: iommu, devel, linux-acpi, kvm, kvmarm, virtualization, virtio-dev
  Cc: jasowang, mst, lv.zheng, robert.moore, joro, alex.williamson,
	sudeep.holla, hanjun.guo, lorenzo.pieralisi, lenb, rjw,
	marc.zyngier, robin.murphy, will.deacon, eric.auger,
	bharat.bhushan, Jayachandran.Nair, ashok.raj, peterx

Implement the virtio-iommu driver following version 0.5 of the
specification [1]. Previous version of this code was sent back in April
[2], implementing the first public RFC. Since then there has been lots of
progress and discussion on the specification side, and I think the driver
is in a good shape now.

The reason patches 1-3 are only RFC is that I'm waiting on feedback from
the Virtio TC to reserve a device ID.

List of changes since previous RFC:
* Add per-endpoint probe request, for hardware MSI and reserved regions.
* Add a virtqueue for the device to report translation faults. Only
  non-recoverable ones at the moment.
* Removed the iommu_map_sg specialization for now, because none of the
  device drivers I use for testing (virtio, ixgbe and internal DMA
  engines) seem to use map_sg. This kind of feature is a lot more
  interesting when accompanied by benchmark numbers, and can be added back
  during future optimization work.
* Many fixes and cleanup

The driver works out of the box on DT-based systems, but ACPI support
still needs to be tested and discussed. In the specification I proposed
IORT tables as a nice candidate for describing the virtual topology.
Patches 4 and 5 propose small changes to the IORT driver for
instantiating a paravirtualized IOMMU. The IORT node is described in the
specification [1]. x86 support will also require some hacks since the
driver is based on the IOMMU DMA ops, that x86 doesn't use.

Eric's latest QEMU device [3] works with v0.4. For the moment you can use
the kvmtool device [4] to test v0.5 on arm64, and inject arbitrary fault
with the debug tool. The driver can also be pulled from my Linux tree [5].

[1] https://www.spinics.net/lists/kvm/msg157402.html
[2] https://patchwork.kernel.org/patch/9670273/
[3] https://lists.gnu.org/archive/html/qemu-arm/2017-09/msg00413.html
[4] git://linux-arm.org/kvmtool-jpb.git virtio-iommu/base
[5] git://linux-arm.org/linux-jpb.git virtio-iommu/v0.5-dev

Jean-Philippe Brucker (5):
  iommu: Add virtio-iommu driver
  iommu/virtio-iommu: Add probe request
  iommu/virtio-iommu: Add event queue
  ACPI/IORT: Support paravirtualized IOMMU
  ACPI/IORT: Move IORT to the ACPI folder

 drivers/acpi/Kconfig              |    3 +
 drivers/acpi/Makefile             |    1 +
 drivers/acpi/arm64/Kconfig        |    3 -
 drivers/acpi/arm64/Makefile       |    1 -
 drivers/acpi/{arm64 => }/iort.c   |   95 ++-
 drivers/iommu/Kconfig             |   12 +
 drivers/iommu/Makefile            |    1 +
 drivers/iommu/virtio-iommu.c      | 1219 +++++++++++++++++++++++++++++++++++++
 include/acpi/actbl2.h             |   18 +-
 include/uapi/linux/virtio_ids.h   |    1 +
 include/uapi/linux/virtio_iommu.h |  195 ++++++
 11 files changed, 1537 insertions(+), 12 deletions(-)
 rename drivers/acpi/{arm64 => }/iort.c (92%)
 create mode 100644 drivers/iommu/virtio-iommu.c
 create mode 100644 include/uapi/linux/virtio_iommu.h

-- 
2.14.3


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

end of thread, other threads:[~2018-01-19 17:23 UTC | newest]

Thread overview: 50+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-17 18:52 [RFC PATCH v2 0/5] Add virtio-iommu driver Jean-Philippe Brucker
2017-11-17 18:52 ` [virtio-dev] " Jean-Philippe Brucker
2017-11-17 18:52 ` [RFC PATCH v2 1/5] iommu: " Jean-Philippe Brucker
2017-11-17 18:52   ` [virtio-dev] " Jean-Philippe Brucker
2017-11-29 15:17   ` Jean-Philippe Brucker
2017-11-29 15:17   ` Jean-Philippe Brucker
2017-11-29 15:17     ` Jean-Philippe Brucker
2018-01-15 15:12   ` Auger Eric
2018-01-15 15:12     ` [virtio-dev] " Auger Eric
2018-01-16 17:45     ` Jean-Philippe Brucker
2018-01-16 17:45     ` Jean-Philippe Brucker
2018-01-16 17:45       ` [virtio-dev] " Jean-Philippe Brucker
2018-01-15 15:12   ` Auger Eric
2017-11-17 18:52 ` Jean-Philippe Brucker
2017-11-17 18:52 ` [RFC PATCH v2 2/5] iommu/virtio-iommu: Add probe request Jean-Philippe Brucker
2017-11-17 18:52   ` [virtio-dev] " Jean-Philippe Brucker
2018-01-16  9:25   ` Auger Eric
2018-01-16  9:25     ` [virtio-dev] " Auger Eric
2018-01-16 17:46     ` Jean-Philippe Brucker
2018-01-16 17:46     ` Jean-Philippe Brucker
2018-01-16 17:46       ` [virtio-dev] " Jean-Philippe Brucker
2018-01-16  9:25   ` Auger Eric
2018-01-16 23:26   ` Auger Eric
2018-01-16 23:26     ` [virtio-dev] " Auger Eric
2018-01-19 16:21     ` Jean-Philippe Brucker
2018-01-19 16:21       ` [virtio-dev] " Jean-Philippe Brucker
2018-01-19 17:22       ` Auger Eric
2018-01-19 17:22       ` Auger Eric
2018-01-19 17:22         ` [virtio-dev] " Auger Eric
2018-01-19 16:21     ` Jean-Philippe Brucker
2018-01-16 23:26   ` Auger Eric
2017-11-17 18:52 ` Jean-Philippe Brucker
2017-11-17 18:52 ` [RFC PATCH v2 3/5] iommu/virtio-iommu: Add event queue Jean-Philippe Brucker
2017-11-17 18:52   ` [virtio-dev] " Jean-Philippe Brucker
2018-01-16 10:10   ` Auger Eric
2018-01-16 10:10     ` [virtio-dev] " Auger Eric
2018-01-16 17:48     ` Jean-Philippe Brucker
2018-01-16 17:48       ` [virtio-dev] " Jean-Philippe Brucker
2018-01-16 17:48     ` Jean-Philippe Brucker
2018-01-16 10:10   ` Auger Eric
2017-11-17 18:52 ` Jean-Philippe Brucker
2017-11-17 18:52 ` [RFC PATCH v2 4/5] ACPI/IORT: Support paravirtualized IOMMU Jean-Philippe Brucker
2017-11-17 18:52 ` Jean-Philippe Brucker
2017-11-17 18:52   ` [virtio-dev] " Jean-Philippe Brucker
2017-11-29 15:17   ` Jean-Philippe Brucker
2017-11-29 15:17   ` Jean-Philippe Brucker
2017-11-29 15:17     ` Jean-Philippe Brucker
2017-11-17 18:52 ` [RFC PATCH v2 5/5] ACPI/IORT: Move IORT to the ACPI folder Jean-Philippe Brucker
2017-11-17 18:52   ` [virtio-dev] " Jean-Philippe Brucker
2017-11-17 18:52 ` 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.