@samitouri / QOSamiQemu / commits / 9e67a50ea9

system/iommufd: Remove unused viommu pointer from IOMMUFDVeventq

The viommu field is assigned but never used. Callers freeing the veventq already have access to the IOMMUFDViommu object through other references, so this field is redundant. Removing it also simplifies upcoming changes where veventq is allocated based on the viommu id before the IOMMUFDViommu object is created (e.g. vendor CMDQV-based veventq allocation). No functional change. Reviewed-by: Nicolin Chen <nicolinc@nvidia.com> Reviewed-by: Eric Auger <eric.auger@redhat.com> Tested-by: Nicolin Chen <nicolinc@nvidia.com> Signed-off-by: Shameer Kolothum <skolothumtho@nvidia.com> Tested-by: Eric Auger <eric.auger@redhat.com> Message-id: 20260609112552.378999-6-skolothumtho@nvidia.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Shameer Kolothum committed Jun 9, 2026 at 12:25 UTC 9e67a50ea91df52858849d0c36891e7a8931c05f
2 files changed -2
hw/arm/smmuv3-accel.c
-1
@@ -553,7 +553,6 @@ bool smmuv3_accel_alloc_veventq(SMMUv3State *s, Error **errp)
553 veventq = g_new0(IOMMUFDVeventq, 1);
554 veventq->veventq_id = veventq_id;
555 veventq->veventq_fd = veventq_fd;
556 - veventq->viommu = accel->viommu;
556 accel->veventq = veventq;
557
558 /* Set up event handler for veventq fd */
include/system/iommufd.h
-1
@@ -58,7 +58,6 @@ typedef struct IOMMUFDVdev {
58
59 /* Virtual event queue interface for a vIOMMU */
60 typedef struct IOMMUFDVeventq {
61 - IOMMUFDViommu *viommu;
61 uint32_t veventq_id;
62 uint32_t veventq_fd;
63 uint32_t last_event_seq; /* Sequence number of last processed event */