qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v10 00/10] virtio-iommu: VFIO integration
@ 2020-10-08 17:15 Jean-Philippe Brucker
  2020-10-08 17:15 ` [PATCH v10 01/10] virtio-iommu: Fix virtio_iommu_mr() Jean-Philippe Brucker
                   ` (11 more replies)
  0 siblings, 12 replies; 47+ messages in thread
From: Jean-Philippe Brucker @ 2020-10-08 17:15 UTC (permalink / raw)
  To: eric.auger, alex.williamson
  Cc: Jean-Philippe Brucker, mst, qemu-devel, peterx, pbonzini, bbhushan2

This series adds support for VFIO endpoints to virtio-iommu.

Versions 1 to 9 were posted by Bharat Bhushan, but I am taking over for
now since he doesn't have much time to spend on it. Thanks again Bharat
for the work!

Two major changes since [v9]:

* Don't use per-endoint page_size_mask properties. Instead keep a global
  page size for the virtio-iommu device, updated when adding a VFIO
  endpoint. Reject hotplug if the page size is incompatible.

* Try to make the MAP/UNMAP paths more efficient, by keeping track of
  memory region within the endpoint structure.

More testing would be appreciated, since I can only test using a software
model as host at the moment. But it does seem to hold well with PCIe
hotplug/unplug, and pass-through to guest userspace, which are no mean
feat.

Note that one page size combination is not supported: host 64kB guest
4kB cannot work, because the host IOMMU driver will automatically pick
64kB pages which prevents mapping at a smaller granule. Supporting this
case would require introducing a page size negotiation mechanism from
the guest all the way to the host IOMMU driver. Possible, but not
planned at the moment.

[v9] https://lore.kernel.org/qemu-devel/20200323084617.1782-1-bbhushan2@marvell.com/

Bharat Bhushan (7):
  virtio-iommu: Add memory notifiers for map/unmap
  virtio-iommu: Call memory notifiers in attach/detach
  virtio-iommu: Add replay() memory region callback
  virtio-iommu: Add notify_flag_changed() memory region callback
  memory: Add interface to set iommu page size mask
  vfio: Set IOMMU page size as per host supported page size
  virtio-iommu: Set supported page size mask

Jean-Philippe Brucker (3):
  virtio-iommu: Fix virtio_iommu_mr()
  virtio-iommu: Store memory region in endpoint struct
  vfio: Don't issue full 2^64 unmap

 include/exec/memory.h    |  26 +++++
 hw/vfio/common.c         |  19 ++++
 hw/virtio/virtio-iommu.c | 204 ++++++++++++++++++++++++++++++++++++++-
 softmmu/memory.c         |  13 +++
 hw/virtio/trace-events   |   5 +
 5 files changed, 265 insertions(+), 2 deletions(-)

-- 
2.28.0



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

end of thread, other threads:[~2020-11-02 18:02 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-08 17:15 [PATCH v10 00/10] virtio-iommu: VFIO integration Jean-Philippe Brucker
2020-10-08 17:15 ` [PATCH v10 01/10] virtio-iommu: Fix virtio_iommu_mr() Jean-Philippe Brucker
2020-10-16  7:36   ` Auger Eric
2020-10-19 21:36   ` Peter Xu
2020-10-08 17:15 ` [PATCH v10 02/10] virtio-iommu: Store memory region in endpoint struct Jean-Philippe Brucker
2020-10-16  7:37   ` Auger Eric
2020-10-08 17:15 ` [PATCH v10 03/10] virtio-iommu: Add memory notifiers for map/unmap Jean-Philippe Brucker
2020-10-16  7:58   ` Auger Eric
2020-10-22 16:41     ` Jean-Philippe Brucker
2020-10-08 17:15 ` [PATCH v10 04/10] virtio-iommu: Call memory notifiers in attach/detach Jean-Philippe Brucker
2020-10-16  8:05   ` Auger Eric
2020-10-08 17:15 ` [PATCH v10 05/10] virtio-iommu: Add replay() memory region callback Jean-Philippe Brucker
2020-10-16  9:12   ` Auger Eric
2020-10-22 16:42     ` Jean-Philippe Brucker
2020-10-08 17:15 ` [PATCH v10 06/10] virtio-iommu: Add notify_flag_changed() " Jean-Philippe Brucker
2020-10-16  8:18   ` Auger Eric
2020-10-08 17:15 ` [PATCH v10 07/10] memory: Add interface to set iommu page size mask Jean-Philippe Brucker
2020-10-16  9:24   ` Auger Eric
2020-10-22 16:43     ` Jean-Philippe Brucker
2020-10-19 21:36   ` Peter Xu
2020-10-08 17:15 ` [PATCH v10 08/10] vfio: Set IOMMU page size as per host supported page size Jean-Philippe Brucker
2020-10-08 21:22   ` Alex Williamson
2020-10-30 10:26     ` Michael S. Tsirkin
2020-10-30 15:19       ` Jean-Philippe Brucker
2020-10-16  9:25   ` Auger Eric
2020-10-08 17:15 ` [PATCH v10 09/10] virtio-iommu: Set supported page size mask Jean-Philippe Brucker
2020-10-16 13:08   ` Auger Eric
2020-10-22 16:43     ` Jean-Philippe Brucker
2020-10-19 21:35   ` Peter Xu
2020-10-22 16:39     ` Jean-Philippe Brucker
2020-10-22 20:56       ` Peter Xu
2020-10-23  7:48         ` Jean-Philippe Brucker
2020-10-23 16:47           ` Peter Xu
2020-10-27 17:38             ` Jean-Philippe Brucker
2020-10-30 10:24               ` Michael S. Tsirkin
2020-10-08 17:15 ` [PATCH v10 10/10] vfio: Don't issue full 2^64 unmap Jean-Philippe Brucker
2020-10-08 21:22   ` Alex Williamson
2020-10-30 10:25     ` Michael S. Tsirkin
2020-10-30 17:26       ` Alex Williamson
2020-10-30 18:19         ` Paolo Bonzini
2020-11-02 17:37           ` Alex Williamson
2020-11-02 17:44             ` Paolo Bonzini
2020-11-02 18:00               ` Alex Williamson
2020-10-16  9:47   ` Auger Eric
2020-10-16 13:13 ` [PATCH v10 00/10] virtio-iommu: VFIO integration Auger Eric
2020-10-30 10:27 ` Michael S. Tsirkin
2020-10-30 10:48   ` 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;
as well as URLs for NNTP newsgroup(s).