From cc0afd8a72996352e9f3f11b1cdde49b08aa11b6 Mon Sep 17 00:00:00 2001 From: David Hildenbrand Date: Fri, 23 Jun 2023 14:45:45 +0200 Subject: memory-device: Introduce machine_memory_devices_init() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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é Signed-off-by: David Hildenbrand Message-Id: <20230623124553.400585-3-david@redhat.com> Signed-off-by: David Hildenbrand --- include/hw/boards.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/hw/boards.h') 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 -- cgit v1.1