hw/arm/smmuv3: Another range invalidation fix
authorEric Auger <eric.auger@redhat.com>
Mon, 10 May 2021 12:47:47 +0000 (14:47 +0200)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 25 May 2021 14:44:45 +0000 (15:44 +0100)
commit219729cfbf9e979020bffedac6a790144173ec62
tree7c5b94eb7aedc802ddec6f3d4a33ca4301d278ea
parent0dab1d36f55c3ed649bb8e4c74b9269ef3a63049
hw/arm/smmuv3: Another range invalidation fix

6d9cd115b9 ("hw/arm/smmuv3: Enforce invalidation on a power of two range")
failed to completely fix misalignment issues with range
invalidation. For instance invalidations patterns like "invalidate 32
4kB pages starting from 0xff395000 are not correctly handled" due
to the fact the previous fix only made sure the number of invalidated
pages were a power of 2 but did not properly handle the start
address was not aligned with the range. This can be noticed when
boothing a fedora 33 with protected virtio-blk-pci.

Signed-off-by: Eric Auger <eric.auger@redhat.com>
Fixes: 6d9cd115b9 ("hw/arm/smmuv3: Enforce invalidation on a power of two range")
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm/smmuv3.c