From nobody Wed Nov 27 04:48:02 2024 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=1701354979; cv=none; d=zohomail.com; s=zohoarc; b=a56lK3d3GELlNUBNbzWdHL9w7mQJWrxX+lv155GNH3jEp5fx55c2FW6XRBGLjhXldhJKAkfV4V6HwcaFxDAl+754pIAE0ikxjNOqJmoX/VJyadeaJhDunxAdwUJVZ5fIqSjGPTv+FyWSd4pgl6rH0891spu+aNz8r/H9GSCgrRE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701354979; h=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=H0/HHxPul43ILHrjzXmJE45WyoGhVmQ9EcVwjgMPIwo=; b=H18TWb1Vs/of2HrKzNZr85h0k7STU/Kd/YTt9/yen6YuR8JzGJJihcz4a737LhkMWZL4pzJEHVPL5LqR8VoLPVb7y6X5uChaeex0yvjKI0UYVxjLr7lQX97lVHI3xwtsiq4EkE+ii29G0q8yrj0L6FrVIYZv8FHnnU0qr8BWlQ8= 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 170135497998050.81976760631255; Thu, 30 Nov 2023 06:36:19 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r8i7P-0006p3-QZ; Thu, 30 Nov 2023 09:34:20 -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 1r8i6x-0005zY-Vz; Thu, 30 Nov 2023 09:33:57 -0500 Received: from mgamail.intel.com ([192.55.52.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r8i6v-0001RT-7l; Thu, 30 Nov 2023 09:33:50 -0500 Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2023 06:33:41 -0800 Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.36]) by orsmga005.jf.intel.com with ESMTP; 30 Nov 2023 06:33:32 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701354829; x=1732890829; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=tVF0CmmcOBEuYyYp6LOjwJOc13qp/jolnKC9SQQ9zpo=; b=iuRtElay4mAE7FyVUEtPe003Cf8Glto2UManH4hBv2JTPkrSKS9YMaKI xfJt8lWvuI/QXcpxWhfuMHigIHrhxc9yWASysSlrpti/JKbWxgyZIWQVU WkI46x5IPzOQS+MFp1dBSz3l3ynOeviwhUSpeQvZfaTzdd3MHKU0uiEUV OnD3RDKHBAKA4KV6/YGGXO13Uh/dUVep4M4RPnutRu+aXJ4OkVP0xSrsy jrimARPbe0/HQhz+80YiDhNQ5hx0IW42NQhntKQJVD+d7ogUtFZdq1cGf RbTtA18p+Vu7CAzegA2o+40UM/bfD+UqT7I2x7exnnlmS/nOS4tTPXNGA g==; X-IronPort-AV: E=McAfee;i="6600,9927,10910"; a="479532010" X-IronPort-AV: E=Sophos;i="6.04,239,1695711600"; d="scan'208";a="479532010" X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10910"; a="942730040" X-IronPort-AV: E=Sophos;i="6.04,239,1695711600"; d="scan'208";a="942730040" From: Zhao Liu To: Paolo Bonzini , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Eduardo Habkost , Marcel Apfelbaum , Yanan Wang , Richard Henderson , "Michael S . Tsirkin" , Jason Wang , Nicholas Piggin , Daniel Henrique Barboza , Igor Mammedov , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Barrat?= , David Gibson , Harsh Prateek Bora , Stefano Stabellini , Anthony Perard , Paul Durrant , Gerd Hoffmann , Peter Maydell , Alistair Francis , "Edgar E . Iglesias" , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Bin Meng , Palmer Dabbelt , Weiwei Li , Liu Zhiwei , qemu-devel@nongnu.org, kvm@vger.kernel.org, qemu-ppc@nongnu.org, xen-devel@lists.xenproject.org, qemu-arm@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org Cc: Nina Schoetterl-Glausch , Thomas Huth , Zhiyuan Lv , Zhenyu Wang , Yongwei Ma , Zhao Liu Subject: [RFC 20/41] hw/cpu/cluster: Descript cluster is not only used for TCG in comment Date: Thu, 30 Nov 2023 22:41:42 +0800 Message-Id: <20231130144203.2307629-21-zhao1.liu@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231130144203.2307629-1-zhao1.liu@linux.intel.com> References: <20231130144203.2307629-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=192.55.52.43; envelope-from=zhao1.liu@linux.intel.com; helo=mgamail.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, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: 1701354981181000001 Content-Type: text/plain; charset="utf-8" From: Zhao Liu Update the comment to make the cpu-cluster description more general for both TCG and accel cases. Signed-off-by: Zhao Liu --- hw/cpu/cluster.c | 2 +- include/hw/cpu/cluster.h | 20 +++++++++++++++----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/hw/cpu/cluster.c b/hw/cpu/cluster.c index 340cfad9f8f1..27ab9e25a265 100644 --- a/hw/cpu/cluster.c +++ b/hw/cpu/cluster.c @@ -1,5 +1,5 @@ /* - * QEMU CPU cluster + * CPU cluster abstract device * * Copyright (c) 2018 GreenSocs SAS * diff --git a/include/hw/cpu/cluster.h b/include/hw/cpu/cluster.h index c038f05ddc9f..b3185e2f2566 100644 --- a/include/hw/cpu/cluster.h +++ b/include/hw/cpu/cluster.h @@ -1,5 +1,5 @@ /* - * QEMU CPU cluster + * CPU cluster abstract device * * Copyright (c) 2018 GreenSocs SAS * @@ -24,17 +24,27 @@ #include "qom/object.h" =20 /* - * CPU Cluster type + * # CPU Cluster * - * A cluster is a group of CPUs which are all identical and have the same = view - * of the rest of the system. It is mainly an internal QEMU representation= and - * does not necessarily match with the notion of clusters on the real hard= ware. + * A cluster is a group of CPUs, that is, a level above the CPU (or Core). + * + * - For accel case, it's a CPU topology level concept above cores, in whi= ch + * the cores may share some resources (L2 cache or some others like L3 + * cache tags, depending on the Archs). It is used to emulate the physical + * CPU cluster/module. + * + * - For TCG, cluster is used to organize CPUs directly without core. In o= ne + * cluster, CPUs are all identical and have the same view of the rest of t= he + * system. It is mainly an internal QEMU representation and may not necess= arily + * match with the notion of clusters on the real hardware. * * If CPUs are not identical (for example, Cortex-A53 and Cortex-A57 CPUs = in an * Arm big.LITTLE system) they should be in different clusters. If the CPU= s do * not have the same view of memory (for example the main CPU and a manage= ment * controller processor) they should be in different clusters. * + * # Use case for cluster in TCG + * * A cluster is created by creating an object of TYPE_CPU_CLUSTER, and then * adding the CPUs to it as QOM child objects (e.g. using the * object_initialize_child() or object_property_add_child() functions). --=20 2.34.1