From nobody Mon Feb 9 04:46:39 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1592317209; cv=none; d=zohomail.com; s=zohoarc; b=BL4D2kdzmoR5MQK40Ugk9k7pvPZeIOvjARYzPT4PKFCPRTq+EALqJoh/4lBSIMvPdLxu58VZasq406OXezEfpoATWU5TEMxOgHhWERKUIJ6JRBam/9hp8dNURRIPfq0gZ2ceQKzjbhzoja+JHwY0zLxn6GaCBh0Y8k20w8Nu97M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592317209; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=2om/n6j/KN2TdtxPEqFhJaW70WBM2nI5WC5aQncvJV0=; b=QZQ4WmkuxNsc++kyTa1d/Jnn8kz+u2otlcE377HbuCFIeIIQoSc3fTS5OsfqPYilIFU48UJAhz/6+60LD1sMsyaS2IXP7Xl9vMRJ+5v6eJVshiLyOByPt5E6RZi8lqo8S5E5fGozw3pbaWwEAeKb8fojH2bdWdD2DwjCGh2r1Ls= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1592317209177562.7530596633295; Tue, 16 Jun 2020 07:20:09 -0700 (PDT) Received: from localhost ([::1]:55634 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jlCRb-0004oX-TB for importer@patchew.org; Tue, 16 Jun 2020 10:20:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57138) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jlCPB-00010V-2A; Tue, 16 Jun 2020 10:17:37 -0400 Received: from mail-ot1-x336.google.com ([2607:f8b0:4864:20::336]:37383) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jlCP9-0006WQ-4R; Tue, 16 Jun 2020 10:17:36 -0400 Received: by mail-ot1-x336.google.com with SMTP id v13so16026841otp.4; Tue, 16 Jun 2020 07:17:33 -0700 (PDT) Received: from localhost (76-251-165-188.lightspeed.austtx.sbcglobal.net. [76.251.165.188]) by smtp.gmail.com with ESMTPSA id g10sm4072699otn.34.2020.06.16.07.17.31 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Jun 2020 07:17:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=2om/n6j/KN2TdtxPEqFhJaW70WBM2nI5WC5aQncvJV0=; b=XFL9dDk2CaS4A3U39+X98CzI2K3xIGEETWv1IbKp7ztJWxXUsQ/RIpQjMQnnqFeOn+ tqTX12tWh7WhH+p0zPogEcqOliWPUQsfWah0ddiupmmKFoHxYh+zGkqa75El+fkI8Rj9 LMGVjx/RwvMQb0exilEhBnFugjuzDvL99iu12PK3ho5cWK1LUS1sz+f9Uh5AZ6zMeA8X 2+lWmzUNOZbVVM2YeQ9F4f5rP8WM2ftmfFOM0B3XdTYKPJ4p7WXGyV7K2rE7673gsXnV 14Cf9GKtBoAagrOJUas8p4Hqy3Rzik2tAloRp2Hs6PkCHuyLa+haqQ7JZThG/5uKqDw+ 3FSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=2om/n6j/KN2TdtxPEqFhJaW70WBM2nI5WC5aQncvJV0=; b=R19yEkyx+YoAUnwrGQcMFvVVX48vimZa3fi/WoTe+X3KSlqBIHbVodyY/N9s92rvBo AtJfGzGMsh3MBB+bVS7Da3k04aodcgN5gMLDR2dLvpLG7BBeojKyk679CyC4uD5gBcOO UhxRGk/NxsSdlQHreMMc6nrNR3dsf+mubMgQFar7ws4Y45fLJQGvnqlqXQ22+ZqKmdUo iyC0/eygSi4N/tdICzgc1qHqevLYsq4i+jzhPrvJ2FMJJMUC23hfNg0FHxyitQXaQI5o bhXPt1UPnevDafA7Z+sHFD9ATqif7s0Ue7BBZRWXQVIiNZ4Gwx90L8px8FOa8Wd638qq CPJA== X-Gm-Message-State: AOAM533rrthXP1mIeC/fLwiRwhG62pZxrySKUDNps6XbPViaE7Jydrtk tWohFliLJL5aw5B1KuzQlwv1JtUM X-Google-Smtp-Source: ABdhPJzNerOYN9Do4YP5TfJx+zNt7p5YI/XAgAnO0IYKLeweCtQb6UJoF073i+1uCbVazmIC869ghQ== X-Received: by 2002:a9d:3a24:: with SMTP id j33mr2505701otc.271.1592317052511; Tue, 16 Jun 2020 07:17:32 -0700 (PDT) From: Michael Roth To: qemu-devel@nongnu.org Subject: [PATCH 09/78] numa: properly check if numa is supported Date: Tue, 16 Jun 2020 09:14:38 -0500 Message-Id: <20200616141547.24664-10-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200616141547.24664-1-mdroth@linux.vnet.ibm.com> References: <20200616141547.24664-1-mdroth@linux.vnet.ibm.com> Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::336; envelope-from=flukshun@gmail.com; helo=mail-ot1-x336.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=1, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Igor Mammedov , qemu-stable@nongnu.org, Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Igor Mammedov Commit aa57020774b, by mistake used MachineClass::numa_mem_supported to check if NUMA is supported by machine and also as unrelated change set it to true for sbsa-ref board. Luckily change didn't break machines that support NUMA, as the field is set to true for them. But the field is not intended for checking if NUMA is supported and will be flipped to false within this release for new machine types. Fix it: - by using previously used condition !mc->cpu_index_to_instance_props || !mc->get_default_cpu_node_id the first time and then use MachineState::numa_state down the road to check if NUMA is supported - dropping stray sbsa-ref chunk Fixes: aa57020774b690a22be72453b8e91c9b5a68c516 Signed-off-by: Igor Mammedov Message-Id: <1576154936-178362-3-git-send-email-imammedo@redhat.com> Signed-off-by: Eduardo Habkost (cherry picked from commit fcd3f2cc124600385dba46c69a80626985c15b50) Signed-off-by: Michael Roth --- hw/arm/sbsa-ref.c | 1 - hw/core/machine.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c index 27046cc284..c6261d44a4 100644 --- a/hw/arm/sbsa-ref.c +++ b/hw/arm/sbsa-ref.c @@ -791,7 +791,6 @@ static void sbsa_ref_class_init(ObjectClass *oc, void *= data) mc->possible_cpu_arch_ids =3D sbsa_ref_possible_cpu_arch_ids; mc->cpu_index_to_instance_props =3D sbsa_ref_cpu_index_to_props; mc->get_default_cpu_node_id =3D sbsa_ref_get_default_cpu_node_id; - mc->numa_mem_supported =3D true; } =20 static const TypeInfo sbsa_ref_info =3D { diff --git a/hw/core/machine.c b/hw/core/machine.c index 1689ad3bf8..aa63231f31 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -958,7 +958,7 @@ static void machine_initfn(Object *obj) NULL); } =20 - if (mc->numa_mem_supported) { + if (mc->cpu_index_to_instance_props && mc->get_default_cpu_node_id) { ms->numa_state =3D g_new0(NumaState, 1); } =20 @@ -1102,7 +1102,7 @@ void machine_run_board_init(MachineState *machine) { MachineClass *machine_class =3D MACHINE_GET_CLASS(machine); =20 - if (machine_class->numa_mem_supported) { + if (machine->numa_state) { numa_complete_configuration(machine); if (machine->numa_state->num_nodes) { machine_numa_finish_cpu_init(machine); --=20 2.17.1