hw/arm/smmuv3: Fix SMMU_CMD_CFGI_STE_RANGE handling
commit1194140b7fab588b4b9de9aeacbe9672f06c1d8f
authorEric Auger <eric.auger@redhat.com>
Tue, 9 Mar 2021 10:27:41 +0000 (9 11:27 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 12 Mar 2021 12:40:10 +0000 (12 12:40 +0000)
treeb8ab57842d22616864670958097cf6f003300510
parent6d9cd115b9dfee08faef0f64c3b90ac5c79ededc
hw/arm/smmuv3: Fix SMMU_CMD_CFGI_STE_RANGE handling

If the whole SID range (32b) is invalidated (SMMU_CMD_CFGI_ALL),
@end overflows and we fail to handle the command properly.

Once this gets fixed, the current code really is awkward in the
sense it loops over the whole range instead of removing the
currently cached configs through a hash table lookup.

Fix both the overflow and the lookup.

Signed-off-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20210309102742.30442-7-eric.auger@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm/smmu-internal.h
hw/arm/smmuv3.c