Skip to content

Fix UNMAP notifier for intel-iommu

Jason Wang qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 5 repliesIn review
  2. v13 patches 31 repliesSuperseded

Changes in v2 from the cover letter

- Do not depend on the iova tree for such kind of invalidation but simply tries to do UNMAP for all attached IOMMU notifiers

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5intel-iommu: fail MAP notifier without caching modehw/i386/intel_iommu.c+7 -00 replies
2/5intel-iommu: fail DEVIOTLB_UNMAP without dt modehw/i386/intel_iommu.c+8 -00 replies
3/5memory: introduce memory_region_unmap_iommu_notifier_range()include/exec/memory.h softmmu/memory.c+23 -03 replies
4/5smmu: switch to use memory_region_unmap_iommu_notifier_range()hw/arm/smmu-common.c+1 -150 replies
5/5intel-iommu: send UNMAP notifications for domain or global inv deschw/i386/intel_iommu.c+9 -50 replies

Reviews trailers per patch

2 of 5 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchLaurent VivierViktor PrutyanovEric AugerPeter Xu
SeriesR-b
1/5T-b R-b
2/5R-b T-b T-b
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v2 thread

Cover letter [PATCH V2 0/5] Fix UNMAP notifier for intel-iommu

Hi All:

According to ATS, device should work if ATS is disabled. This is not correctly implemented in the current intel-iommu since it doesn't handle the UNMAP notifier correctly. This breaks the vhost-net + vIOMMU without dt.

The root casue is that the when there's a device IOTLB miss (note that it's not specific to PCI so it can work without ATS), Qemu doesn't build the IOVA tree, so when guest start an IOTLB invalidation, Qemu won't trigger the UNMAP notifier.

Fixing this by triggering UNMAP notifier in those cases.

Thanks

Changes since V1:

- Do not depend on the iova tree for such kind of invalidation but simply tries to do UNMAP for all attached IOMMU notifiers

Jason Wang (4):
intel-iommu: fail MAP notifier without caching mode
intel-iommu: fail DEVIOTLB_UNMAP without dt mode
memory: introduce memory_region_unmap_iommu_notifier_range()
smmu: switch to use memory_region_unmap_iommu_notifier_range()

Peter Xu (1):
intel-iommu: send UNMAP notifications for domain or global inv desc

 hw/arm/smmu-common.c  | 16 +---------------
 hw/i386/intel_iommu.c | 29 ++++++++++++++++++++++++-----
 include/exec/memory.h | 10 ++++++++++
 softmmu/memory.c      | 13 +++++++++++++
 4 files changed, 48 insertions(+), 20 deletions(-)
Signature · 1 line
2.25.1