Eduardo Habkost <ehabkost@xxxxxxxxxx> writes: > On Fri, Jun 07, 2019 at 07:39:17PM +0200, Markus Armbruster wrote: >> This is correct when the TYPE_VIRT_MACHINE, TYPE_PC_MACHINE and >> TYPE_SPAPR_MACHINE are exactly the machines supporting NUMA. How could >> I check that? > > parse_numa_node() rejects the -numa option if the machine doesn't > implement MachineClass::get_default_cpu_node_id(). > > Grepping for it: > > $ git grep -pw get_default_cpu_node_id > hw/arm/virt.c=static void virt_machine_class_init(ObjectClass *oc, void *data) > hw/arm/virt.c: mc->get_default_cpu_node_id = virt_get_default_cpu_node_id; > hw/core/machine.c=static void machine_numa_finish_cpu_init(MachineState *machine) > hw/core/machine.c: props.node_id = mc->get_default_cpu_node_id(machine, i); > hw/i386/pc.c=static void pc_machine_class_init(ObjectClass *oc, void *data) > hw/i386/pc.c: mc->get_default_cpu_node_id = pc_get_default_cpu_node_id; > hw/ppc/spapr.c=static void spapr_machine_class_init(ObjectClass *oc, void *data) > hw/ppc/spapr.c: mc->get_default_cpu_node_id = spapr_get_default_cpu_node_id; > include/hw/boards.h=typedef struct { > include/hw/boards.h: * @get_default_cpu_node_id: > include/hw/boards.h=struct MachineClass { > include/hw/boards.h: int64_t (*get_default_cpu_node_id)(const MachineState *ms, int idx); > numa.c=static void parse_numa_node(MachineState *ms, NumaNodeOptions *node, > numa.c: if (!mc->cpu_index_to_instance_props || !mc->get_default_cpu_node_id) { > > > Related: > [PATCH v4 01/11] numa: move numa global variable nb_numa_nodes into MachineState > which adds a MachineClass::numa_supported flag to those machines. Thanks, Eduardo! Preferably with commit message and doc comment tweaked: Reviewed-by: Markus Armbruster <armbru@xxxxxxxxxx> -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list