[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 009/115] vl.c: run preconfig loop before creating default RAM back
From: |
Paolo Bonzini |
Subject: |
[PULL 009/115] vl.c: run preconfig loop before creating default RAM backend |
Date: |
Thu, 11 Jun 2020 15:43:03 -0400 |
From: Igor Mammedov <imammedo@redhat.com>
Default RAM backend depends on numa_uses_legacy_mem(), which is
infulenced by -numa options on CLI or set-numa-node QMP command
at preconfig time. If QEMU is started with '-preconfig'
without -numa, it will lead to creating default RAM backend
even if later set-numa-node is used to assing RAM to NUMA nodes
using 'memdev' NUMA option.
That at best will waste RAM object created by default and with
next patch adding a check to prevent usage of conflicting
'-M memory-backend' and '-numa memdev'
options, it will make QEMU error out if user tries to configure
NUMA at preconfig time with memdev option, making set-numa-node
unusable.
To fix issue, move preconfig loop before default RAM backend is
created, so that numa_uses_legacy_mem() would take into account
effects of set-numa-node commands executed at preconfig time.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20200511141103.43768-2-imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
softmmu/vl.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/softmmu/vl.c b/softmmu/vl.c
index 05d1a4cb6b..055472da66 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -4334,12 +4334,13 @@ void qemu_init(int argc, char **argv, char **envp)
parse_numa_opts(current_machine);
+ /* do monitor/qmp handling at preconfig state if requested */
+ qemu_main_loop();
+
if (machine_class->default_ram_id && current_machine->ram_size &&
numa_uses_legacy_mem() && !current_machine->ram_memdev_id) {
create_default_memdev(current_machine, mem_path);
}
- /* do monitor/qmp handling at preconfig state if requested */
- qemu_main_loop();
audio_init_audiodevs();
--
2.26.2
- [PULL 021/115] i386: Hyper-V VMBus ACPI DSDT entry, (continued)
- [PULL 021/115] i386: Hyper-V VMBus ACPI DSDT entry, Paolo Bonzini, 2020/06/11
- [PULL 018/115] vmbus: add vmbus protocol definitions, Paolo Bonzini, 2020/06/11
- [PULL 020/115] i386:pc: whitelist dynamic vmbus-bridge, Paolo Bonzini, 2020/06/11
- [PULL 028/115] hw/i386/vmport: Set EAX to -1 on failed and unsupported commands, Paolo Bonzini, 2020/06/11
- [PULL 023/115] target/i386: Fix the CPUID leaf CPUID_Fn80000008, Paolo Bonzini, 2020/06/11
- [PULL 029/115] hw/i386/vmport: Introduce vmware-vmx-version property, Paolo Bonzini, 2020/06/11
- [PULL 012/115] qom/object: Fix object_child_foreach_recursive() return value, Paolo Bonzini, 2020/06/11
- [PULL 027/115] hw/i386/vmport: Propagate IOPort read to vCPU EAX register, Paolo Bonzini, 2020/06/11
- [PULL 005/115] run-coverity-scan: add --no-update-tools option, Paolo Bonzini, 2020/06/11
- [PULL 033/115] hw/i386/vmport: Add support for CMD_GETBIOSUUID, Paolo Bonzini, 2020/06/11
- [PULL 009/115] vl.c: run preconfig loop before creating default RAM backend,
Paolo Bonzini <=
- [PULL 032/115] hw/i386/vmport: Define enum for all commands, Paolo Bonzini, 2020/06/11
- [PULL 013/115] target/i386: Fix OUTL debug output, Paolo Bonzini, 2020/06/11
- [PULL 036/115] i386/cpu: Store LAPIC bus frequency in CPU structure, Paolo Bonzini, 2020/06/11
- [PULL 039/115] accel: Move Xen accelerator code under accel/xen/, Paolo Bonzini, 2020/06/11
- [PULL 026/115] hw/i386/vmport: Add device properties, Paolo Bonzini, 2020/06/11
- [PULL 051/115] target/i386: implement special cases for fxtract, Paolo Bonzini, 2020/06/11
- [PULL 056/115] exec: Let address_space_read/write_cached() propagate MemTxResult, Paolo Bonzini, 2020/06/11
- [PULL 038/115] hw/i386/vmport: Assert vmport initialized before registering commands, Paolo Bonzini, 2020/06/11
- [PULL 042/115] qom/object: simplify type_initialize_interface(), Paolo Bonzini, 2020/06/11
- [PULL 046/115] hax: Dynamic allocate vcpu state structure, Paolo Bonzini, 2020/06/11