From patchwork Thu Nov 30 14:41:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhao Liu X-Patchwork-Id: 13474583 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 21E6FC10DC3 for ; Thu, 30 Nov 2023 14:40:04 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.644817.1006476 (Exim 4.92) (envelope-from ) id 1r8iCd-0002EI-9T; Thu, 30 Nov 2023 14:39:43 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 644817.1006476; Thu, 30 Nov 2023 14:39:42 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r8iCb-00025F-NJ; Thu, 30 Nov 2023 14:39:41 +0000 Received: by outflank-mailman (input) for mailman id 644817; Thu, 30 Nov 2023 14:36:08 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r8i9A-0000W8-2w for xen-devel@lists.xenproject.org; Thu, 30 Nov 2023 14:36:08 +0000 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id ca6b3264-8f8d-11ee-9b0f-b553b5be7939; Thu, 30 Nov 2023 15:36:05 +0100 (CET) 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:36:03 -0800 Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.36]) by orsmga005.jf.intel.com with ESMTP; 30 Nov 2023 06:35:54 -0800 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: ca6b3264-8f8d-11ee-9b0f-b553b5be7939 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701354965; x=1732890965; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1ATU854G1+lM0AKtC/FFv0wTbLk1yiIDIW9pRjL09lQ=; b=CWOo8NiZSeph855JmZHll98ggBldNO0k1NR4fp4Addk1ISGRd+9w6MgV yYw7JTWNg37QNOW/Ahs8DQNL9YppZCGeQqcthJw4U69cBnC9ALNQyGQ0P EoTvkulRmLiIXr0m08O9csZ4xqGpKG3EhdK6Bk95iA1370bEWyHHeIvYh e94usb7HRZO8FBlJW8tA6kSv6UeIq+ayQPfN2tNQVIPtjNuoKDTvPjH+r A0KreWbQtYy+T3Go6V2lz8xeW+nLUMx3xZOisbSTA0xE/Qg3tkZGOKHWW 3XVuR638qaSuG+bl62bAM+Wo5053XmxLSpT1hCPLARYg1jEEBew6WIQPw A==; X-IronPort-AV: E=McAfee;i="6600,9927,10910"; a="479532572" X-IronPort-AV: E=Sophos;i="6.04,239,1695711600"; d="scan'208";a="479532572" X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10910"; a="942730346" X-IronPort-AV: E=Sophos;i="6.04,239,1695711600"; d="scan'208";a="942730346" From: Zhao Liu To: Paolo Bonzini , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-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_Le_Goater?= , =?utf-8?b?RnLDqWTDqXJp?= =?utf-8?b?YyBCYXJyYXQ=?= , David Gibson , Harsh Prateek Bora , Stefano Stabellini , Anthony Perard , Paul Durrant , Gerd Hoffmann , Peter Maydell , Alistair Francis , "Edgar E . Iglesias" , =?utf-8?q?Daniel_P_=2E_Ber?= =?utf-8?q?rang=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 35/41] hw/i386: Make x86_cpu_new() private in x86.c Date: Thu, 30 Nov 2023 22:41:57 +0800 Message-Id: <20231130144203.2307629-36-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 From: Zhao Liu x86_cpu_new() is only invoked in x86.c. Declear it as static in x86.c. Signed-off-by: Zhao Liu --- hw/i386/x86.c | 3 ++- include/hw/i386/x86.h | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/i386/x86.c b/hw/i386/x86.c index b3d054889bba..d9293846db64 100644 --- a/hw/i386/x86.c +++ b/hw/i386/x86.c @@ -95,7 +95,8 @@ uint32_t x86_cpu_apic_id_from_index(X86MachineState *x86ms, } -void x86_cpu_new(X86MachineState *x86ms, int64_t apic_id, Error **errp) +static void x86_cpu_new(X86MachineState *x86ms, int64_t apic_id, + Error **errp) { Object *cpu = object_new(MACHINE(x86ms)->cpu_type); diff --git a/include/hw/i386/x86.h b/include/hw/i386/x86.h index da19ae15463a..19e9f93fe286 100644 --- a/include/hw/i386/x86.h +++ b/include/hw/i386/x86.h @@ -97,8 +97,6 @@ OBJECT_DECLARE_TYPE(X86MachineState, X86MachineClass, X86_MACHINE) uint32_t x86_cpu_apic_id_from_index(X86MachineState *pcms, unsigned int cpu_index); - -void x86_cpu_new(X86MachineState *pcms, int64_t apic_id, Error **errp); void x86_cpus_init(X86MachineState *pcms, int default_cpu_version); CpuInstanceProperties x86_cpu_index_to_props(MachineState *ms, unsigned cpu_index);