hw/arm/smmu-common: Manage IOTLB block entries
commit9e54dee71fcfaae69f87b8e1f51485a832266a39
authorEric Auger <eric.auger@redhat.com>
Tue, 28 Jul 2020 15:08:09 +0000 (28 17:08 +0200)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 24 Aug 2020 09:02:06 +0000 (24 10:02 +0100)
treee59dac56f96c1cd6318d8cd447dc2c3dd21de392
parenta7550158556b7fc2f2baaecf9092499c6687b160
hw/arm/smmu-common: Manage IOTLB block entries

At the moment each entry in the IOTLB corresponds to a page sized
mapping (4K, 16K or 64K), even if the page belongs to a mapped
block. In case of block mapping this unefficiently consumes IOTLB
entries.

Change the value of the entry so that it reflects the actual
mapping it belongs to (block or page start address and size).

Also the level/tg of the entry is encoded in the key. In subsequent
patches we will enable range invalidation. This latter is able
to provide the level/tg of the entry.

Encoding the level/tg directly in the key will allow to invalidate
using g_hash_table_remove() when num_pages equals to 1.

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