hw/arm/virt: Add properties to disable high memory regions
commit6a48c64eec355ab1aff694eb4522d07a8e461368
authorGavin Shan <gshan@redhat.com>
Wed, 14 Dec 2022 14:27:06 +0000 (14 14:27 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 15 Dec 2022 11:18:19 +0000 (15 11:18 +0000)
tree94959e58ef82e66d206d67e27f3b2f2542281c88
parentf40408a9fe5d1db70a75a33d2b26c8af8a5d57b0
hw/arm/virt: Add properties to disable high memory regions

The 3 high memory regions are usually enabled by default, but they may
be not used. For example, VIRT_HIGH_GIC_REDIST2 isn't needed by GICv2.
This leads to waste in the PA space.

Add properties ("highmem-redists", "highmem-ecam", "highmem-mmio") to
allow users selectively disable them if needed. After that, the high
memory region for GICv3 or GICv4 redistributor can be disabled by user,
the number of maximal supported CPUs needs to be calculated based on
'vms->highmem_redists'. The follow-up error message is also improved
to indicate if the high memory region for GICv3 and GICv4 has been
enabled or not.

Suggested-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Message-id: 20221029224307.138822-8-gshan@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
docs/system/arm/virt.rst
hw/arm/virt.c