diff options
author | David Hildenbrand <david@redhat.com> | 2023-06-23 14:45:45 +0200 |
---|---|---|
committer | David Hildenbrand <david@redhat.com> | 2023-07-12 09:25:35 +0200 |
commit | cc0afd8a72996352e9f3f11b1cdde49b08aa11b6 (patch) | |
tree | e20f32bdda208ee2862f760ec094188925c2dfb4 /include/hw | |
parent | 99d88de6eb577ff70cc1b1ed59f1a50f16038c2e (diff) |
memory-device: Introduce machine_memory_devices_init()
Let's intrduce a new helper that we will use to replace existing memory
device setup code during machine initialization. We'll enforce that the
size has to be > 0.
Once all machines were converted, we'll only allocate ms->device_memory
if the size > 0.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20230623124553.400585-3-david@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Diffstat (limited to 'include/hw')
-rw-r--r-- | include/hw/boards.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hw/boards.h b/include/hw/boards.h index 12d9e9d17c..3b7c30e853 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -37,6 +37,7 @@ void machine_parse_smp_config(MachineState *ms, const SMPConfiguration *config, Error **errp); unsigned int machine_topo_get_cores_per_socket(const MachineState *ms); unsigned int machine_topo_get_threads_per_socket(const MachineState *ms); +void machine_memory_devices_init(MachineState *ms, hwaddr base, uint64_t size); /** * machine_class_allow_dynamic_sysbus_dev: Add type to list of valid devices |