]> Git Repo - qemu.git/commit
intel_iommu: Fix unexpected unmaps during global unmap
authorPeter Xu <[email protected]>
Mon, 24 Jun 2019 09:18:11 +0000 (17:18 +0800)
committerPaolo Bonzini <[email protected]>
Fri, 5 Jul 2019 20:16:46 +0000 (22:16 +0200)
commit9a4bb8391fda2312803d44664575a662b9be7189
tree335eee30aea3174e5f3963bf04f625770cde2a24
parentd6d10793dcfa33504745be40b49bd747ff8752ef
intel_iommu: Fix unexpected unmaps during global unmap

This is an replacement work of Yan Zhao's patch:

https://www.mail-archive.com/[email protected]/msg625340.html

vtd_address_space_unmap() will do proper page mask alignment to make
sure each IOTLB message will have correct masks for notification
messages (2^N-1), but sometimes it can be expanded to even supercede
the registered range.  That could lead to unexpected UNMAP of already
mapped regions in some other notifiers.

Instead of doing mindless expension of the start address and address
mask, we split the range into smaller ones and guarantee that each
small range will have correct masks (2^N-1) and at the same time we
should also try our best to generate as less IOTLB messages as
possible.

Reported-by: Yan Zhao <[email protected]>
Signed-off-by: Peter Xu <[email protected]>
Reviewed-by: Eric Auger <[email protected]>
Tested-by: Yan Zhao <[email protected]>
Message-Id: <20190624091811[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
hw/i386/intel_iommu.c
This page took 0.032487 seconds and 4 git commands to generate.