diff options
-rw-r--r-- | hw/arm/virt.c | 1 | ||||
-rw-r--r-- | hw/core/machine-qmp-cmds.c | 1 | ||||
-rw-r--r-- | hw/i386/pc.c | 1 | ||||
-rw-r--r-- | hw/ppc/spapr.c | 1 | ||||
-rw-r--r-- | include/hw/boards.h | 3 | ||||
-rw-r--r-- | qapi/machine.json | 5 |
6 files changed, 11 insertions, 1 deletions
diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 20f191bc93..0b5138cb22 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 14dbad1d6e..754ce77664 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 2107532d12..14f7b4532e 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 51256ac9ca..821f0d4a49 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; diff --git a/include/hw/boards.h b/include/hw/boards.h index d84f48c4af..ae7a542511 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -160,6 +160,8 @@ typedef struct { * @kvm_type: * Return the type of KVM corresponding to the kvm-type string option or * computed based on other criteria such as the host kernel capabilities. + * @numa_mem_supported: + * true if '--numa node.mem' option is supported and false otherwise */ struct MachineClass { /*< private >*/ @@ -212,6 +214,7 @@ struct MachineClass { bool ignore_boot_device_suffixes; bool smbus_no_migration_support; bool nvdimm_supported; + bool numa_mem_supported; HotplugHandler *(*get_hotplug_handler)(MachineState *machine, DeviceState *dev); diff --git a/qapi/machine.json b/qapi/machine.json index 979bc41e49..78d34ef717 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -318,12 +318,15 @@ # # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0) # +# @numa-mem-supported: true if '-numa node,mem' option is supported by +# the machine type and false otherwise (since 4.1) +# # Since: 1.2.0 ## { 'struct': 'MachineInfo', 'data': { 'name': 'str', '*alias': 'str', '*is-default': 'bool', 'cpu-max': 'int', - 'hotpluggable-cpus': 'bool'} } + 'hotpluggable-cpus': 'bool', 'numa-mem-supported': 'bool'} } ## # @query-machines: |