hw/arm/smmuv3: Apply address mask to linear strtab base address
commit3d44c60500785f18bb469c9de0aeba7415c0f28f
authorSimon Veith <sveith@amazon.de>
Fri, 20 Dec 2019 14:03:00 +0000 (20 14:03 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 20 Dec 2019 14:03:00 +0000 (20 14:03 +0000)
tree94eabf90daba15a5ff1cc4c0d6489a699af7063c
parent058d095532dbd50aa3a2b5ef907b76c08f7d6de7
hw/arm/smmuv3: Apply address mask to linear strtab base address

In the SMMU_STRTAB_BASE register, the stream table base address only
occupies bits [51:6]. Other bits, such as RA (bit [62]), must be masked
out to obtain the base address.

The branch for 2-level stream tables correctly applies this mask by way
of SMMU_BASE_ADDR_MASK, but the one for linear stream tables does not.

Apply the missing mask in that case as well so that the correct stream
base address is used by guests which configure a linear stream table.

Linux guests are unaffected by this change because they choose a 2-level
stream table layout for the QEMU SMMUv3, based on the size of its stream
ID space.

ref. ARM IHI 0070C, section 6.3.23.

Signed-off-by: Simon Veith <sveith@amazon.de>
Acked-by: Eric Auger <eric.auger@redhat.com>
Tested-by: Eric Auger <eric.auger@redhat.com>
Message-id: 1576509312-13083-2-git-send-email-sveith@amazon.de
Cc: Eric Auger <eric.auger@redhat.com>
Cc: qemu-devel@nongnu.org
Cc: qemu-arm@nongnu.org
Acked-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm/smmuv3.c