Discussion of the implementations of VIRTIO specification
 help / color / mirror / Atom feed
* [virtio-dev] [PATCH 0/4] Add virtio-iommu driver
@ 2018-02-14 14:53 Jean-Philippe Brucker
  2018-02-14 14:53 ` [virtio-dev] [PATCH 1/4] iommu: " Jean-Philippe Brucker
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Jean-Philippe Brucker @ 2018-02-14 14:53 UTC (permalink / raw)
  To: iommu, kvm, virtualization, virtio-dev, kvmarm
  Cc: joro, alex.williamson, mst, jasowang, marc.zyngier, robin.murphy,
	will.deacon, lorenzo.pieralisi, eric.auger, eric.auger.pro,
	peterx, bharat.bhushan, tnowicki, jayachandran.nair, kevin.tian,
	jintack

Implement the virtio-iommu driver following version 0.6 of the
specification [1]. Previous version, RFCv2, was sent in November [2].
This version addresses Eric's comments and changes the device number.
(Since last week I also tested and fixed the probe/release functions,
they now use devm properly.)

I did not include ACPI support because the next IORT specifications
isn't ready yet (even though the virtio-iommu spec describes the node
format, a new node type has to be allocated). Therefore only device-tree
guests are supported for the moment but the x86 prototype, on branch
virtio-iommu/devel, doesn't add much complexity.

	git://linux-arm.org/linux-jpb.git virtio-iommu/v0.6

Test it with Eric's latest QEMU device [3], for example with the
following command-line:

$ qemu-system-aarch64 -M virt -cpu cortex-a57 -nographic
	-kernel Image -append 'console=ttyAMA0 root=/dev/vda rw'
	-device virtio-iommu-device
	-device virtio-blk-pci,iommu_platform,disable-legacy=on,drive=hd0
	-drive if=none,file=rootfs.bin,id=hd0

You can also try the kvmtool device [4]. For example on AMD Seattle I
use the following commands to boot a guest with all devices behind a
virtio-iommu, then display mapping stats.

$ lkvm run -k Image --irqchip gicv2m --console virtio --vfio-pci 01:00.0
	--viommu vfio --viommu virtio
$ lkvm debug -a -i stats

[1] [RFC] virtio-iommu version 0.6
    https://www.spinics.net/lists/linux-virtualization/msg32628.html
[2] [RFC PATCH v2 0/5] Add virtio-iommu driver
    https://www.spinics.net/lists/kvm/msg159047.html
[3] [RFC v6 00/22] VIRTIO-IOMMU device
    http://lists.gnu.org/archive/html/qemu-arm/2018-02/msg00274.html
[4] git://linux-arm.org/kvmtool-jpb.git virtio-iommu/v0.6

Jean-Philippe Brucker (4):
  iommu: Add virtio-iommu driver
  iommu/virtio: Add probe request
  iommu/virtio: Add event queue
  vfio: Allow type-1 IOMMU instantiation with a virtio-iommu

 MAINTAINERS                       |    6 +
 drivers/iommu/Kconfig             |   11 +
 drivers/iommu/Makefile            |    1 +
 drivers/iommu/virtio-iommu.c      | 1220 +++++++++++++++++++++++++++++++++++++
 drivers/vfio/Kconfig              |    2 +-
 include/uapi/linux/virtio_ids.h   |    1 +
 include/uapi/linux/virtio_iommu.h |  171 ++++++
 7 files changed, 1411 insertions(+), 1 deletion(-)
 create mode 100644 drivers/iommu/virtio-iommu.c
 create mode 100644 include/uapi/linux/virtio_iommu.h

-- 
2.16.1


---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


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

end of thread, other threads:[~2018-04-11 18:35 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-14 14:53 [virtio-dev] [PATCH 0/4] Add virtio-iommu driver Jean-Philippe Brucker
2018-02-14 14:53 ` [virtio-dev] [PATCH 1/4] iommu: " Jean-Philippe Brucker
     [not found]   ` <417e1617-e5ff-7b13-64e3-a8a98d30bcb9@semihalf.com>
2018-02-20 11:30     ` [virtio-dev] " Jean-Philippe Brucker
     [not found]   ` <201802220455.lMEb6LLi%fengguang.wu@intel.com>
2018-02-22 11:04     ` Jean-Philippe Brucker
2018-02-27 14:47       ` Michael S. Tsirkin
2018-03-21  6:43   ` [virtio-dev] " Tian, Kevin
2018-03-21 13:14     ` [virtio-dev] " Jean-Philippe Brucker
     [not found]       ` <739fbfdf-1651-8036-367a-52940b93dee6@arm.com>
2018-03-22 10:06         ` [virtio-dev] " Tian, Kevin
     [not found]         ` <AADFC41AFE54684AB9EE6CBC0274A5D19108DC42@SHSMSX101.ccr.corp.intel.com>
2018-03-23  8:27           ` Tian, Kevin
2018-04-11 18:35             ` [virtio-dev] " Jean-Philippe Brucker
     [not found]   ` <d0cfe602-f6e8-2d6e-0942-23012f3facef@arm.com>
2018-04-11 18:33     ` Jean-Philippe Brucker
2018-02-14 14:53 ` [virtio-dev] [PATCH 2/4] iommu/virtio: Add probe request Jean-Philippe Brucker
     [not found]   ` <8156517f-74b1-2923-2838-402f09a5c488@arm.com>
2018-04-11 18:33     ` [virtio-dev] " Jean-Philippe Brucker
2018-02-14 14:53 ` [virtio-dev] [PATCH 3/4] iommu/virtio: Add event queue Jean-Philippe Brucker
2018-02-14 14:53 ` [virtio-dev] [PATCH 4/4] vfio: Allow type-1 IOMMU instantiation with a virtio-iommu Jean-Philippe Brucker
     [not found]   ` <20180214082639.54556efb@w520.home>
     [not found]     ` <9f98aa85-3160-e285-cacd-2f429c58a775@arm.com>
2018-02-15 13:53       ` [virtio-dev] " Jean-Philippe Brucker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox