From nobody Sun Feb 8 20:12:55 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; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1597511228; cv=none; d=zohomail.com; s=zohoarc; b=AjTBkakDNLvMCX/xYnBLRQTNgF5YFwANwar2lJdW2aWCpeh1c+9wnKam63Np8G8noFJ7bwW3WbgKZlSXYfDfYodAdCMbBSoTZGFfeMUDlVpcuqD1ZhFpcGYu1MT+73EBDLehrivSU+nD37ohCoGXmmTAvOaBx1jo2IG8lt0iDj0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1597511228; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=C8DYrGMe3y/eVzf4pXQ5QA0B3zmxOvZQB53ARGNc55o=; b=NdqiPCU0PbbSDw7LoAJlmd328Pnzgm3K6wnUPLwx/D2opFSnVFOU66pL9i39evXuVfYgLDBlrCbqY1hfLQOIFo1lESeej+k0B15Ne3PhpUb9ms37lBfek0ZVdSWdo1k/g+XBaYqnDJMalPvsZRWKpTQOkAdWt2FW/BFSsB1go8k= 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; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1597511228109452.3687856053757; Sat, 15 Aug 2020 10:07:08 -0700 (PDT) Received: from localhost ([::1]:37280 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k6ze6-0003XH-SD for importer@patchew.org; Sat, 15 Aug 2020 13:07:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42514) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k6zdD-0002LH-KK; Sat, 15 Aug 2020 13:06:11 -0400 Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]:39650) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k6zdC-0001Nf-2T; Sat, 15 Aug 2020 13:06:11 -0400 Received: by mail-qt1-x841.google.com with SMTP id w9so9324292qts.6; Sat, 15 Aug 2020 10:06:09 -0700 (PDT) Received: from rekt.ibmuc.com ([2804:431:c7c6:303f:d1dc:35d8:e9f6:c8b]) by smtp.gmail.com with ESMTPSA id p33sm12301018qtp.49.2020.08.14.13.54.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Aug 2020 13:54:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=C8DYrGMe3y/eVzf4pXQ5QA0B3zmxOvZQB53ARGNc55o=; b=qY5qZTA0p9G/ilHt/4N2AYlygJQ9zrO8zKkstj/82g21j3Z8fCgmNrpSVZF640E8ad zoPVZNecnlF0xyTfn71wWKYVDvEECWnCL4MscR04D44Xx0Knofxq6Z1bUsuTBpW7zlcS N2x3zc3wVIVJimwr9oltUyob0t/BabHUPYSSesv8Lr9OxYVOHb/PR3alyjxDpLJk4F2H fM2qOExcRkYU81OQJbX9Zx4OAoF8huoT2dPlAd1xEunHYExqoWqC8kv23/t+DCDT2MsJ h6luOzMZGKCL4PdQCp7DWdNAKp52LU2fcuFC9UGhnB2tNc+WIGuL3TZj1p8lxAAhnYk8 Rl8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=C8DYrGMe3y/eVzf4pXQ5QA0B3zmxOvZQB53ARGNc55o=; b=i+1a358VZJu60xmJDP+o3+iH2TyWtAIQn6s7oR2Qgsd3KEY76dVUZC4e4pCSRCO1aY 4aH/ZPFz/yTTb6muPk7GKdYWV667F8PSvPtbjSvJvci2wl7P4Khtb8TS0Z+6bNDMVERF C16GbOLr3Yz3YkoHXoT1E2MLQEDcw3eqPgStXVMeKQFDonVYHmnuc0c35gjTBx1jMw7v z1JWQFJZXVNNVEzr1fKGl/+K1KE0RMrXVz9uSK+riNlkozMtSzc76GqKyw8HpK2iM1L+ Bd8H3XNj0+1UP5PbUbI7QweU7OX0U50DIF922hknW09aHd7nJvetmJe1rS45USHxDQSe 9c7A== X-Gm-Message-State: AOAM530G33cIr7jX/7OlaGogMGwzFmlx3h4fD3lWesQwmWFCWQ8UsJq6 z7cJtz+LM81FCbhZrSkXuP5bqS08rMItCQ== X-Google-Smtp-Source: ABdhPJyHKq14iTpKYc5wJdXofWA+1bw5OnGOmJEZleZvtQYkThyO13voRwfd9A4CwN83abl0C4k+4w== X-Received: by 2002:ac8:44b9:: with SMTP id a25mr3618711qto.356.1597438480966; Fri, 14 Aug 2020 13:54:40 -0700 (PDT) From: Daniel Henrique Barboza To: qemu-devel@nongnu.org Subject: [PATCH 02/10] numa: introduce MachineClass::forbid_asymmetrical_numa Date: Fri, 14 Aug 2020 17:54:16 -0300 Message-Id: <20200814205424.543857-3-danielhb413@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200814205424.543857-1-danielhb413@gmail.com> References: <20200814205424.543857-1-danielhb413@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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::841; envelope-from=danielhb413@gmail.com; helo=mail-qt1-x841.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: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no 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: Daniel Henrique Barboza , qemu-ppc@nongnu.org, Eduardo Habkost , david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" The pSeries machine does not support asymmetrical NUMA configurations. CC: Eduardo Habkost CC: Marcel Apfelbaum Signed-off-by: Daniel Henrique Barboza --- hw/core/numa.c | 7 +++++++ hw/ppc/spapr.c | 1 + include/hw/boards.h | 1 + 3 files changed, 9 insertions(+) diff --git a/hw/core/numa.c b/hw/core/numa.c index d1a94a14f8..1e81233c1d 100644 --- a/hw/core/numa.c +++ b/hw/core/numa.c @@ -547,6 +547,7 @@ static int parse_numa(void *opaque, QemuOpts *opts, Err= or **errp) */ static void validate_numa_distance(MachineState *ms) { + MachineClass *mc =3D MACHINE_GET_CLASS(ms); int src, dst; bool is_asymmetrical =3D false; int nb_numa_nodes =3D ms->numa_state->num_nodes; @@ -575,6 +576,12 @@ static void validate_numa_distance(MachineState *ms) } =20 if (is_asymmetrical) { + if (mc->forbid_asymmetrical_numa) { + error_report("This machine type does not support " + "asymmetrical numa distances."); + exit(EXIT_FAILURE); + } + for (src =3D 0; src < nb_numa_nodes; src++) { for (dst =3D 0; dst < nb_numa_nodes; dst++) { if (src !=3D dst && numa_info[src].distance[dst] =3D=3D 0)= { diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index dd2fa4826b..3b16edaf4c 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -4512,6 +4512,7 @@ static void spapr_machine_class_init(ObjectClass *oc,= void *data) */ mc->numa_mem_align_shift =3D 28; mc->auto_enable_numa =3D true; + mc->forbid_asymmetrical_numa =3D true; =20 smc->default_caps.caps[SPAPR_CAP_HTM] =3D SPAPR_CAP_OFF; smc->default_caps.caps[SPAPR_CAP_VSX] =3D SPAPR_CAP_ON; diff --git a/include/hw/boards.h b/include/hw/boards.h index bc5b82ad20..dc6cdd1c53 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -215,6 +215,7 @@ struct MachineClass { bool nvdimm_supported; bool numa_mem_supported; bool auto_enable_numa; + bool forbid_asymmetrical_numa; const char *default_ram_id; =20 HotplugHandler *(*get_hotplug_handler)(MachineState *machine, --=20 2.26.2