mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-31 14:02:05 -06:00
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>
This commit is contained in:
parent
99d88de6eb
commit
cc0afd8a72
2 changed files with 15 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue