mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
initialize MachineState::ram in NUMA case
In case of NUMA there are 2 cases to consider: 1. '-numa node,memdev', the only one that will be available for 5.0 and newer machine types. In this case reuse current behavior, with only difference memdevs are put into MachineState::ram container + a temporary glue to keep memory_region_allocate_system_memory() working until all boards converted. 2. fake NUMA ("-numa node mem" and default RAM splitting) the later has been deprecated and will be removed but the former is going to stay available for compat reasons for 5.0 and older machine types it takes allocate_system_memory_nonnuma() path, like non-NUMA case and falls under conversion to memdev. So extend non-NUMA MachineState::ram initialization introduced in previous patch to take care of fake NUMA case. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <20200219160953.13771-6-imammedo@redhat.com>
This commit is contained in:
parent
82b911aaff
commit
6b61c2c596
3 changed files with 32 additions and 14 deletions
2
vl.c
2
vl.c
|
@ -4290,7 +4290,7 @@ int main(int argc, char **argv, char **envp)
|
|||
parse_numa_opts(current_machine);
|
||||
|
||||
if (machine_class->default_ram_id && current_machine->ram_size &&
|
||||
!current_machine->ram_memdev_id) {
|
||||
numa_uses_legacy_mem() && !current_machine->ram_memdev_id) {
|
||||
create_default_memdev(current_machine, mem_path, mem_prealloc);
|
||||
}
|
||||
/* do monitor/qmp handling at preconfig state if requested */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue