Skip to content

vfio: type1 multi-domain support & kvm-vfio coherency checking

Alex Williamson kvm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4vfio/iommu_type1: Multi-IOMMU domain supportdrivers/vfio/vfio_iommu_type1.c include/uapi/linux/vfio.h+336 -3023 replies
2/4vfio/type1: Add extension to test DMA cache coherence of IOMMUdrivers/vfio/vfio_iommu_type1.c include/uapi/linux/vfio.h+26 -00 replies
3/4vfio: Add external user check extension interfacedrivers/vfio/vfio.c include/linux/vfio.h+8 -00 replies
4/4kvm/vfio: Support for DMA coherent IOMMUsvirt/kvm/vfio.c+20 -71 reply

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchPaolo Bonzini
1/4
2/4
3/4
4/4A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/4] vfio: type1 multi-domain support & kvm-vfio coherency checking

This series switches the vfio type1 IOMMU backend to support multiple IOMMU domains per container. As outlined in 1/4, this provides several advantages, including supporting features like IOMMU_CACHE and allowing bus_type independence. With such support, we're able to provide an interface to indicate the container is fully cache coherent and export it for use by the external user interface. This allows the kvm-vfio pseudo device to properly test for non-coherent DMA rather than assume it whenever a kvm-vfio device is registered.

A change introduced by 1/4 creates a new, v2 type1 IOMMU backend. This type differs subtly in unmap behavior as described in the patch itself. For QEMU use of VFIO, there's no change and switching to v2 is transparent. I'd appreciate any feedback on whether we should simply call the previous behavior broken or if we should do like implemented here and support a compatible mode. Comments welcome. Thanks,

Alex

---

Alex Williamson (4):
vfio/iommu_type1: Multi-IOMMU domain support vfio/type1: Add extension to test DMA cache coherence of IOMMU
vfio: Add external user check extension interface kvm/vfio: Support for DMA coherent IOMMUs

 drivers/vfio/vfio.c             |    6 
 drivers/vfio/vfio_iommu_type1.c |  656 +++++++++++++++++++++------------------
 include/linux/vfio.h            |    2 
 include/uapi/linux/vfio.h       |    6 
 virt/kvm/vfio.c                 |   27 +-
 5 files changed, 389 insertions(+), 308 deletions(-)