From patchwork Thu Aug 10 08:39:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nicola Vetrini X-Patchwork-Id: 13349034 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 067B0C001DB for ; Thu, 10 Aug 2023 08:40:22 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.581922.911387 (Exim 4.92) (envelope-from ) id 1qU1DH-0005N1-RT; Thu, 10 Aug 2023 08:40:11 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 581922.911387; Thu, 10 Aug 2023 08:40:11 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qU1DH-0005Mu-Oi; Thu, 10 Aug 2023 08:40:11 +0000 Received: by outflank-mailman (input) for mailman id 581922; Thu, 10 Aug 2023 08:40:09 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qU1DF-0005MW-Om for xen-devel@lists.xenproject.org; Thu, 10 Aug 2023 08:40:09 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 833e8d0a-3759-11ee-b283-6b7b168915f2; Thu, 10 Aug 2023 10:40:09 +0200 (CEST) Received: from nico.bugseng.com (unknown [147.123.100.131]) by support.bugseng.com (Postfix) with ESMTPSA id 03E094EE0741; Thu, 10 Aug 2023 10:40:07 +0200 (CEST) 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: 833e8d0a-3759-11ee-b283-6b7b168915f2 From: Nicola Vetrini To: xen-devel@lists.xenproject.org Cc: sstabellini@kernel.org, michal.orzel@amd.com, xenia.ragiadakou@amd.com, ayan.kumar.halder@amd.com, consulting@bugseng.com, Nicola Vetrini , Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Wei Liu , Luca Fancellu Subject: [XEN PATCH v2 1/7] xen/memory: make 'ioreq_server_max_frames' static Date: Thu, 10 Aug 2023 10:39:41 +0200 Message-Id: <7f0d3f4330a262ec17029b3d82a7a89409215fbf.1691655814.git.nicola.vetrini@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 The function 'ioreq_server_max_frames' can be defined static, as its only uses are within the same file. This in turn avoids violating Rule 8.4 because no declaration is present. No functional change. Signed-off-by: Nicola Vetrini Fixes: 9244528955de ("xen/memory: Fix acquire_resource size semantics”) Reviewed-by: Luca Fancellu Acked-by: Stefano Stabellini --- Changes in v2: - Revised commit message --- xen/common/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/common/memory.c b/xen/common/memory.c index c206fa48087d..b1dcbaf551e6 100644 --- a/xen/common/memory.c +++ b/xen/common/memory.c @@ -1120,7 +1120,7 @@ static long xatp_permission_check(struct domain *d, unsigned int space) return xsm_add_to_physmap(XSM_TARGET, current->domain, d); } -unsigned int ioreq_server_max_frames(const struct domain *d) +static unsigned int ioreq_server_max_frames(const struct domain *d) { unsigned int nr = 0; From patchwork Thu Aug 10 08:39:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicola Vetrini X-Patchwork-Id: 13349037 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 E1E25C04E69 for ; Thu, 10 Aug 2023 08:40:23 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.581925.911408 (Exim 4.92) (envelope-from ) id 1qU1DI-0005gt-SF; Thu, 10 Aug 2023 08:40:12 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 581925.911408; Thu, 10 Aug 2023 08:40:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qU1DI-0005gS-M5; Thu, 10 Aug 2023 08:40:12 +0000 Received: by outflank-mailman (input) for mailman id 581925; Thu, 10 Aug 2023 08:40:11 +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 1qU1DH-0005Mc-Aj for xen-devel@lists.xenproject.org; Thu, 10 Aug 2023 08:40:11 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 7d9acf43-3759-11ee-8613-37d641c3527e; Thu, 10 Aug 2023 10:39:59 +0200 (CEST) Received: from nico.bugseng.com (unknown [147.123.100.131]) by support.bugseng.com (Postfix) with ESMTPSA id D242D4EE0742; Thu, 10 Aug 2023 10:40:08 +0200 (CEST) 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: 7d9acf43-3759-11ee-8613-37d641c3527e From: Nicola Vetrini To: xen-devel@lists.xenproject.org Cc: sstabellini@kernel.org, michal.orzel@amd.com, xenia.ragiadakou@amd.com, ayan.kumar.halder@amd.com, consulting@bugseng.com, Nicola Vetrini , Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Wei Liu , Luca Fancellu Subject: [XEN PATCH v2 2/7] xen: make 'saved_cmdline' static Date: Thu, 10 Aug 2023 10:39:42 +0200 Message-Id: <3a3f56b54b7051a9a741f5b54e8bc266b451c5e4.1691655814.git.nicola.vetrini@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 The variable 'saved_cmdline' can be defined static, as its only uses are within the same file. This in turn avoids violating Rule 8.4 because no declaration is present. Signed-off-by: Nicola Vetrini Fixes: e6ee01ad24b6 ("xen/version: Drop compat/kernel.c") Reviewed-by: Luca Fancellu Reviewed-by: Stefano Stabellini --- Changes in v2: - Revised commit message --- xen/common/kernel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/common/kernel.c b/xen/common/kernel.c index fb919f3d9c38..52aa28762782 100644 --- a/xen/common/kernel.c +++ b/xen/common/kernel.c @@ -28,7 +28,7 @@ CHECK_feature_info; enum system_state system_state = SYS_STATE_early_boot; -xen_commandline_t saved_cmdline; +static xen_commandline_t saved_cmdline; static const char __initconst opt_builtin_cmdline[] = CONFIG_CMDLINE; static int assign_integer_param(const struct kernel_param *param, uint64_t val) From patchwork Thu Aug 10 08:39:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicola Vetrini X-Patchwork-Id: 13349036 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 069B6C04FDF for ; Thu, 10 Aug 2023 08:40:24 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.581924.911400 (Exim 4.92) (envelope-from ) id 1qU1DI-0005Yp-Fn; Thu, 10 Aug 2023 08:40:12 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 581924.911400; Thu, 10 Aug 2023 08:40:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qU1DI-0005XO-BK; Thu, 10 Aug 2023 08:40:12 +0000 Received: by outflank-mailman (input) for mailman id 581924; Thu, 10 Aug 2023 08:40:11 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qU1DH-0005MW-AQ for xen-devel@lists.xenproject.org; Thu, 10 Aug 2023 08:40:11 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 844667fe-3759-11ee-b283-6b7b168915f2; Thu, 10 Aug 2023 10:40:10 +0200 (CEST) Received: from nico.bugseng.com (unknown [147.123.100.131]) by support.bugseng.com (Postfix) with ESMTPSA id B79434EE0743; Thu, 10 Aug 2023 10:40:09 +0200 (CEST) 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: 844667fe-3759-11ee-b283-6b7b168915f2 From: Nicola Vetrini To: xen-devel@lists.xenproject.org Cc: sstabellini@kernel.org, michal.orzel@amd.com, xenia.ragiadakou@amd.com, ayan.kumar.halder@amd.com, consulting@bugseng.com, Nicola Vetrini , Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Wei Liu Subject: [XEN PATCH v2 3/7] xen/include: make a declaration of 'get_sec' visible where needed Date: Thu, 10 Aug 2023 10:39:43 +0200 Message-Id: <37fed394315c24e7b7419e564696a534886f0d53.1691655814.git.nicola.vetrini@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 A declaration for 'get_sec' is added in 'xen/include/xen/time.h' to be available for every call site (in particular 'cper.h'). This also resolves a violation of MISRA C:2012 Rule 8.4. Signed-off-by: Nicola Vetrini Fixes: c8cb30cfc87a ("mce: Provide ERST interface") Reviewed-by: Jan Beulich --- Changes in v2: - Revised commit message - Split patch --- xen/include/xen/cper.h | 3 +-- xen/include/xen/time.h | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/include/xen/cper.h b/xen/include/xen/cper.h index 7c6a4c45ce32..de8f385bdd5c 100644 --- a/xen/include/xen/cper.h +++ b/xen/include/xen/cper.h @@ -23,8 +23,7 @@ #include #include - -extern unsigned long get_sec(void); +#include typedef struct { uint8_t b[16]; diff --git a/xen/include/xen/time.h b/xen/include/xen/time.h index 5aafdda4f392..67c586b7369c 100644 --- a/xen/include/xen/time.h +++ b/xen/include/xen/time.h @@ -36,6 +36,7 @@ s_time_t get_s_time_fixed(u64 at_tick); s_time_t get_s_time(void); unsigned long get_localtime(struct domain *d); uint64_t get_localtime_us(struct domain *d); +unsigned long get_sec(void); struct tm { int tm_sec; /* seconds */ From patchwork Thu Aug 10 08:39:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicola Vetrini X-Patchwork-Id: 13349038 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 0680DC41513 for ; Thu, 10 Aug 2023 08:40:23 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.581926.911428 (Exim 4.92) (envelope-from ) id 1qU1DL-0006O6-2Y; Thu, 10 Aug 2023 08:40:15 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 581926.911428; Thu, 10 Aug 2023 08:40:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qU1DK-0006Nx-UF; Thu, 10 Aug 2023 08:40:14 +0000 Received: by outflank-mailman (input) for mailman id 581926; Thu, 10 Aug 2023 08:40:13 +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 1qU1DJ-0005Mc-0J for xen-devel@lists.xenproject.org; Thu, 10 Aug 2023 08:40:13 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 7e89fe20-3759-11ee-8613-37d641c3527e; Thu, 10 Aug 2023 10:40:01 +0200 (CEST) Received: from nico.bugseng.com (unknown [147.123.100.131]) by support.bugseng.com (Postfix) with ESMTPSA id 97BB84EE0744; Thu, 10 Aug 2023 10:40:10 +0200 (CEST) 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: 7e89fe20-3759-11ee-8613-37d641c3527e From: Nicola Vetrini To: xen-devel@lists.xenproject.org Cc: sstabellini@kernel.org, michal.orzel@amd.com, xenia.ragiadakou@amd.com, ayan.kumar.halder@amd.com, consulting@bugseng.com, Nicola Vetrini , Julien Grall , Bertrand Marquis , Volodymyr Babchuk Subject: [XEN PATCH v2 4/7] xen/arm: make declarations visible before function definitions Date: Thu, 10 Aug 2023 10:39:44 +0200 Message-Id: <05f4dd673312ddd52dcbc8a3b7bcf0ee84993d6e.1691655814.git.nicola.vetrini@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 'xen/hypercall.h' is included in 'xen/arch/arm/setup.c' to allow the declaration of 'arch_get_xen_caps' to be visible when defining the function. The header 'xen/delay.h' is included in 'xen/arch/arm/time.c' to allow the declaration of 'udelay' to be visible. Signed-off-by: Nicola Vetrini Fixes: 7cfc339cbc2f ("arm: Implement arch_get_xen_caps") Fixes: 335ba242c55c ("arm: implement udelay()") Reviewed-by: Stefano Stabellini --- Changes in v2: - Revised commit message - Split patch --- xen/arch/arm/setup.c | 1 + xen/arch/arm/time.c | 1 + 2 files changed, 2 insertions(+) diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c index bbf72b69aae6..44ccea03ca14 100644 --- a/xen/arch/arm/setup.c +++ b/xen/arch/arm/setup.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include diff --git a/xen/arch/arm/time.c b/xen/arch/arm/time.c index 0b482d7db30c..3535bd8ac7c7 100644 --- a/xen/arch/arm/time.c +++ b/xen/arch/arm/time.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include From patchwork Thu Aug 10 08:39:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicola Vetrini X-Patchwork-Id: 13349041 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 7DB74C001DE for ; Thu, 10 Aug 2023 08:40:25 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.581928.911439 (Exim 4.92) (envelope-from ) id 1qU1DM-0006Yj-0G; Thu, 10 Aug 2023 08:40:16 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 581928.911439; Thu, 10 Aug 2023 08:40:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qU1DL-0006W8-Nq; Thu, 10 Aug 2023 08:40:15 +0000 Received: by outflank-mailman (input) for mailman id 581928; Thu, 10 Aug 2023 08:40:13 +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 1qU1DJ-0005Mc-Ll for xen-devel@lists.xenproject.org; Thu, 10 Aug 2023 08:40:13 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 7ef50389-3759-11ee-8613-37d641c3527e; Thu, 10 Aug 2023 10:40:01 +0200 (CEST) Received: from nico.bugseng.com (unknown [147.123.100.131]) by support.bugseng.com (Postfix) with ESMTPSA id 491284EE0745; Thu, 10 Aug 2023 10:40:11 +0200 (CEST) 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: 7ef50389-3759-11ee-8613-37d641c3527e From: Nicola Vetrini To: xen-devel@lists.xenproject.org Cc: sstabellini@kernel.org, michal.orzel@amd.com, xenia.ragiadakou@amd.com, ayan.kumar.halder@amd.com, consulting@bugseng.com, Nicola Vetrini , Jan Beulich , Andrew Cooper , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Wei Liu Subject: [XEN PATCH v2 5/7] x86: make some functions and variables static rather than extern Date: Thu, 10 Aug 2023 10:39:45 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 The functions and variables touched by this commit can be static, as they are only used within the same unit. This in turn addresses the absence of declarations that violates Rule 8.4. Signed-off-by: Nicola Vetrini Fixes: 741367e77d6c ("mce: Clean-up mcheck_init handler") Fixes: 45f57813f646 ("x86/MCE: implement recoverscan for AMD") Fixes: 155587481e39 ("x86/microcode: Scan the initramfs payload for microcode blob") Fixes: af50dd63cf8d ("Pull nmi/traps changes from Linux 2.6.14.") Fixes: fef244b179c0 ("x86/spec-ctrl: Knobs for STIBP and PSFD, and follow hardware STIBP hint") Reviewed-by: Jan Beulich --- Changes in v2: - Revised commit message I'm a bit uncertain about af50dd63cf8d, because it was done long ago and it's not clear whether the variable could have been static since then. --- xen/arch/x86/cpu/mcheck/mce.c | 2 +- xen/arch/x86/cpu/mcheck/mce_amd.c | 2 +- xen/arch/x86/cpu/microcode/core.c | 2 +- xen/arch/x86/nmi.c | 2 +- xen/arch/x86/spec_ctrl.c | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/xen/arch/x86/cpu/mcheck/mce.c b/xen/arch/x86/cpu/mcheck/mce.c index 57e1eb221e6b..6141b7eb9cf1 100644 --- a/xen/arch/x86/cpu/mcheck/mce.c +++ b/xen/arch/x86/cpu/mcheck/mce.c @@ -599,7 +599,7 @@ unsigned int mce_firstbank(struct cpuinfo_x86 *c) c->x86_vendor == X86_VENDOR_INTEL && c->x86_model < 0x1a; } -int show_mca_info(int inited, struct cpuinfo_x86 *c) +static int show_mca_info(int inited, struct cpuinfo_x86 *c) { static enum mcheck_type g_type = mcheck_unset; diff --git a/xen/arch/x86/cpu/mcheck/mce_amd.c b/xen/arch/x86/cpu/mcheck/mce_amd.c index adc36522cc27..72f3feeaeed8 100644 --- a/xen/arch/x86/cpu/mcheck/mce_amd.c +++ b/xen/arch/x86/cpu/mcheck/mce_amd.c @@ -87,7 +87,7 @@ enum mc_ec_type { MC_EC_BUS_TYPE = 0x0800, }; -enum mc_ec_type +static enum mc_ec_type mc_ec2type(uint16_t errorcode) { if ( errorcode & MC_EC_BUS_TYPE ) diff --git a/xen/arch/x86/cpu/microcode/core.c b/xen/arch/x86/cpu/microcode/core.c index bec8b55db256..9fcb9c1c3a90 100644 --- a/xen/arch/x86/cpu/microcode/core.c +++ b/xen/arch/x86/cpu/microcode/core.c @@ -149,7 +149,7 @@ static int __init cf_check parse_ucode(const char *s) } custom_param("ucode", parse_ucode); -void __init microcode_scan_module( +static void __init microcode_scan_module( unsigned long *module_map, const multiboot_info_t *mbi) { diff --git a/xen/arch/x86/nmi.c b/xen/arch/x86/nmi.c index c5c28300b04d..104e366bd310 100644 --- a/xen/arch/x86/nmi.c +++ b/xen/arch/x86/nmi.c @@ -108,7 +108,7 @@ static unsigned int lapic_nmi_owner; * be enabled * -1: the lapic NMI watchdog is disabled, but can be enabled */ -int nmi_active; +static int nmi_active; #define K7_EVNTSEL_ENABLE (1 << 22) #define K7_EVNTSEL_INT (1 << 20) diff --git a/xen/arch/x86/spec_ctrl.c b/xen/arch/x86/spec_ctrl.c index ebe56a96cdca..9b8fdb5303ad 100644 --- a/xen/arch/x86/spec_ctrl.c +++ b/xen/arch/x86/spec_ctrl.c @@ -43,9 +43,9 @@ static enum ind_thunk { } opt_thunk __initdata = THUNK_DEFAULT; static int8_t __initdata opt_ibrs = -1; -int8_t __initdata opt_stibp = -1; +static int8_t __initdata opt_stibp = -1; bool __ro_after_init opt_ssbd; -int8_t __initdata opt_psfd = -1; +static int8_t __initdata opt_psfd = -1; int8_t __ro_after_init opt_ibpb_ctxt_switch = -1; int8_t __read_mostly opt_eager_fpu = -1; From patchwork Thu Aug 10 08:39:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicola Vetrini X-Patchwork-Id: 13349040 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 AAB44C001DB for ; Thu, 10 Aug 2023 08:40:25 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.581927.911433 (Exim 4.92) (envelope-from ) id 1qU1DL-0006Qm-Hm; Thu, 10 Aug 2023 08:40:15 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 581927.911433; Thu, 10 Aug 2023 08:40:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qU1DL-0006Pr-7X; Thu, 10 Aug 2023 08:40:15 +0000 Received: by outflank-mailman (input) for mailman id 581927; Thu, 10 Aug 2023 08:40:13 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qU1DJ-0005MW-Ap for xen-devel@lists.xenproject.org; Thu, 10 Aug 2023 08:40:13 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 8582d30c-3759-11ee-b283-6b7b168915f2; Thu, 10 Aug 2023 10:40:12 +0200 (CEST) Received: from nico.bugseng.com (unknown [147.123.100.131]) by support.bugseng.com (Postfix) with ESMTPSA id 004BE4EE0746; Thu, 10 Aug 2023 10:40:11 +0200 (CEST) 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: 8582d30c-3759-11ee-b283-6b7b168915f2 From: Nicola Vetrini To: xen-devel@lists.xenproject.org Cc: sstabellini@kernel.org, michal.orzel@amd.com, xenia.ragiadakou@amd.com, ayan.kumar.halder@amd.com, consulting@bugseng.com, Nicola Vetrini , Julien Grall , Bertrand Marquis , Volodymyr Babchuk , Luca Fancellu Subject: [XEN PATCH v2 6/7] xen/arm: mm: add missing extern variable declaration Date: Thu, 10 Aug 2023 10:39:46 +0200 Message-Id: <228fc4768f50ea14c38b77f9e2169b76f365617d.1691655814.git.nicola.vetrini@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Add a declaration for the variable 'init_ttbr' to resolve the violation of Rule 8.4 present the relative source file 'mm.c'. No functional changes. Signed-off-by: Nicola Vetrini Fixes: 4557c2292854 ("xen: arm: rewrite start of day page table and cpu bring up") Reviewed-by: Luca Fancellu Reviewed-by: Stefano Stabellini --- Changes in v2: - Revised commit message --- xen/arch/arm/include/asm/mm.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/arch/arm/include/asm/mm.h b/xen/arch/arm/include/asm/mm.h index 2db8535a4ca8..aaacba3f044b 100644 --- a/xen/arch/arm/include/asm/mm.h +++ b/xen/arch/arm/include/asm/mm.h @@ -165,6 +165,9 @@ struct page_info #define _PGC_need_scrub _PGC_allocated #define PGC_need_scrub PGC_allocated +/* Non-boot CPUs use this to find the correct pagetables. */ +extern uint64_t init_ttbr; + extern mfn_t directmap_mfn_start, directmap_mfn_end; extern vaddr_t directmap_virt_end; #ifdef CONFIG_ARM_64 From patchwork Thu Aug 10 08:39:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicola Vetrini X-Patchwork-Id: 13349039 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 9FA1EC04A94 for ; Thu, 10 Aug 2023 08:40:24 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.581929.911449 (Exim 4.92) (envelope-from ) id 1qU1DM-0006on-QS; Thu, 10 Aug 2023 08:40:16 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 581929.911449; Thu, 10 Aug 2023 08:40:16 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qU1DM-0006nG-HI; Thu, 10 Aug 2023 08:40:16 +0000 Received: by outflank-mailman (input) for mailman id 581929; Thu, 10 Aug 2023 08:40:15 +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 1qU1DK-0005Mc-W7 for xen-devel@lists.xenproject.org; Thu, 10 Aug 2023 08:40:14 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 7fc7ea8b-3759-11ee-8613-37d641c3527e; Thu, 10 Aug 2023 10:40:03 +0200 (CEST) Received: from nico.bugseng.com (unknown [147.123.100.131]) by support.bugseng.com (Postfix) with ESMTPSA id A558D4EE0740; Thu, 10 Aug 2023 10:40:12 +0200 (CEST) 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: 7fc7ea8b-3759-11ee-8613-37d641c3527e From: Nicola Vetrini To: xen-devel@lists.xenproject.org Cc: sstabellini@kernel.org, michal.orzel@amd.com, xenia.ragiadakou@amd.com, ayan.kumar.halder@amd.com, consulting@bugseng.com, Nicola Vetrini , Jan Beulich , Andrew Cooper , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Wei Liu Subject: [XEN PATCH v2 7/7] x86/nmi: include missing header with declarations for 'watchdog_*' Date: Thu, 10 Aug 2023 10:39:47 +0200 Message-Id: <0665857accd8f39297f4cb77329fb1874be21302.1691655814.git.nicola.vetrini@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Include an additional header to make the declarations for functions 'watchdog_*' visible prior to their definition in the file, thereby resolving the violations of Rule 8.4. No functional change. Signed-off-by: Nicola Vetrini Fixes: c8177e691f0f ("watchdog: Move watchdog from being x86 specific to common code") Reviewed-by: Jan Beulich --- Changes in v2: - Revised commit message --- xen/arch/x86/nmi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/arch/x86/nmi.c b/xen/arch/x86/nmi.c index 104e366bd310..dc79c25e3ffd 100644 --- a/xen/arch/x86/nmi.c +++ b/xen/arch/x86/nmi.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include