[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 51/53] intel_iommu: Fix address space unmap
From: |
Michael S. Tsirkin |
Subject: |
[PULL 51/53] intel_iommu: Fix address space unmap |
Date: |
Mon, 26 Jun 2023 08:30:20 -0400 |
From: Zhenzhong Duan <zhenzhong.duan@intel.com>
During address space unmap, corresponding IOVA tree entries are
also removed. But DMAMap is set beyond notifier's scope by 1, so
in theory there is possibility to remove a continuous entry above
the notifier's scope but falling in adjacent notifier's scope.
There is no issue currently as no use cases allocate notifiers
continuously, but let's be robust.
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Message-Id: <20230615032626.314476-4-zhenzhong.duan@intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/i386/intel_iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
index f046f85913..dcc334060c 100644
--- a/hw/i386/intel_iommu.c
+++ b/hw/i386/intel_iommu.c
@@ -3791,7 +3791,7 @@ static void vtd_address_space_unmap(VTDAddressSpace *as,
IOMMUNotifier *n)
n->start, size);
map.iova = n->start;
- map.size = size;
+ map.size = size - 1; /* Inclusive */
iova_tree_remove(as->iova_tree, map);
}
--
MST
- [PULL 28/53] vdpa: move CVQ isolation check to net_init_vhost_vdpa, (continued)
- [PULL 28/53] vdpa: move CVQ isolation check to net_init_vhost_vdpa, Michael S. Tsirkin, 2023/06/26
- [PULL 29/53] cryptodev: fix memory leak during stats query, Michael S. Tsirkin, 2023/06/26
- [PULL 31/53] hw/i386/pc: Default to use SMBIOS 3.0 for newer machine models, Michael S. Tsirkin, 2023/06/26
- [PULL 17/53] hw/virtio: Introduce VHOST_VSOCK_COMMON symbol in Kconfig, Michael S. Tsirkin, 2023/06/26
- [PULL 19/53] hw/virtio/vhost-vsock: Include missing 'virtio/virtio-bus.h' header, Michael S. Tsirkin, 2023/06/26
- [PULL 33/53] pc: q35: Bump max_cpus to 1024, Michael S. Tsirkin, 2023/06/26
- [PULL 41/53] vdpa: Add vhost_vdpa_net_load_offloads(), Michael S. Tsirkin, 2023/06/26
- [PULL 42/53] vdpa: Allow VIRTIO_NET_F_CTRL_GUEST_OFFLOADS in SVQ, Michael S. Tsirkin, 2023/06/26
- [PULL 48/53] vhost-user: fully use new backend/frontend naming, Michael S. Tsirkin, 2023/06/26
- [PULL 51/53] intel_iommu: Fix address space unmap,
Michael S. Tsirkin <=
- [PULL 34/53] vdpa: do not block migration if device has cvq and x-svq=on, Michael S. Tsirkin, 2023/06/26
- [PULL 39/53] hw/net/virtio-net: make some VirtIONet const, Michael S. Tsirkin, 2023/06/26
- [PULL 40/53] virtio-net: expose virtio_net_supported_guest_offloads(), Michael S. Tsirkin, 2023/06/26
- [PULL 46/53] hw/i386/pc: Clean up pc_machine_initfn, Michael S. Tsirkin, 2023/06/26
- [PULL 52/53] vhost_net: add an assertion for TAP client backends, Michael S. Tsirkin, 2023/06/26