From nobody Thu Mar 28 22:16:22 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1495550637509987.8967728026923; Tue, 23 May 2017 07:43:57 -0700 (PDT) Received: from localhost ([::1]:49441 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dDB2R-0003rU-Uh for importer@patchew.org; Tue, 23 May 2017 10:43:55 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48460) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dDAxg-0008JO-On for qemu-devel@nongnu.org; Tue, 23 May 2017 10:39:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dDAxf-0002ap-ET for qemu-devel@nongnu.org; Tue, 23 May 2017 10:39:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49008) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dDAxb-0002UY-Od; Tue, 23 May 2017 10:38:55 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9C7E88553F; Tue, 23 May 2017 14:38:54 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.34.112.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4EFB07814F; Tue, 23 May 2017 14:38:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 9C7E88553F Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=imammedo@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 9C7E88553F From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 23 May 2017 16:38:46 +0200 Message-Id: <1495550330-34087-2-git-send-email-imammedo@redhat.com> In-Reply-To: <1495550330-34087-1-git-send-email-imammedo@redhat.com> References: <1495550330-34087-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 23 May 2017 14:38:54 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 1/5] numa: consolidate cpu_preplug fixups/checks for pc/arm/spapr X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jones , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Eduardo Habkost , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Igor Mammedov Reviewed-by: David Gibson --- v2: user error_abort in numa_cpu_pre_plug() Eduardo Habkost --- include/sysemu/numa.h | 1 + hw/arm/virt.c | 16 ++-------------- hw/i386/pc.c | 17 +---------------- hw/ppc/spapr.c | 17 +---------------- numa.c | 22 ++++++++++++++++++++++ 5 files changed, 27 insertions(+), 46 deletions(-) diff --git a/include/sysemu/numa.h b/include/sysemu/numa.h index 7ffde5b..610eece 100644 --- a/include/sysemu/numa.h +++ b/include/sysemu/numa.h @@ -35,4 +35,5 @@ void numa_legacy_auto_assign_ram(MachineClass *mc, NodeIn= fo *nodes, int nb_nodes, ram_addr_t size); void numa_default_auto_assign_ram(MachineClass *mc, NodeInfo *nodes, int nb_nodes, ram_addr_t size); +void numa_cpu_pre_plug(const CPUArchId *slot, DeviceState *dev, Error **er= rp); #endif diff --git a/hw/arm/virt.c b/hw/arm/virt.c index c7c8159..ce676df 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1351,7 +1351,6 @@ static void machvirt_init(MachineState *machine) for (n =3D 0; n < possible_cpus->len; n++) { Object *cpuobj; CPUState *cs; - int node_id; =20 if (n >=3D smp_cpus) { break; @@ -1364,19 +1363,8 @@ static void machvirt_init(MachineState *machine) cs =3D CPU(cpuobj); cs->cpu_index =3D n; =20 - node_id =3D possible_cpus->cpus[cs->cpu_index].props.node_id; - if (!possible_cpus->cpus[cs->cpu_index].props.has_node_id) { - /* by default CPUState::numa_node was 0 if it's not set via CLI - * keep it this way for now but in future we probably should - * refuse to start up with incomplete numa mapping */ - node_id =3D 0; - } - if (cs->numa_node =3D=3D CPU_UNSET_NUMA_NODE_ID) { - cs->numa_node =3D node_id; - } else { - /* CPU isn't device_add compatible yet, this shouldn't happen = */ - error_setg(&error_abort, "user set node-id not implemented"); - } + numa_cpu_pre_plug(&possible_cpus->cpus[cs->cpu_index], DEVICE(cpuo= bj), + &error_fatal); =20 if (!vms->secure) { object_property_set_bool(cpuobj, false, "has_el3", NULL); diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 816bfa8..cf09949 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1893,7 +1893,6 @@ static void pc_cpu_pre_plug(HotplugHandler *hotplug_d= ev, DeviceState *dev, Error **errp) { int idx; - int node_id; CPUState *cs; CPUArchId *cpu_slot; X86CPUTopoInfo topo; @@ -1984,21 +1983,7 @@ static void pc_cpu_pre_plug(HotplugHandler *hotplug_= dev, cs =3D CPU(cpu); cs->cpu_index =3D idx; =20 - node_id =3D cpu_slot->props.node_id; - if (!cpu_slot->props.has_node_id) { - /* by default CPUState::numa_node was 0 if it's not set via CLI - * keep it this way for now but in future we probably should - * refuse to start up with incomplete numa mapping */ - node_id =3D 0; - } - if (cs->numa_node =3D=3D CPU_UNSET_NUMA_NODE_ID) { - cs->numa_node =3D node_id; - } else if (cs->numa_node !=3D node_id) { - error_setg(errp, "node-id %d must match numa node specified" - "with -numa option for cpu-index %d", - cs->numa_node, cs->cpu_index); - return; - } + numa_cpu_pre_plug(cpu_slot, dev, errp); } =20 static void pc_machine_device_pre_plug_cb(HotplugHandler *hotplug_dev, diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 0980d73..c7fee8b 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -2831,11 +2831,9 @@ static void spapr_core_pre_plug(HotplugHandler *hotp= lug_dev, DeviceState *dev, MachineClass *mc =3D MACHINE_GET_CLASS(hotplug_dev); Error *local_err =3D NULL; CPUCore *cc =3D CPU_CORE(dev); - sPAPRCPUCore *sc =3D SPAPR_CPU_CORE(dev); char *base_core_type =3D spapr_get_cpu_core_type(machine->cpu_model); const char *type =3D object_get_typename(OBJECT(dev)); CPUArchId *core_slot; - int node_id; int index; =20 if (dev->hotplugged && !mc->has_hotpluggable_cpus) { @@ -2870,20 +2868,7 @@ static void spapr_core_pre_plug(HotplugHandler *hotp= lug_dev, DeviceState *dev, goto out; } =20 - node_id =3D core_slot->props.node_id; - if (!core_slot->props.has_node_id) { - /* by default CPUState::numa_node was 0 if it's not set via CLI - * keep it this way for now but in future we probably should - * refuse to start up with incomplete numa mapping */ - node_id =3D 0; - } - if (sc->node_id =3D=3D CPU_UNSET_NUMA_NODE_ID) { - sc->node_id =3D node_id; - } else if (sc->node_id !=3D node_id) { - error_setg(&local_err, "node-id %d must match numa node specified" - "with -numa option for cpu-index %d", sc->node_id, cc->core_id= ); - goto out; - } + numa_cpu_pre_plug(core_slot, dev, &local_err); =20 out: g_free(base_core_type); diff --git a/numa.c b/numa.c index ca73145..723f5f8 100644 --- a/numa.c +++ b/numa.c @@ -534,6 +534,28 @@ void parse_numa_opts(MachineState *ms) } } =20 +void numa_cpu_pre_plug(const CPUArchId *slot, DeviceState *dev, Error **er= rp) +{ + int node_id =3D object_property_get_int(OBJECT(dev), "node-id", &error= _abort); + + if (node_id =3D=3D CPU_UNSET_NUMA_NODE_ID) { + /* by default CPUState::numa_node was 0 if it wasn't set explicitly + * TODO: make it error when incomplete numa mapping support is rem= oved + */ + node_id =3D 0; + + /* due to bug in libvirt, it doesn't pass node-id from props on + * device_add as expected, so we have to fix it up here */ + if (slot->props.has_node_id) { + node_id =3D slot->props.node_id; + } + object_property_set_int(OBJECT(dev), node_id, "node-id", errp); + } else if (node_id !=3D slot->props.node_id) { + error_setg(errp, "node-id=3D%d must match numa node specified " + "with -numa option", node_id); + } +} + static void allocate_system_memory_nonnuma(MemoryRegion *mr, Object *owner, const char *name, uint64_t ram_size) --=20 2.7.4 From nobody Thu Mar 28 22:16:22 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 14955504727011014.8489188878156; Tue, 23 May 2017 07:41:12 -0700 (PDT) Received: from localhost ([::1]:49420 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dDAzn-0001Uh-3M for importer@patchew.org; Tue, 23 May 2017 10:41:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48478) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dDAxh-0008Jq-8u for qemu-devel@nongnu.org; Tue, 23 May 2017 10:39:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dDAxg-0002cT-4z for qemu-devel@nongnu.org; Tue, 23 May 2017 10:39:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49066) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dDAxd-0002Wn-DS; Tue, 23 May 2017 10:38:57 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5391985540; Tue, 23 May 2017 14:38:56 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.34.112.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id DFBAA7814F; Tue, 23 May 2017 14:38:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 5391985540 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=imammedo@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 5391985540 From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 23 May 2017 16:38:47 +0200 Message-Id: <1495550330-34087-3-git-send-email-imammedo@redhat.com> In-Reply-To: <1495550330-34087-1-git-send-email-imammedo@redhat.com> References: <1495550330-34087-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 23 May 2017 14:38:56 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 2/5] numa: move default mapping init to machine X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jones , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Eduardo Habkost , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" there is no need use cpu_index_to_instance_props() for setting default cpu -> node mapping. Generic machine code can do it without cpu_index by just enabling already preset defaults in possible_cpus. PS: as bonus it makes one less user of cpu_index_to_instance_props() Signed-off-by: Igor Mammedov --- v2: - make default_mapping boolean, Eduardo Habkost - redo default mapping detection loop as a combo of for/if, Eduardo Habkost - return back lost TODO comment, Eduardo Habkost --- hw/core/machine.c | 33 +++++++++++++++++++++++---------- numa.c | 26 -------------------------- 2 files changed, 23 insertions(+), 36 deletions(-) diff --git a/hw/core/machine.c b/hw/core/machine.c index fd6a436..aaf3cff 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -700,26 +700,39 @@ static char *cpu_slot_to_string(const CPUArchId *cpu) return g_string_free(s, false); } =20 -static void machine_numa_validate(MachineState *machine) +static void machine_numa_finish_init(MachineState *machine) { int i; + bool default_mapping; GString *s =3D g_string_new(NULL); MachineClass *mc =3D MACHINE_GET_CLASS(machine); const CPUArchIdList *possible_cpus =3D mc->possible_cpu_arch_ids(machi= ne); =20 assert(nb_numa_nodes); for (i =3D 0; i < possible_cpus->len; i++) { + if (possible_cpus->cpus[i].props.has_node_id) { + break; + } + } + default_mapping =3D (i =3D=3D possible_cpus->len); + + for (i =3D 0; i < possible_cpus->len; i++) { const CPUArchId *cpu_slot =3D &possible_cpus->cpus[i]; =20 - /* at this point numa mappings are initilized by CLI options - * or with default mappings so it's sufficient to list - * all not yet mapped CPUs here */ - /* TODO: make it hard error in future */ if (!cpu_slot->props.has_node_id) { - char *cpu_str =3D cpu_slot_to_string(cpu_slot); - g_string_append_printf(s, "%sCPU %d [%s]", s->len ? ", " : "",= i, - cpu_str); - g_free(cpu_str); + if (default_mapping) { + /* fetch default mapping from board and enable it */ + CpuInstanceProperties props =3D cpu_slot->props; + props.has_node_id =3D true; + machine_set_cpu_numa_node(machine, &props, &error_fatal); + } else { + /* record slots with not set mapping, + * TODO: make it hard error in future */ + char *cpu_str =3D cpu_slot_to_string(cpu_slot); + g_string_append_printf(s, "%sCPU %d [%s]", + s->len ? ", " : "", i, cpu_str); + g_free(cpu_str); + } } } if (s->len) { @@ -737,7 +750,7 @@ void machine_run_board_init(MachineState *machine) MachineClass *machine_class =3D MACHINE_GET_CLASS(machine); =20 if (nb_numa_nodes) { - machine_numa_validate(machine); + machine_numa_finish_init(machine); } machine_class->init(machine); } diff --git a/numa.c b/numa.c index 723f5f8..e30702e 100644 --- a/numa.c +++ b/numa.c @@ -427,7 +427,6 @@ void numa_default_auto_assign_ram(MachineClass *mc, Nod= eInfo *nodes, void parse_numa_opts(MachineState *ms) { int i; - const CPUArchIdList *possible_cpus; MachineClass *mc =3D MACHINE_GET_CLASS(ms); =20 if (qemu_opts_foreach(qemu_find_opts("numa"), parse_numa, ms, NULL)) { @@ -485,31 +484,6 @@ void parse_numa_opts(MachineState *ms) =20 numa_set_mem_ranges(); =20 - /* assign CPUs to nodes using board provided default mapping */ - if (!mc->cpu_index_to_instance_props || !mc->possible_cpu_arch_ids= ) { - error_report("default CPUs to NUMA node mapping isn't supporte= d"); - exit(1); - } - - possible_cpus =3D mc->possible_cpu_arch_ids(ms); - for (i =3D 0; i < possible_cpus->len; i++) { - if (possible_cpus->cpus[i].props.has_node_id) { - break; - } - } - - /* no CPUs are assigned to NUMA nodes */ - if (i =3D=3D possible_cpus->len) { - for (i =3D 0; i < max_cpus; i++) { - CpuInstanceProperties props; - /* fetch default mapping from board and enable it */ - props =3D mc->cpu_index_to_instance_props(ms, i); - props.has_node_id =3D true; - - machine_set_cpu_numa_node(ms, &props, &error_fatal); - } - } - /* QEMU needs at least all unique node pair distances to build * the whole NUMA distance table. QEMU treats the distance table * as symmetric by default, i.e. distance A->B =3D=3D distance B->= A. --=20 2.7.4 From nobody Thu Mar 28 22:16:22 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 14955506230843.957942039517093; Tue, 23 May 2017 07:43:43 -0700 (PDT) Received: from localhost ([::1]:49440 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dDB2D-0003gS-II for importer@patchew.org; Tue, 23 May 2017 10:43:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48608) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dDAxn-0008Pr-3w for qemu-devel@nongnu.org; Tue, 23 May 2017 10:39:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dDAxl-0002hu-2Y for qemu-devel@nongnu.org; Tue, 23 May 2017 10:39:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40768) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dDAxf-0002Yr-3L; Tue, 23 May 2017 10:38:59 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0398B8123E; Tue, 23 May 2017 14:38:58 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.34.112.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id 96BEA7814F; Tue, 23 May 2017 14:38:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0398B8123E Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=imammedo@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 0398B8123E From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 23 May 2017 16:38:48 +0200 Message-Id: <1495550330-34087-4-git-send-email-imammedo@redhat.com> In-Reply-To: <1495550330-34087-1-git-send-email-imammedo@redhat.com> References: <1495550330-34087-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 23 May 2017 14:38:58 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 3/5] numa: make sure that all cpus in has has_node_id set if numa is enabled X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jones , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Eduardo Habkost , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" It fixes/add missing _PXM object for non mapped CPU (x86) and missing fdt node (virt-arm). It ensures that possible_cpus contains complete mapping if numa is enabled by the time machine_init() is executed. As result non completely mapped CPUs: 1) appear in ACPI/fdt blobs 2) QMP query-hotpluggable-cpus command shows bound nodes for such CPUs 3) allows to drop checks for has_node_id in numa only code, reducing number of invariants incomplete mapping could produce 4) moves fixup/implicit node init from runtime numa_cpu_pre_plug() (when CPU object is created) to machine_numa_finish_init() which helps to fix [1, 2] and make possible_cpus complete source of numa mapping available even before CPUs are created. Signed-off-by: Igor Mammedov --- hw/arm/virt-acpi-build.c | 4 +--- hw/core/machine.c | 16 ++++++++++------ hw/i386/acpi-build.c | 3 +-- hw/i386/pc.c | 4 +--- numa.c | 7 +------ 5 files changed, 14 insertions(+), 20 deletions(-) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index e585206..977a794 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -496,12 +496,10 @@ build_srat(GArray *table_data, BIOSLinker *linker, Vi= rtMachineState *vms) srat->reserved1 =3D cpu_to_le32(1); =20 for (i =3D 0; i < cpu_list->len; ++i) { - int node_id =3D cpu_list->cpus[i].props.has_node_id ? - cpu_list->cpus[i].props.node_id : 0; core =3D acpi_data_push(table_data, sizeof(*core)); core->type =3D ACPI_SRAT_PROCESSOR_GICC; core->length =3D sizeof(*core); - core->proximity =3D cpu_to_le32(node_id); + core->proximity =3D cpu_to_le32(cpu_list->cpus[i].props.node_id); core->acpi_processor_uid =3D cpu_to_le32(i); core->flags =3D cpu_to_le32(1); } diff --git a/hw/core/machine.c b/hw/core/machine.c index aaf3cff..964b75d 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -720,19 +720,23 @@ static void machine_numa_finish_init(MachineState *ma= chine) const CPUArchId *cpu_slot =3D &possible_cpus->cpus[i]; =20 if (!cpu_slot->props.has_node_id) { - if (default_mapping) { - /* fetch default mapping from board and enable it */ - CpuInstanceProperties props =3D cpu_slot->props; - props.has_node_id =3D true; - machine_set_cpu_numa_node(machine, &props, &error_fatal); - } else { + /* fetch default mapping from board and enable it */ + CpuInstanceProperties props =3D cpu_slot->props; + + if (!default_mapping) { /* record slots with not set mapping, * TODO: make it hard error in future */ char *cpu_str =3D cpu_slot_to_string(cpu_slot); g_string_append_printf(s, "%sCPU %d [%s]", s->len ? ", " : "", i, cpu_str); g_free(cpu_str); + + /* non mapped cpus used to fallback to node 0 */ + props.node_id =3D 0; } + + props.has_node_id =3D true; + machine_set_cpu_numa_node(machine, &props, &error_fatal); } } if (s->len) { diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index afcadac..873880d 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -2335,8 +2335,7 @@ build_srat(GArray *table_data, BIOSLinker *linker, Ma= chineState *machine) srat->reserved1 =3D cpu_to_le32(1); =20 for (i =3D 0; i < apic_ids->len; i++) { - int node_id =3D apic_ids->cpus[i].props.has_node_id ? - apic_ids->cpus[i].props.node_id : 0; + int node_id =3D apic_ids->cpus[i].props.node_id; uint32_t apic_id =3D apic_ids->cpus[i].arch_id; =20 if (apic_id < 255) { diff --git a/hw/i386/pc.c b/hw/i386/pc.c index cf09949..84f0a6f 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -788,9 +788,7 @@ static FWCfgState *bochs_bios_init(AddressSpace *as, PC= MachineState *pcms) for (i =3D 0; i < cpus->len; i++) { unsigned int apic_id =3D cpus->cpus[i].arch_id; assert(apic_id < pcms->apic_id_limit); - if (cpus->cpus[i].props.has_node_id) { - numa_fw_cfg[apic_id + 1] =3D cpu_to_le64(cpus->cpus[i].props.n= ode_id); - } + numa_fw_cfg[apic_id + 1] =3D cpu_to_le64(cpus->cpus[i].props.node_= id); } for (i =3D 0; i < nb_numa_nodes; i++) { numa_fw_cfg[pcms->apic_id_limit + 1 + i] =3D diff --git a/numa.c b/numa.c index e30702e..4ef6dea 100644 --- a/numa.c +++ b/numa.c @@ -513,17 +513,12 @@ void numa_cpu_pre_plug(const CPUArchId *slot, DeviceS= tate *dev, Error **errp) int node_id =3D object_property_get_int(OBJECT(dev), "node-id", &error= _abort); =20 if (node_id =3D=3D CPU_UNSET_NUMA_NODE_ID) { - /* by default CPUState::numa_node was 0 if it wasn't set explicitly - * TODO: make it error when incomplete numa mapping support is rem= oved - */ - node_id =3D 0; - /* due to bug in libvirt, it doesn't pass node-id from props on * device_add as expected, so we have to fix it up here */ if (slot->props.has_node_id) { node_id =3D slot->props.node_id; + object_property_set_int(OBJECT(dev), node_id, "node-id", errp); } - object_property_set_int(OBJECT(dev), node_id, "node-id", errp); } else if (node_id !=3D slot->props.node_id) { error_setg(errp, "node-id=3D%d must match numa node specified " "with -numa option", node_id); --=20 2.7.4 From nobody Thu Mar 28 22:16:22 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1495550755244117.25774661375272; Tue, 23 May 2017 07:45:55 -0700 (PDT) Received: from localhost ([::1]:49465 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dDB4L-0005UJ-Uz for importer@patchew.org; Tue, 23 May 2017 10:45:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48607) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dDAxn-0008Pq-3Q for qemu-devel@nongnu.org; Tue, 23 May 2017 10:39:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dDAxj-0002gE-3M for qemu-devel@nongnu.org; Tue, 23 May 2017 10:39:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49278) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dDAxg-0002cb-QT; Tue, 23 May 2017 10:39:00 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B173180483; Tue, 23 May 2017 14:38:59 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.34.112.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id 476827BCB1; Tue, 23 May 2017 14:38:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B173180483 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=imammedo@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com B173180483 From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 23 May 2017 16:38:49 +0200 Message-Id: <1495550330-34087-5-git-send-email-imammedo@redhat.com> In-Reply-To: <1495550330-34087-1-git-send-email-imammedo@redhat.com> References: <1495550330-34087-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 23 May 2017 14:38:59 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 4/5] numa: fallback to default NUMA node instead of node 0 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jones , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Eduardo Habkost , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Do the same as we did in commit (57924bcd8 numa: introduce machine callback for VCPU to node mapping) but only for incomplete mapping usecase, falling back to board provided default cpu to node mapping if user hasn't provided mapping for CPU explicitly. Signed-off-by: Igor Mammedov --- hw/core/machine.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/hw/core/machine.c b/hw/core/machine.c index 964b75d..b8df15f 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -730,9 +730,6 @@ static void machine_numa_finish_init(MachineState *mach= ine) g_string_append_printf(s, "%sCPU %d [%s]", s->len ? ", " : "", i, cpu_str); g_free(cpu_str); - - /* non mapped cpus used to fallback to node 0 */ - props.node_id =3D 0; } =20 props.has_node_id =3D true; --=20 2.7.4 From nobody Thu Mar 28 22:16:22 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1495550670299486.2615168498944; Tue, 23 May 2017 07:44:30 -0700 (PDT) Received: from localhost ([::1]:49442 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dDB2x-0004Hk-OM for importer@patchew.org; Tue, 23 May 2017 10:44:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48634) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dDAxo-0008Rj-KZ for qemu-devel@nongnu.org; Tue, 23 May 2017 10:39:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dDAxn-0002jm-BW for qemu-devel@nongnu.org; Tue, 23 May 2017 10:39:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40360) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dDAxi-0002f9-CF; Tue, 23 May 2017 10:39:02 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4DACFC057EC9; Tue, 23 May 2017 14:39:01 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.34.112.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id 01EEF7814F; Tue, 23 May 2017 14:38:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4DACFC057EC9 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=imammedo@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 4DACFC057EC9 From: Igor Mammedov To: qemu-devel@nongnu.org Date: Tue, 23 May 2017 16:38:50 +0200 Message-Id: <1495550330-34087-6-git-send-email-imammedo@redhat.com> In-Reply-To: <1495550330-34087-1-git-send-email-imammedo@redhat.com> References: <1495550330-34087-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 23 May 2017 14:39:01 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 5/5] numa: move numa_node from CPUState into target specific classes X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jones , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Eduardo Habkost , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Move vcpu's assocciated numa_node field out of generic CPUState into inherited classes that actually care about cpu<->numa mapping, i.e: ARMCPU, PowerPCCPU, X86CPU. Signed-off-by: Igor Mammedov --- include/qom/cpu.h | 2 -- target/arm/cpu.h | 2 ++ target/i386/cpu.h | 1 + target/ppc/cpu.h | 1 + hw/ppc/spapr.c | 24 +++++++++++------------- hw/ppc/spapr_cpu_core.c | 4 +++- monitor.c | 11 +++++++---- target/arm/cpu.c | 2 +- target/i386/cpu.c | 2 +- 9 files changed, 27 insertions(+), 22 deletions(-) diff --git a/include/qom/cpu.h b/include/qom/cpu.h index 55214ce..89ddb68 100644 --- a/include/qom/cpu.h +++ b/include/qom/cpu.h @@ -265,7 +265,6 @@ struct qemu_work_item; * @cpu_index: CPU index (informative). * @nr_cores: Number of cores within this CPU package. * @nr_threads: Number of threads within this CPU. - * @numa_node: NUMA node this CPU is belonging to. * @host_tid: Host thread ID. * @running: #true if CPU is currently running (lockless). * @has_waiter: #true if a CPU is currently waiting for the cpu_exec_end; @@ -314,7 +313,6 @@ struct CPUState { =20 int nr_cores; int nr_threads; - int numa_node; =20 struct QemuThread *thread; #ifdef _WIN32 diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 048faed..5ffc9d8 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -703,6 +703,8 @@ struct ARMCPU { =20 ARMELChangeHook *el_change_hook; void *el_change_hook_opaque; + + int32_t node_id; /* NUMA node this CPU is belonging to */ }; =20 static inline ARMCPU *arm_env_get_cpu(CPUARMState *env) diff --git a/target/i386/cpu.h b/target/i386/cpu.h index c4602ca..00f35a0 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -1278,6 +1278,7 @@ struct X86CPU { int32_t socket_id; int32_t core_id; int32_t thread_id; + int32_t node_id; /* NUMA node this CPU is belonging to */ }; =20 static inline X86CPU *x86_env_get_cpu(CPUX86State *env) diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index 401e10e..31c052d 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -1205,6 +1205,7 @@ struct PowerPCCPU { uint32_t compat_pvr; PPCVirtualHypervisor *vhyp; Object *intc; + int32_t node_id; /* NUMA node this CPU is belonging to */ =20 /* Fields related to migration compatibility hacks */ bool pre_2_8_migration; diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index c7fee8b..96a2a74 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -178,25 +178,19 @@ static int spapr_fixup_cpu_smt_dt(void *fdt, int offs= et, PowerPCCPU *cpu, return ret; } =20 -static int spapr_fixup_cpu_numa_dt(void *fdt, int offset, CPUState *cs) +static int spapr_fixup_cpu_numa_dt(void *fdt, int offset, PowerPCCPU *cpu) { - int ret =3D 0; - PowerPCCPU *cpu =3D POWERPC_CPU(cs); int index =3D ppc_get_vcpu_dt_id(cpu); uint32_t associativity[] =3D {cpu_to_be32(0x5), cpu_to_be32(0x0), cpu_to_be32(0x0), cpu_to_be32(0x0), - cpu_to_be32(cs->numa_node), + cpu_to_be32(cpu->node_id), cpu_to_be32(index)}; =20 /* Advertise NUMA via ibm,associativity */ - if (nb_numa_nodes > 1) { - ret =3D fdt_setprop(fdt, offset, "ibm,associativity", associativit= y, + return fdt_setprop(fdt, offset, "ibm,associativity", associativity, sizeof(associativity)); - } - - return ret; } =20 /* Populate the "ibm,pa-features" property */ @@ -321,9 +315,11 @@ static int spapr_fixup_cpu_dt(void *fdt, sPAPRMachineS= tate *spapr) return ret; } =20 - ret =3D spapr_fixup_cpu_numa_dt(fdt, offset, cs); - if (ret < 0) { - return ret; + if (nb_numa_nodes > 1) { + ret =3D spapr_fixup_cpu_numa_dt(fdt, offset, cpu); + if (ret < 0) { + return ret; + } } =20 ret =3D spapr_fixup_cpu_smt_dt(fdt, offset, cpu, compat_smt); @@ -538,7 +534,9 @@ static void spapr_populate_cpu_dt(CPUState *cs, void *f= dt, int offset, _FDT((fdt_setprop(fdt, offset, "ibm,pft-size", pft_size_prop, sizeof(pft_size_prop)))); =20 - _FDT(spapr_fixup_cpu_numa_dt(fdt, offset, cs)); + if (nb_numa_nodes > 1) { + _FDT(spapr_fixup_cpu_numa_dt(fdt, offset, cpu)); + } =20 _FDT(spapr_fixup_cpu_smt_dt(fdt, offset, cpu, compat_smt)); =20 diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c index a17ea07..60baf02 100644 --- a/hw/ppc/spapr_cpu_core.c +++ b/hw/ppc/spapr_cpu_core.c @@ -183,15 +183,17 @@ static void spapr_cpu_core_realize(DeviceState *dev, = Error **errp) for (i =3D 0; i < cc->nr_threads; i++) { char id[32]; CPUState *cs; + PowerPCCPU *cpu; =20 obj =3D sc->threads + i * size; =20 object_initialize(obj, size, typename); cs =3D CPU(obj); + cpu =3D POWERPC_CPU(cs); cs->cpu_index =3D cc->core_id + i; =20 /* Set NUMA node for the threads belonged to core */ - cs->numa_node =3D sc->node_id; + cpu->node_id =3D sc->node_id; =20 snprintf(id, sizeof(id), "thread[%d]", i); object_property_add_child(OBJECT(sc), id, obj, &local_err); diff --git a/monitor.c b/monitor.c index afbacfe..b053c40 100644 --- a/monitor.c +++ b/monitor.c @@ -1697,23 +1697,26 @@ static void hmp_info_mtree(Monitor *mon, const QDic= t *qdict) static void hmp_info_numa(Monitor *mon, const QDict *qdict) { int i; - CPUState *cpu; uint64_t *node_mem; + CpuInfoList *cpu_list, *cpu; =20 + cpu_list =3D qmp_query_cpus(&error_abort); node_mem =3D g_new0(uint64_t, nb_numa_nodes); query_numa_node_mem(node_mem); monitor_printf(mon, "%d nodes\n", nb_numa_nodes); for (i =3D 0; i < nb_numa_nodes; i++) { monitor_printf(mon, "node %d cpus:", i); - CPU_FOREACH(cpu) { - if (cpu->numa_node =3D=3D i) { - monitor_printf(mon, " %d", cpu->cpu_index); + for (cpu =3D cpu_list; cpu; cpu =3D cpu->next) { + if (cpu->value->has_props && cpu->value->props->has_node_id && + cpu->value->props->node_id =3D=3D i) { + monitor_printf(mon, " %" PRIi64, cpu->value->CPU); } } monitor_printf(mon, "\n"); monitor_printf(mon, "node %d size: %" PRId64 " MB\n", i, node_mem[i] >> 20); } + qapi_free_CpuInfoList(cpu_list); g_free(node_mem); } =20 diff --git a/target/arm/cpu.c b/target/arm/cpu.c index c185eb1..09ef3a6 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -1573,7 +1573,7 @@ static Property arm_cpu_properties[] =3D { DEFINE_PROP_UINT32("midr", ARMCPU, midr, 0), DEFINE_PROP_UINT64("mp-affinity", ARMCPU, mp_affinity, ARM64_AFFINITY_INVALID), - DEFINE_PROP_INT32("node-id", CPUState, numa_node, CPU_UNSET_NUMA_NODE_= ID), + DEFINE_PROP_INT32("node-id", ARMCPU, node_id, CPU_UNSET_NUMA_NODE_ID), DEFINE_PROP_END_OF_LIST() }; =20 diff --git a/target/i386/cpu.c b/target/i386/cpu.c index a41d595..ffb5267 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -3986,7 +3986,7 @@ static Property x86_cpu_properties[] =3D { DEFINE_PROP_INT32("core-id", X86CPU, core_id, -1), DEFINE_PROP_INT32("socket-id", X86CPU, socket_id, -1), #endif - DEFINE_PROP_INT32("node-id", CPUState, numa_node, CPU_UNSET_NUMA_NODE_= ID), + DEFINE_PROP_INT32("node-id", X86CPU, node_id, CPU_UNSET_NUMA_NODE_ID), DEFINE_PROP_BOOL("pmu", X86CPU, enable_pmu, false), { .name =3D "hv-spinlocks", .info =3D &qdev_prop_spinlocks }, DEFINE_PROP_BOOL("hv-relaxed", X86CPU, hyperv_relaxed_timing, false), --=20 2.7.4