qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Auger <eric.auger@redhat.com>
To: eric.auger.pro@gmail.com, eric.auger@redhat.com,
	qemu-devel@nongnu.org, qemu-arm@nongnu.org, mst@redhat.com,
	jean-philippe@linaro.org, peter.maydell@linaro.org,
	clg@redhat.com, zhenzhong.duan@intel.com,
	alex.williamson@redhat.com, jasowang@redhat.com
Cc: yanghliu@redhat.com
Subject: [PATCH 4/6] virtio-iommu: Remove the end point on detach
Date: Tue, 16 Jul 2024 11:45:06 +0200	[thread overview]
Message-ID: <20240716094619.1713905-5-eric.auger@redhat.com> (raw)
In-Reply-To: <20240716094619.1713905-1-eric.auger@redhat.com>

We currently miss the removal of the endpoint in case of detach.

Signed-off-by: Eric Auger <eric.auger@redhat.com>
---
 hw/virtio/virtio-iommu.c | 1 +
 1 file changed, 1 insertion(+)

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;
 }
 
-- 
2.41.0



  parent reply	other threads:[~2024-07-16  9:48 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-16  9:45 [PATCH 0/6] VIRTIO-IOMMU/VFIO: Revert IOMMUDevice clear and fix hotunplug Eric Auger
2024-07-16  9:45 ` [PATCH 1/6] Revert "virtio-iommu: Clear IOMMUDevice when VFIO device is unplugged" Eric Auger
2024-07-16 13:05   ` Cédric Le Goater
2024-07-16  9:45 ` [PATCH 2/6] virtio-iommu: Remove probe_done Eric Auger
2024-07-16 13:06   ` Cédric Le Goater
2024-07-16  9:45 ` [PATCH 3/6] virtio-iommu: Free [host_]resv_ranges on unset_iommu_devices Eric Auger
2024-07-16 13:36   ` Cédric Le Goater
2024-07-17  3:06   ` Duan, Zhenzhong
2024-07-17  7:40     ` Eric Auger
2024-07-17  7:56       ` Duan, Zhenzhong
2024-07-16  9:45 ` Eric Auger [this message]
2024-07-16 13:36   ` [PATCH 4/6] virtio-iommu: Remove the end point on detach Cédric Le Goater
2024-07-16  9:45 ` [PATCH 5/6] hw/vfio/common: Add vfio_listener_region_del_iommu trace event Eric Auger
2024-07-16 13:36   ` Cédric Le Goater
2024-07-16  9:45 ` [PATCH 6/6] virtio-iommu: Add trace point on virtio_iommu_detach_endpoint_from_domain Eric Auger
2024-07-16 13:36   ` Cédric Le Goater
2024-07-16 14:02 ` [PATCH 0/6] VIRTIO-IOMMU/VFIO: Revert IOMMUDevice clear and fix hotunplug Cédric Le Goater
2024-07-16 14:59   ` Eric Auger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240716094619.1713905-5-eric.auger@redhat.com \
    --to=eric.auger@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=clg@redhat.com \
    --cc=eric.auger.pro@gmail.com \
    --cc=jasowang@redhat.com \
    --cc=jean-philippe@linaro.org \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=yanghliu@redhat.com \
    --cc=zhenzhong.duan@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).