From nobody Tue Dec 24 13:45:09 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=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1734607021; cv=none; d=zohomail.com; s=zohoarc; b=BCRnCeeftxDFprfho0TtZHoSm8wGINS63+klcOgsxQ8O8p6d+/YVDdhsMq0MR5BkRX8nmE9tjP+vUPfzCnuEp//hVxBD7zmm9k03TmCTugZYu/rkp/U797zrfzM2tef1zizPvZbP5Z11kyjqdb2vHa9g9jXs6xLdkDwN12kuJiI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734607021; 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=q0hEkiPmy1xqcSrwdkgkvhL60Ekymkc9uCkSg/3hSko=; b=fIuyW3Ktw2gDHB4/LBvJcN5DMFoXzgZZVidlQ8djm1cJIFfpZo2fA+XQ0u/WF6Qw06DFa+WDDqn5liF/FBQ5NISdsJTLrkXmMXTnNpjoWptP9ZNWG7W4k7lqLXSTAzGBJm/fMaNR42R/nSORGrXMvx+ztldaWmfRsDe6vMXb2IM= 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 1734607021337737.4549666213321; Thu, 19 Dec 2024 03:17:01 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOEVt-0004cA-Pr; Thu, 19 Dec 2024 06:16:17 -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 1tOEVs-0004bt-3I for qemu-devel@nongnu.org; Thu, 19 Dec 2024 06:16:16 -0500 Received: from mgamail.intel.com ([198.175.65.19]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOEVq-0005Kx-G0 for qemu-devel@nongnu.org; Thu, 19 Dec 2024 06:16:15 -0500 Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Dec 2024 03:16:14 -0800 Received: from lxy-clx-4s.sh.intel.com ([10.239.48.52]) by fmviesa006.fm.intel.com with ESMTP; 19 Dec 2024 03:16:10 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1734606975; x=1766142975; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=bkOTh7sm1DEDqwgD7+5B/BRslnhPu8TCuJZZUpkjQy8=; b=lXQ+dP6NZrx1pYg6b138glPblELdwwChd1V1mJkLGMaFMdHkE2Fk4LLg C4wBKdMIuo8gse3tOYJd8kB0kz6fPETk1cCx0RBlzvp6RPOTeR7Y5tV6f NoFb1uCUXFqXwK1wGhvBoakmJv/js2LrxuMlWaaLcpbD5G5+uPrMDWmD2 gMIp8zbCdE6spEfs8vB3xTu68fGZ8We/TDery4Y4Nvp/UL1Nj9a6xFqW/ RMOkGJlaHIG/oQCkXAK1FzEMweZHA2Gsv0mdGIGhPhcLU46eSEdfANnbq GbOLmE6kIo3uHkE89SCE+piBVLT7InhJZbBycteS1n/DVOwcxWHlIn6hG w==; X-CSE-ConnectionGUID: qw0ivHvpRg6SjUSSSKhG8Q== X-CSE-MsgGUID: gdsjSQgSRumsz293etq9hQ== X-IronPort-AV: E=McAfee;i="6700,10204,11290"; a="34994976" X-IronPort-AV: E=Sophos;i="6.12,247,1728975600"; d="scan'208";a="34994976" X-CSE-ConnectionGUID: mb9ALuozQ8eJr43EZAH5Jw== X-CSE-MsgGUID: 4o1dBuVZSgKccpVCfL7pDQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,247,1728975600"; d="scan'208";a="97956179" From: Xiaoyao Li To: Paolo Bonzini , Igor Mammedov , Marcel Apfelbaum , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Cc: qemu-devel@nongnu.org, Yanan Wang , Zhao Liu , "Michael S. Tsirkin" , Marcelo Tosatti , xiaoyao.li@intel.com Subject: [PATCH v2 08/10] cpu: Remove nr_cores from struct CPUState Date: Thu, 19 Dec 2024 06:01:23 -0500 Message-Id: <20241219110125.1266461-9-xiaoyao.li@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241219110125.1266461-1-xiaoyao.li@intel.com> References: <20241219110125.1266461-1-xiaoyao.li@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: pass client-ip=198.175.65.19; envelope-from=xiaoyao.li@intel.com; helo=mgamail.intel.com X-Spam_score_int: -33 X-Spam_score: -3.4 X-Spam_bar: --- X-Spam_report: (-3.4 / 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, HK_RANDOM_ENVFROM=0.001, HK_RANDOM_FROM=0.998, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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 @intel.com) X-ZM-MESSAGEID: 1734607022792116600 Content-Type: text/plain; charset="utf-8" There is no user of it now, remove it. Signed-off-by: Xiaoyao Li Reviewed-by: Zhao Liu --- hw/core/cpu-common.c | 1 - include/hw/core/cpu.h | 2 -- system/cpus.c | 1 - 3 files changed, 4 deletions(-) diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c index 09c79035949b..77089d4ed304 100644 --- a/hw/core/cpu-common.c +++ b/hw/core/cpu-common.c @@ -243,7 +243,6 @@ static void cpu_common_initfn(Object *obj) cpu->cluster_index =3D UNASSIGNED_CLUSTER_INDEX; /* user-mode doesn't have configurable SMP topology */ /* the default value is changed by qemu_init_vcpu() for system-mode */ - cpu->nr_cores =3D 1; cpu->nr_threads =3D 1; cpu->cflags_next_tb =3D -1; =20 diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index c3ca0babcb3f..fb397cdfc53d 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -407,7 +407,6 @@ struct qemu_work_item; * Under TCG this value is propagated to @tcg_cflags. * See TranslationBlock::TCG CF_CLUSTER_MASK. * @tcg_cflags: Pre-computed cflags for this cpu. - * @nr_cores: Number of cores within this CPU package. * @nr_threads: Number of threads within this CPU core. * @thread: Host thread details, only live once @created is #true * @sem: WIN32 only semaphore used only for qtest @@ -466,7 +465,6 @@ struct CPUState { CPUClass *cc; /*< public >*/ =20 - int nr_cores; int nr_threads; =20 struct QemuThread *thread; diff --git a/system/cpus.c b/system/cpus.c index ba633c7688b2..3db4a7d0ab4a 100644 --- a/system/cpus.c +++ b/system/cpus.c @@ -681,7 +681,6 @@ void qemu_init_vcpu(CPUState *cpu) { MachineState *ms =3D MACHINE(qdev_get_machine()); =20 - cpu->nr_cores =3D machine_topo_get_cores_per_socket(ms); cpu->nr_threads =3D ms->smp.threads; cpu->stopped =3D true; cpu->random_seed =3D qemu_guest_random_seed_thread_part1(); --=20 2.34.1