diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index fdcd1a8fdf4..f38997b3f66 100644 --- a/hw/virtio/vhost.c +++ b/hw/virtio/vhost.c @@ -1934,6 +1934,9 @@ int vhost_dev_start(struct vhost_dev *hdev, VirtIODevice *vdev, bool vrings) } fail_mem: + if (vhost_dev_has_iommu(hdev)) { + memory_listener_unregister(&hdev->iommu_listener); + } fail_features: vdev->vhost_started = false; hdev->started = false;