vfio: Do not register any IOMMU_NOTIFIER_DEVIOTLB_UNMAP notifier
commit8dca037b484fc8caeb6d6689745bc7475ce27174
authorEric Auger <eric.auger@redhat.com>
Tue, 9 Feb 2021 21:32:32 +0000 (9 22:32 +0100)
committerAlex Williamson <alex.williamson@redhat.com>
Tue, 16 Mar 2021 16:06:44 +0000 (16 10:06 -0600)
tree570bf5cff86ded366bb90f73b21131021ee87125
parent4e779bf1a55e8b951f1640e3ea46fc459066f64f
vfio: Do not register any IOMMU_NOTIFIER_DEVIOTLB_UNMAP notifier

In an attempt to fix smmu/virtio-iommu - vhost regression, commit
958ec334bca3 ("vhost: Unbreak SMMU and virtio-iommu on dev-iotlb support")
broke virtio-iommu integration. This is due to the fact VFIO registers
IOMMU_NOTIFIER_ALL notifiers, which includes IOMMU_NOTIFIER_DEVIOTLB_UNMAP
and this latter now is rejected by the virtio-iommu. As a consequence,
the registration fails. VHOST behaves like a device with an ATC cache. The
VFIO device does not support this scheme yet.

Let's register only legacy MAP and UNMAP notifiers.

Fixes: 958ec334bca3 ("vhost: Unbreak SMMU and virtio-iommu on dev-iotlb support")
Signed-off-by: Eric Auger <eric.auger@redhat.com>
Message-Id: <20210209213233.40985-2-eric.auger@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
hw/vfio/common.c