aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Hildenbrand <david@redhat.com>2023-06-23 14:45:45 +0200
committerDavid Hildenbrand <david@redhat.com>2023-07-12 09:25:35 +0200
commitcc0afd8a72996352e9f3f11b1cdde49b08aa11b6 (patch)
treee20f32bdda208ee2862f760ec094188925c2dfb4 /include
parent99d88de6eb577ff70cc1b1ed59f1a50f16038c2e (diff)
downloadqemu-cc0afd8a72996352e9f3f11b1cdde49b08aa11b6.zip
qemu-cc0afd8a72996352e9f3f11b1cdde49b08aa11b6.tar.gz
qemu-cc0afd8a72996352e9f3f11b1cdde49b08aa11b6.tar.bz2
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')
-rw-r--r--include/hw/boards.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hw/boards.h b/include/hw/boards.h
index 12d9e9d..3b7c30e 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