From nobody Mon Feb 9 10:11:59 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass header.i=@intel.com; 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=pass(p=none dis=none) header.from=linux.intel.com ARC-Seal: i=1; a=rsa-sha256; t=1676280848; cv=none; d=zohomail.com; s=zohoarc; b=mN3KYhjZSZECOONgka75HMoE8KorSwciEJI/P5G61GjRxEjaA8FuHr7auUWFJlffLxzzj2eOMMW6Bn5L+n03UDKAo3Mhh95WNSMqrVcUgalFNg+kjbXGMV8PAGfaIkKfe8jtsCoQR2zTVzGcINicwIoJpIPCr/PbAbDMvRECXjM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676280848; 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=pC8Vf5BZT84+a31y/ZETkb3G/aEqrQJDNzMy+pE3B0I=; b=Yg15fI/u07Jk6nkm58aJXMZdt6twGg9syvE2M9vb/90NSYYpGAAMXnK0S0RGWnN/aqjpVBP1u1GkwtV94NGyeEEgS11vSepp6HsZRpUZm5HHsNJUvY6WLQud35i4aoHyFq/zIFgLxZuPLfXYrnm5VUnD5UOzzEbissTq+EPctS8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=@intel.com; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1676280848318692.3338292175428; Mon, 13 Feb 2023 01:34:08 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pRV9v-0006Dv-JB; Mon, 13 Feb 2023 04:30:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRV9t-00064E-Np for qemu-devel@nongnu.org; Mon, 13 Feb 2023 04:30:01 -0500 Received: from mga02.intel.com ([134.134.136.20]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRV9p-0006TH-2m for qemu-devel@nongnu.org; Mon, 13 Feb 2023 04:30:01 -0500 Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Feb 2023 01:29:51 -0800 Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.112]) by orsmga004.jf.intel.com with ESMTP; 13 Feb 2023 01:29:46 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676280597; x=1707816597; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+Wk4GGeeDTDYXEDiG6v4MedNwJ0pca6ecfn6tCeHb/c=; b=VZLJXmfwaRZhMHhAZVtTwJagzkFjWfJxLgzzWm2MVC+aSx1yGt2y/Kzk FRnjdqYRCihB1xDFTwmWFf+XupYGoeEEsqMfJXDDv8g1RzQsBZQzYpOGP W6ctgA3zI495S4FrC01xIC5JXjrNAiMHc7QeGd6FKN4u84h0V0CiP0Nkz 1wsExlUAi5AV/sKCULUb8P3pwkOAKKw5+HlwPoz1LQD0yE0l8TFrbw4Z9 66/rW1F7DwqcGNBwXDrQED3iuFsgAHGb9SpKm31vCA29yRvM0oJ+zBGnm PkIDrj6ntOAyoDiMXPVAclV8GFamlMzzJpdDZUq+xwpi0whF62V3i0ZQB A==; X-IronPort-AV: E=McAfee;i="6500,9779,10619"; a="318875778" X-IronPort-AV: E=Sophos;i="5.97,293,1669104000"; d="scan'208";a="318875778" X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10619"; a="792660282" X-IronPort-AV: E=Sophos;i="5.97,293,1669104000"; d="scan'208";a="792660282" From: Zhao Liu To: Eduardo Habkost , Marcel Apfelbaum , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Yanan Wang , "Michael S . Tsirkin" , Richard Henderson , Paolo Bonzini , Eric Blake , Markus Armbruster Cc: qemu-devel@nongnu.org, Zhenyu Wang , Dapeng Mi , Zhuocheng Ding , Robert Hoo , Xiaoyao Li , Like Xu , Zhao Liu Subject: [PATCH RESEND 13/18] hw/i386/pc: Support smp.clusters for x86 PC machine Date: Mon, 13 Feb 2023 17:36:20 +0800 Message-Id: <20230213093625.158170-14-zhao1.liu@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230213093625.158170-1-zhao1.liu@linux.intel.com> References: <20230213093625.158170-1-zhao1.liu@linux.intel.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: none client-ip=134.134.136.20; envelope-from=zhao1.liu@linux.intel.com; helo=mga02.intel.com X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @intel.com) X-ZM-MESSAGEID: 1676280848942100003 Content-Type: text/plain; charset="utf-8" From: Zhuocheng Ding As module-level topology support is added to X86CPU, now we can enable the support for the cluster parameter on PC machines. With this support, we can define a 5-level x86 CPU topology with "-smp": -smp cpus=3D*,maxcpus=3D*,sockets=3D*,dies=3D*,clusters=3D*,cores=3D*,threa= ds=3D*. Additionally, add the 5-level topology example in description of "-smp". Signed-off-by: Zhuocheng Ding Signed-off-by: Zhao Liu Reviewed-by: Yanan Wang --- hw/i386/pc.c | 1 + qemu-options.hx | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 6e592bd969aa..c329df56ebd2 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1929,6 +1929,7 @@ static void pc_machine_class_init(ObjectClass *oc, vo= id *data) mc->default_cpu_type =3D TARGET_DEFAULT_CPU_TYPE; mc->nvdimm_supported =3D true; mc->smp_props.dies_supported =3D true; + mc->smp_props.clusters_supported =3D true; mc->default_ram_id =3D "pc.ram"; =20 object_class_property_add(oc, PC_MACHINE_MAX_RAM_BELOW_4G, "size", diff --git a/qemu-options.hx b/qemu-options.hx index 88e93c610314..3caf9da4c3af 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -312,14 +312,14 @@ SRST -smp 8,sockets=3D2,cores=3D2,threads=3D2,maxcpus=3D8 =20 The following sub-option defines a CPU topology hierarchy (2 sockets - totally on the machine, 2 dies per socket, 2 cores per die, 2 threads - per core) for PC machines which support sockets/dies/cores/threads. - Some members of the option can be omitted but their values will be - automatically computed: + totally on the machine, 2 dies per socket, 2 clusters per die, 2 cores= per + cluster, 2 threads per core) for PC machines which support sockets/dies + /clusters/cores/threads. Some members of the option can be omitted but + their values will be automatically computed: =20 :: =20 - -smp 16,sockets=3D2,dies=3D2,cores=3D2,threads=3D2,maxcpus=3D16 + -smp 32,sockets=3D2,dies=3D2,clusters=3D2,cores=3D2,threads=3D2,ma= xcpus=3D32 =20 The following sub-option defines a CPU topology hierarchy (2 sockets totally on the machine, 2 clusters per socket, 2 cores per cluster, --=20 2.34.1