From: Eric Auger Date: Tue, 16 Jul 2024 09:45:06 +0000 (+0200) Subject: virtio-iommu: Remove the end point on detach X-Git-Tag: pull-vmclock-20250108~230^2~14 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=1993d634d57718d6eb107c973b7c8b80a6d91338;p=users%2Fdwmw2%2Fqemu.git virtio-iommu: Remove the end point on detach We currently miss the removal of the endpoint in case of detach. Signed-off-by: Eric Auger Message-Id: <20240716094619.1713905-5-eric.auger@redhat.com> Tested-by: Cédric Le Goater Reviewed-by: Cédric Le Goater Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- diff --git a/hw/virtio/virtio-iommu.c b/hw/virtio/virtio-iommu.c index 2de41ab412..440dfa6e92 100644 --- a/hw/virtio/virtio-iommu.c +++ b/hw/virtio/virtio-iommu.c @@ -786,6 +786,7 @@ static int virtio_iommu_detach(VirtIOIOMMU *s, if (QLIST_EMPTY(&domain->endpoint_list)) { g_tree_remove(s->domains, GUINT_TO_POINTER(domain->id)); } + g_tree_remove(s->endpoints, GUINT_TO_POINTER(ep_id)); return VIRTIO_IOMMU_S_OK; }