diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index 7f3c727777..7e1f556994 100644 --- a/hw/virtio/vhost.c +++ b/hw/virtio/vhost.c @@ -2003,6 +2003,9 @@ fail_vq: } fail_mem: + if (vhost_dev_has_iommu(hdev)) { + memory_listener_unregister(&hdev->iommu_listener); + } fail_features: vdev->vhost_started = false; hdev->started = false;