From patchwork Thu Dec 7 11:11:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicola Vetrini X-Patchwork-Id: 13483162 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 11303C4167B for ; Thu, 7 Dec 2023 11:11:40 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.649779.1014685 (Exim 4.92) (envelope-from ) id 1rBCHu-0005mo-BB; Thu, 07 Dec 2023 11:11:26 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 649779.1014685; Thu, 07 Dec 2023 11:11:26 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rBCHu-0005mh-7x; Thu, 07 Dec 2023 11:11:26 +0000 Received: by outflank-mailman (input) for mailman id 649779; Thu, 07 Dec 2023 11:11:24 +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 1rBCHs-0005Iv-Ly for xen-devel@lists.xenproject.org; Thu, 07 Dec 2023 11:11:24 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 5a91a0ce-94f1-11ee-9b0f-b553b5be7939; Thu, 07 Dec 2023 12:11:22 +0100 (CET) Received: from nico.bugseng.com (unknown [147.123.100.131]) by support.bugseng.com (Postfix) with ESMTPSA id C54024EE073E; Thu, 7 Dec 2023 12:11:21 +0100 (CET) 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: 5a91a0ce-94f1-11ee-9b0f-b553b5be7939 From: Nicola Vetrini To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Nicola Vetrini , Jan Beulich , Andrew Cooper , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Wei Liu Subject: [XEN PATCH v2 1/3] xen/x86: add missing instances of asmlinkage attributes Date: Thu, 7 Dec 2023 12:11:16 +0100 Message-Id: <34a6fbfadd5a3029552cd25933de5cd0e80984e2.1701947290.git.nicola.vetrini@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 No functional change. Signed-off-by: Nicola Vetrini --- Changes in v2: - The attribute on boot_gdtr and l1_fixmap_x has been dropped, as detailed in the cover letter. --- xen/arch/x86/efi/efi-boot.h | 5 +++-- xen/arch/x86/smpboot.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/efi/efi-boot.h b/xen/arch/x86/efi/efi-boot.h index 86467da301e5..8ea64e31cdc2 100644 --- a/xen/arch/x86/efi/efi-boot.h +++ b/xen/arch/x86/efi/efi-boot.h @@ -808,8 +808,9 @@ static const char *__init get_option(const char *cmd, const char *opt) return o; } -void __init efi_multiboot2(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable, - const char *cmdline) +void asmlinkage __init efi_multiboot2(EFI_HANDLE ImageHandle, + EFI_SYSTEM_TABLE *SystemTable, + const char *cmdline) { EFI_GRAPHICS_OUTPUT_PROTOCOL *gop; EFI_HANDLE gop_handle; diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/smpboot.c index 4c54ecbc91d7..8aa621533f3d 100644 --- a/xen/arch/x86/smpboot.c +++ b/xen/arch/x86/smpboot.c @@ -310,7 +310,7 @@ static void set_cpu_sibling_map(unsigned int cpu) } } -void start_secondary(void *unused) +void asmlinkage start_secondary(void *unused) { struct cpu_info *info = get_cpu_info(); From patchwork Thu Dec 7 11:11:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicola Vetrini X-Patchwork-Id: 13483161 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 412AEC10DC3 for ; Thu, 7 Dec 2023 11:11:39 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.649778.1014671 (Exim 4.92) (envelope-from ) id 1rBCHt-0005MW-1c; Thu, 07 Dec 2023 11:11:25 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 649778.1014671; Thu, 07 Dec 2023 11:11:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rBCHs-0005Lz-Rx; Thu, 07 Dec 2023 11:11:24 +0000 Received: by outflank-mailman (input) for mailman id 649778; Thu, 07 Dec 2023 11:11:23 +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 1rBCHr-0005Ik-Sf for xen-devel@lists.xenproject.org; Thu, 07 Dec 2023 11:11:23 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 5af131a1-94f1-11ee-98e7-6d05b1d4d9a1; Thu, 07 Dec 2023 12:11:23 +0100 (CET) Received: from nico.bugseng.com (unknown [147.123.100.131]) by support.bugseng.com (Postfix) with ESMTPSA id 48B314EE0740; Thu, 7 Dec 2023 12:11:22 +0100 (CET) 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: 5af131a1-94f1-11ee-98e7-6d05b1d4d9a1 From: Nicola Vetrini To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Nicola Vetrini , Paul Durrant , Wei Liu , Jan Beulich , Andrew Cooper , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Stefano Stabellini Subject: [XEN PATCH v2 2/3] x86/viridian: make build_assertions static Date: Thu, 7 Dec 2023 12:11:17 +0100 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 This is consistent with other instances of the same function and also resolves a violation of MISRA C:2012 Rule 8.4. No functional change. Signed-off-by: Nicola Vetrini Reviewed-by: Stefano Stabellini --- xen/arch/x86/hvm/viridian/synic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/hvm/viridian/synic.c b/xen/arch/x86/hvm/viridian/synic.c index 8cf600cec68f..3375e55e95ca 100644 --- a/xen/arch/x86/hvm/viridian/synic.c +++ b/xen/arch/x86/hvm/viridian/synic.c @@ -18,7 +18,7 @@ #include "private.h" -void __init __maybe_unused build_assertions(void) +static void __init __maybe_unused build_assertions(void) { BUILD_BUG_ON(sizeof(struct hv_message) != HV_MESSAGE_SIZE); } From patchwork Thu Dec 7 11:11:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicola Vetrini X-Patchwork-Id: 13483160 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 4A1BDC10DCE for ; Thu, 7 Dec 2023 11:11:37 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.649780.1014690 (Exim 4.92) (envelope-from ) id 1rBCHu-0005rH-Mh; Thu, 07 Dec 2023 11:11:26 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 649780.1014690; Thu, 07 Dec 2023 11:11:26 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rBCHu-0005qG-HJ; Thu, 07 Dec 2023 11:11:26 +0000 Received: by outflank-mailman (input) for mailman id 649780; Thu, 07 Dec 2023 11:11:25 +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 1rBCHs-0005Ik-Sz for xen-devel@lists.xenproject.org; Thu, 07 Dec 2023 11:11:24 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 5b50b8da-94f1-11ee-98e7-6d05b1d4d9a1; Thu, 07 Dec 2023 12:11:23 +0100 (CET) Received: from nico.bugseng.com (unknown [147.123.100.131]) by support.bugseng.com (Postfix) with ESMTPSA id E2E3E4EE0741; Thu, 7 Dec 2023 12:11:22 +0100 (CET) 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: 5b50b8da-94f1-11ee-98e7-6d05b1d4d9a1 From: Nicola Vetrini To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Nicola Vetrini , Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v2 3/3] xen/mm: add declaration for first_valid_mfn Date: Thu, 7 Dec 2023 12:11:18 +0100 Message-Id: <2c02524be7d02064fdf2f5003ef1c507034e4437.1701947290.git.nicola.vetrini@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Such declaration is needed to comply with MISRA C Rule 8.4, because a compatible declaration is not visible in xen/common/page_alloc.c, where the variable is defined. That variable can't yet be static because of the lack of support from ARM and PPC for NUMA. No functional change. Signed-off-by: Nicola Vetrini --- Having this declaration essentially sidesteps the current impossibility of having a static variable, as described in the comments in ARM and PCC's asm/numa.h. --- xen/include/xen/mm.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/include/xen/mm.h b/xen/include/xen/mm.h index 3d9b2d05a5c8..a13a9a46ced7 100644 --- a/xen/include/xen/mm.h +++ b/xen/include/xen/mm.h @@ -118,6 +118,8 @@ int destroy_xen_mappings(unsigned long s, unsigned long e); /* Retrieve the MFN mapped by VA in Xen virtual address space. */ mfn_t xen_map_to_mfn(unsigned long va); +extern mfn_t first_valid_mfn; + /* * Create only non-leaf page table entries for the * page range in Xen virtual address space.