virtio-iommu: Free [host_]resv_ranges on unset_iommu_devices
authorEric Auger <eric.auger@redhat.com>
Tue, 16 Jul 2024 09:45:05 +0000 (11:45 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 23 Jul 2024 00:15:42 +0000 (20:15 -0400)
commit62ac01d1de5096022e08355f8df47bf1191a3ed1
tree49fd1c6bfd545f708f6d5958db586cc6720746e4
parent3745768918c2528f2b00b63bb3a764c458364f70
virtio-iommu: Free [host_]resv_ranges on unset_iommu_devices

We are currently missing the deallocation of the [host_]resv_regions
in case of hot unplug. Also to make things more simple let's rule
out the case where multiple HostIOMMUDevices would be aliased and
attached to the same IOMMUDevice. This allows to remove the handling
of conflicting Host reserved regions. Anyway this is not properly
supported at guest kernel level. On hotunplug the reserved regions
are reset to the ones set by virtio-iommu property.

Signed-off-by: Eric Auger <eric.auger@redhat.com>
Message-Id: <20240716094619.1713905-4-eric.auger@redhat.com>
Tested-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio/virtio-iommu.c