From nobody Mon Nov 25 09:45:15 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1716476813; cv=none; d=zohomail.com; s=zohoarc; b=eUL/FbBonTL9Ik8DjzvFaAeQmqZdfbWWteiQk5KCqyGWRuTpVIpr/uWu1DrZ3cIL2ahwyFn7R3Lb8M5g2RanETbSk1JCRoZ5CH+bSk7x8VI8j37zw5d26vv/TzaGOYP6gMN98AIGaVFtHSNaUNF/ku/1AJ6lX2aBZYpKAej5Fyk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1716476813; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=CHCUPvn1Si9c0g9Vgq43/WNne2Jx2ZEuJMMlB1q2KHs=; b=URSUgDtPvTSo28r/8/lXuPX/dPbv6wqZCAo/JwrEuq0cKU9JWM/VezQByO9hXCxp1+Xk1ojHFR9hMXRzFVe+1ZE7zYiZfLWBqgpZqnliA/T6a9EZoinkU0E1McMV2MfWwZSm+dbreK7jZMBcalKRtMm5VsTVJ+oaXy4JInTLX9Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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 1716476813599877.2849548773557; Thu, 23 May 2024 08:06:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sA9ws-0007yH-3P; Thu, 23 May 2024 11:01:42 -0400 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 1sA9wj-00076K-RV for qemu-devel@nongnu.org; Thu, 23 May 2024 11:01:35 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sA9wi-0004u6-1h for qemu-devel@nongnu.org; Thu, 23 May 2024 11:01:33 -0400 Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-402-4XcV9T0VNG25jdnWPLM0ag-1; Thu, 23 May 2024 11:01:29 -0400 Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-578282c81bcso1284510a12.2 for ; Thu, 23 May 2024 08:01:29 -0700 (PDT) Received: from avogadro.local ([151.95.155.52]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5733c34fed1sm19885745a12.96.2024.05.23.08.01.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 08:01:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1716476491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CHCUPvn1Si9c0g9Vgq43/WNne2Jx2ZEuJMMlB1q2KHs=; b=M87NlbDLhYRvlTiqed2SFVlWjQAWHOm3+PCpFgFlk14KO0x4g4e3MYi3+Mp77zyW+fhD+y YvIgFANmMp2xXWO6m4hMiHR5YDdTI+iU7E3eNdiJhTyLuliHUeCy2BKPs2EzuRAPVJN/dS 8hYepua2aB3z3jwbYgdS4rC5Gf+wHss= X-MC-Unique: 4XcV9T0VNG25jdnWPLM0ag-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716476488; x=1717081288; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CHCUPvn1Si9c0g9Vgq43/WNne2Jx2ZEuJMMlB1q2KHs=; b=nSiickyxU8mffXu+8QbTpI9XeZugwGOI+/H2cFbAz40DHy7fUkXKRKapUff43DG55d 0mIvmsYY0TXbjEc+HxBFOpYcX7q6L4wb0GDap1xeOFPycKQC2CYfGjV2J9T5JwC0/F3O Je0cpVEakSo1e5/HTdw2FtIHcJuNnP/av7Pq3RJhgYAN6KEtB32SDfpAoGWfvv1zzaa/ vnXuF2WWj5oNG6g1E/bVSNSiP7RQyNresBncB0vzdpzV7c3u54yfLzYqi4GNR2uLvke0 bti3RYcUws+uDjJZrcQFw88NzNUjePilKt2BERrTbnjTdIEmVQ/RcusuIdBy+MGRpqUH q7Vw== X-Gm-Message-State: AOJu0YwOtrqbQw7iou8Rs/hZkHwMa93+3PvVKM3vXG9xNOS5zn4SIisN xc2PBinVhZxxo7Yz3BHdPDlqFp48Oo5i7bOSJ2pdJwl3ZPoP0C+LrqNJExMm4DFz+uqpWhFHey5 BBaABQwKVcY93vw0s7IUcYCSb09nI+K9b6wHLlKT4cDhkLyKdZSeAPHJe7sCBma3v4067/ODDI4 etLYZ3qDJEUi9fT7pyJPk3hGohqPgwhBcJJ0Vy X-Received: by 2002:a50:d789:0:b0:578:25c9:b990 with SMTP id 4fb4d7f45d1cf-57832a3a1b2mr5199791a12.20.1716476487262; Thu, 23 May 2024 08:01:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGbcF3+fXwCypRxfjpnpXkUjfvuUquXjGrPBlxFwUFEA1MK2JR/HBw1JlM9goij8dgyS1SoMQ== X-Received: by 2002:a50:d789:0:b0:578:25c9:b990 with SMTP id 4fb4d7f45d1cf-57832a3a1b2mr5199756a12.20.1716476486788; Thu, 23 May 2024 08:01:26 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Zhao Liu , Yongwei Ma , Zhuocheng Ding , Babu Moger Subject: [PULL 19/23] hw/i386/pc: Support smp.modules for x86 PC machine Date: Thu, 23 May 2024 17:00:32 +0200 Message-ID: <20240523150036.1050011-20-pbonzini@redhat.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240523150036.1050011-1-pbonzini@redhat.com> References: <20240523150036.1050011-1-pbonzini@redhat.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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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.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 @redhat.com) X-ZM-MESSAGEID: 1716476815529100005 Content-Type: text/plain; charset="utf-8" From: Zhao Liu As module-level topology support is added to X86CPU, now we can enable the support for the modules 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*,modules=3D*,cores=3D*,thread= s=3D*. So, add the 5-level topology example in description of "-smp". Additionally, add the missed drawers and books options in previous example. Tested-by: Yongwei Ma Co-developed-by: Zhuocheng Ding Signed-off-by: Zhuocheng Ding Signed-off-by: Zhao Liu Tested-by: Babu Moger Reviewed-by: Babu Moger Message-ID: <20240424154929.1487382-19-zhao1.liu@intel.com> Signed-off-by: Paolo Bonzini --- hw/i386/pc.c | 1 + qemu-options.hx | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 6126bfdd2a7..7b638da7aaa 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1843,6 +1843,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.modules_supported =3D true; mc->default_ram_id =3D "pc.ram"; pcmc->default_smbios_ep_type =3D SMBIOS_ENTRY_POINT_TYPE_AUTO; =20 diff --git a/qemu-options.hx b/qemu-options.hx index 4d196603368..8ca7f34ef0c 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -281,7 +281,8 @@ ERST =20 DEF("smp", HAS_ARG, QEMU_OPTION_smp, "-smp [[cpus=3D]n][,maxcpus=3Dmaxcpus][,drawers=3Ddrawers][,books=3Dbo= oks][,sockets=3Dsockets]\n" - " [,dies=3Ddies][,clusters=3Dclusters][,cores=3Dcores][,= threads=3Dthreads]\n" + " [,dies=3Ddies][,clusters=3Dclusters][,modules=3Dmodule= s][,cores=3Dcores]\n" + " [,threads=3Dthreads]\n" " set the number of initial CPUs to 'n' [default=3D1]\n" " maxcpus=3D maximum number of total CPUs, including\n" " offline CPUs for hotplug, etc\n" @@ -290,7 +291,8 @@ DEF("smp", HAS_ARG, QEMU_OPTION_smp, " sockets=3D number of sockets in one book\n" " dies=3D number of dies in one socket\n" " clusters=3D number of clusters in one die\n" - " cores=3D number of cores in one cluster\n" + " modules=3D number of modules in one cluster\n" + " cores=3D number of cores in one module\n" " threads=3D number of threads in one core\n" "Note: Different machines may have different subsets of the CPU topolo= gy\n" " parameters supported, so the actual meaning of the supported pa= rameters\n" @@ -306,7 +308,7 @@ DEF("smp", HAS_ARG, QEMU_OPTION_smp, " must be set as 1 in the purpose of correct parsing.\n", QEMU_ARCH_ALL) SRST -``-smp [[cpus=3D]n][,maxcpus=3Dmaxcpus][,sockets=3Dsockets][,dies=3Ddies][= ,clusters=3Dclusters][,cores=3Dcores][,threads=3Dthreads]`` +``-smp [[cpus=3D]n][,maxcpus=3Dmaxcpus][,drawers=3Ddrawers][,books=3Dbooks= ][,sockets=3Dsockets][,dies=3Ddies][,clusters=3Dclusters][,modules=3Dmodule= s][,cores=3Dcores][,threads=3Dthreads]`` Simulate a SMP system with '\ ``n``\ ' CPUs initially present on the machine type board. On boards supporting CPU hotplug, the optional '\ ``maxcpus``\ ' parameter can be set to enable further CPUs to be @@ -345,14 +347,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 modules per die, 2 cores = per + module, 2 threads per core) for PC machines which support sockets/dies + /modules/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,modules=3D2,cores=3D2,threads=3D2,max= cpus=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.45.1