From patchwork Thu Aug 17 12:39:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicola Vetrini X-Patchwork-Id: 13356380 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 3E149C41513 for ; Thu, 17 Aug 2023 12:40:16 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.585374.916461 (Exim 4.92) (envelope-from ) id 1qWcI9-0000KZ-9v; Thu, 17 Aug 2023 12:39:57 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 585374.916461; Thu, 17 Aug 2023 12:39:57 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qWcI9-0000KS-6q; Thu, 17 Aug 2023 12:39:57 +0000 Received: by outflank-mailman (input) for mailman id 585374; Thu, 17 Aug 2023 12:39:55 +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 1qWcI7-0000KB-EJ for xen-devel@lists.xenproject.org; Thu, 17 Aug 2023 12:39:55 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 2a74b0ea-3cfb-11ee-877b-cb3800f73035; Thu, 17 Aug 2023 14:39:54 +0200 (CEST) Received: from nico.bugseng.com (unknown [147.123.100.131]) by support.bugseng.com (Postfix) with ESMTPSA id 2C7E54EE073C; Thu, 17 Aug 2023 14:39:53 +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: 2a74b0ea-3cfb-11ee-877b-cb3800f73035 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 , Tamas K Lengyel , Alexandru Isaila , Petre Pircalabu , Jan Beulich , Andrew Cooper , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Wei Liu Subject: [XEN PATCH v2 1/3] vm_event: rework inclusions to use arch-indipendent header Date: Thu, 17 Aug 2023 14:39:26 +0200 Message-Id: <6ef8207eee081e2c9a3914a14025077fc72b19e6.1692275359.git.nicola.vetrini@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 The arch-specific header should be included by the common header , so that the latter can be included in the source files. This also resolves violations of MISRA C:2012 Rule 8.4 that were caused by declarations for 'vm_event_{fill_regs,set_registers,monitor_next_interrupt}' in not being visible when defining functions in 'xen/arch/x86/vm_event.c' Signed-off-by: Nicola Vetrini Reviewed-by: Stefano Stabellini --- Changes in v2: - Include the arch-specific header in the common one, and only include the latter in source files. The following functions have been mainly touched by the following commits, but the present commit does not solve a problem introduced by one of them per se, except perhaps the first one mentioned, which is why I didn't put a Fixes tag in this v2: - 975efd3baa8d ("introduce VM_EVENT_FLAG_SET_REGISTERS") - adc75eba8b15 ("x86/vm_event: consolidate hvm_event_fill_regs and p2m_vm_event_fill_regs") - 9864841914c2 ("x86/vm_event: add support for VM_EVENT_REASON_INTERRUPT") --- xen/arch/arm/include/asm/vm_event.h | 1 - xen/arch/arm/vm_event.c | 2 +- xen/arch/x86/vm_event.c | 2 +- xen/include/xen/vm_event.h | 1 + 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/arch/arm/include/asm/vm_event.h b/xen/arch/arm/include/asm/vm_event.h index abe7db1970ca..4d861373b38d 100644 --- a/xen/arch/arm/include/asm/vm_event.h +++ b/xen/arch/arm/include/asm/vm_event.h @@ -20,7 +20,6 @@ #define __ASM_ARM_VM_EVENT_H__ #include -#include #include static inline int vm_event_init_domain(struct domain *d) diff --git a/xen/arch/arm/vm_event.c b/xen/arch/arm/vm_event.c index ba99f56eb20c..ccfd25bbbca9 100644 --- a/xen/arch/arm/vm_event.c +++ b/xen/arch/arm/vm_event.c @@ -8,7 +8,7 @@ */ #include -#include +#include void vm_event_fill_regs(vm_event_request_t *req) { diff --git a/xen/arch/x86/vm_event.c b/xen/arch/x86/vm_event.c index 7027c08a926b..e6c7ad5337dd 100644 --- a/xen/arch/x86/vm_event.c +++ b/xen/arch/x86/vm_event.c @@ -20,7 +20,7 @@ #include #include -#include +#include /* Implicitly serialized by the domctl lock. */ int vm_event_init_domain(struct domain *d) diff --git a/xen/include/xen/vm_event.h b/xen/include/xen/vm_event.h index 92811d9110e5..9a86358b42ae 100644 --- a/xen/include/xen/vm_event.h +++ b/xen/include/xen/vm_event.h @@ -25,6 +25,7 @@ #include #include +#include struct vm_event_domain {