diff options
author | Eric Auger <eric.auger@redhat.com> | 2019-03-04 11:13:36 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2019-03-05 15:55:09 +0000 |
commit | 957e32cffa57e2578abbf7c1ec6e84db48921a18 (patch) | |
tree | 50c1cfc9d5d07f2c19b21bf4b925f418cec6207d /include | |
parent | ee6850110c627d904a11b8d3851257b4f01da20e (diff) | |
download | qemu-957e32cffa57e2578abbf7c1ec6e84db48921a18.zip qemu-957e32cffa57e2578abbf7c1ec6e84db48921a18.tar.gz qemu-957e32cffa57e2578abbf7c1ec6e84db48921a18.tar.bz2 |
hw/arm/virt: Dynamic memory map depending on RAM requirements
Up to now the memory map has been static and the high IO region
base has always been 256GiB.
This patch modifies the virt_set_memmap() function, which freezes
the memory map, so that the high IO range base becomes floating,
located after the initial RAM and the device memory.
The function computes
- the base of the device memory,
- the size of the device memory,
- the high IO region base
- the highest GPA used in the memory map.
Entries of the high IO region are assigned a base address. The
device memory is initialized.
The highest GPA used in the memory map will be used at VM creation
to choose the requested IPA size.
Setting all the existing highmem IO regions beyond the RAM
allows to have a single contiguous RAM region (initial RAM and
possible hotpluggable device memory). That way we do not need
to do invasive changes in the EDK2 FW to support a dynamic
RAM base.
Still the user cannot request an initial RAM size greater than 255GB.
Signed-off-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-id: 20190304101339.25970-8-eric.auger@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/arm/virt.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h index f3f7fae..507517c 100644 --- a/include/hw/arm/virt.h +++ b/include/hw/arm/virt.h @@ -131,6 +131,7 @@ typedef struct { uint32_t msi_phandle; uint32_t iommu_phandle; int psci_conduit; + hwaddr highest_gpa; } VirtMachineState; #define VIRT_ECAM_ID(high) (high ? VIRT_HIGH_PCIE_ECAM : VIRT_PCIE_ECAM) |