aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2019-06-10 15:10:07 +0200
committerEduardo Habkost <ehabkost@redhat.com>2019-07-05 17:08:03 -0300
commitcd5ff8333a3c8742c7e178a1a6ff0b921cebacda (patch)
tree8d8c224c32430564bbb5acc576af913b865be845 /hw
parentfc3b77e20d002fb434be726f2328a17fd5edecb7 (diff)
downloadqemu-cd5ff8333a3c8742c7e178a1a6ff0b921cebacda.zip
qemu-cd5ff8333a3c8742c7e178a1a6ff0b921cebacda.tar.gz
qemu-cd5ff8333a3c8742c7e178a1a6ff0b921cebacda.tar.bz2
machine: show if CLI option '-numa node,mem' is supported in QAPI schema
Legacy '-numa node,mem' option has a number of issues and mgmt often defaults to it. Unfortunately it's no possible to replace it with an alternative '-numa memdev' without breaking migration compatibility. What's possible though is to deprecate it, keeping option working with old machine types only. In order to help users to find out if being deprecated CLI option '-numa node,mem' is still supported by particular machine type, add new "numa-mem-supported" property to output of query-machines. "numa-mem-supported" is set to 'true' for machines that currently support NUMA, but it will be flipped to 'false' later on, once deprecation period expires and kept 'true' only for old machine types that used to support the legacy option so it won't break existing configuration that are using it. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <1560172207-378962-1-git-send-email-imammedo@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/arm/virt.c1
-rw-r--r--hw/core/machine-qmp-cmds.c1
-rw-r--r--hw/i386/pc.c1
-rw-r--r--hw/ppc/spapr.c1
4 files changed, 4 insertions, 0 deletions
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 20f191b..0b5138c 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -1952,6 +1952,7 @@ static void virt_machine_class_init(ObjectClass *oc, void *data)
assert(!mc->get_hotplug_handler);
mc->get_hotplug_handler = virt_machine_get_hotplug_handler;
hc->plug = virt_machine_device_plug_cb;
+ mc->numa_mem_supported = true;
}
static void virt_instance_init(Object *obj)
diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c
index 14dbad1..754ce77 100644
--- a/hw/core/machine-qmp-cmds.c
+++ b/hw/core/machine-qmp-cmds.c
@@ -226,6 +226,7 @@ MachineInfoList *qmp_query_machines(Error **errp)
info->name = g_strdup(mc->name);
info->cpu_max = !mc->max_cpus ? 1 : mc->max_cpus;
info->hotpluggable_cpus = mc->has_hotpluggable_cpus;
+ info->numa_mem_supported = mc->numa_mem_supported;
entry = g_malloc0(sizeof(*entry));
entry->value = info;
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 2107532..14f7b45 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -2856,6 +2856,7 @@ static void pc_machine_class_init(ObjectClass *oc, void *data)
nc->nmi_monitor_handler = x86_nmi;
mc->default_cpu_type = TARGET_DEFAULT_CPU_TYPE;
mc->nvdimm_supported = true;
+ mc->numa_mem_supported = true;
object_class_property_add(oc, PC_MACHINE_DEVMEM_REGION_SIZE, "int",
pc_machine_get_device_memory_region_size, NULL,
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 51256ac..821f0d4 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -4367,6 +4367,7 @@ static void spapr_machine_class_init(ObjectClass *oc, void *data)
* in which LMBs are represented and hot-added
*/
mc->numa_mem_align_shift = 28;
+ mc->numa_mem_supported = true;
smc->default_caps.caps[SPAPR_CAP_HTM] = SPAPR_CAP_OFF;
smc->default_caps.caps[SPAPR_CAP_VSX] = SPAPR_CAP_ON;