vfio: Do not register any IOMMU_NOTIFIER_DEVIOTLB_UNMAP notifier
In an attempt to fix smmu/virtio-iommu - vhost regression, commit958ec334bc
("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:958ec334bc
("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>
This commit is contained in:
parent
4e779bf1a5
commit
8dca037b48
@ -787,7 +787,7 @@ static void vfio_listener_region_add(MemoryListener *listener,
|
|||||||
iommu_idx = memory_region_iommu_attrs_to_index(iommu_mr,
|
iommu_idx = memory_region_iommu_attrs_to_index(iommu_mr,
|
||||||
MEMTXATTRS_UNSPECIFIED);
|
MEMTXATTRS_UNSPECIFIED);
|
||||||
iommu_notifier_init(&giommu->n, vfio_iommu_map_notify,
|
iommu_notifier_init(&giommu->n, vfio_iommu_map_notify,
|
||||||
IOMMU_NOTIFIER_ALL,
|
IOMMU_NOTIFIER_IOTLB_EVENTS,
|
||||||
section->offset_within_region,
|
section->offset_within_region,
|
||||||
int128_get64(llend),
|
int128_get64(llend),
|
||||||
iommu_idx);
|
iommu_idx);
|
||||||
|
Loading…
Reference in New Issue
Block a user