From patchwork Tue Dec 12 15:37:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Federico Serafini X-Patchwork-Id: 13489541 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 A47D3C4332F for ; Tue, 12 Dec 2023 15:38:15 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.653194.1019564 (Exim 4.92) (envelope-from ) id 1rD4pg-0000sW-9i; Tue, 12 Dec 2023 15:38:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 653194.1019564; Tue, 12 Dec 2023 15:38:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rD4pg-0000rm-38; Tue, 12 Dec 2023 15:38:04 +0000 Received: by outflank-mailman (input) for mailman id 653194; Tue, 12 Dec 2023 15:38:02 +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 1rD4pe-0000ZS-KY for xen-devel@lists.xenproject.org; Tue, 12 Dec 2023 15:38:02 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 6e0817e9-9904-11ee-9b0f-b553b5be7939; Tue, 12 Dec 2023 16:38:00 +0100 (CET) Received: from Dell.homenet.telecomitalia.it (host-82-60-45-193.retail.telecomitalia.it [82.60.45.193]) by support.bugseng.com (Postfix) with ESMTPSA id 891544EE0C8D; Tue, 12 Dec 2023 16:37:59 +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: 6e0817e9-9904-11ee-9b0f-b553b5be7939 From: Federico Serafini To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Federico Serafini , Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH 1/4] xen/compat: address violations of MISRA C:2012 Rule 8.2 Date: Tue, 12 Dec 2023 16:37:39 +0100 Message-Id: <6a3bd7a3e4fa83c2c176894f756bd2e24c0f3ee0.1702394721.git.federico.serafini@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Add missing parameter names. No functional change. Signed-off-by: Federico Serafini Reviewed-by: Stefano Stabellini --- xen/include/xen/compat.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xen/include/xen/compat.h b/xen/include/xen/compat.h index 41a5d61eef..7ec9d6567e 100644 --- a/xen/include/xen/compat.h +++ b/xen/include/xen/compat.h @@ -232,9 +232,10 @@ int hypercall_xlat_continuation(unsigned int *id, unsigned int nr, /* In-place translation functons: */ struct start_info; -void xlat_start_info(struct start_info *, enum XLAT_start_info_console); +void xlat_start_info(struct start_info *native, + enum XLAT_start_info_console console); struct vcpu_runstate_info; -void xlat_vcpu_runstate_info(struct vcpu_runstate_info *); +void xlat_vcpu_runstate_info(struct vcpu_runstate_info *native); #else From patchwork Tue Dec 12 15:37:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Federico Serafini X-Patchwork-Id: 13489544 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 EFCE9C4167B for ; Tue, 12 Dec 2023 15:38:21 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.653191.1019545 (Exim 4.92) (envelope-from ) id 1rD4pf-0000Zp-B0; Tue, 12 Dec 2023 15:38:03 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 653191.1019545; Tue, 12 Dec 2023 15:38:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rD4pf-0000Zi-87; Tue, 12 Dec 2023 15:38:03 +0000 Received: by outflank-mailman (input) for mailman id 653191; Tue, 12 Dec 2023 15:38:01 +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 1rD4pd-0000ZM-FF for xen-devel@lists.xenproject.org; Tue, 12 Dec 2023 15:38:01 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 6e47a0f6-9904-11ee-98e8-6d05b1d4d9a1; Tue, 12 Dec 2023 16:38:00 +0100 (CET) Received: from Dell.homenet.telecomitalia.it (host-82-60-45-193.retail.telecomitalia.it [82.60.45.193]) by support.bugseng.com (Postfix) with ESMTPSA id 0662B4EE0C91; Tue, 12 Dec 2023 16:37:59 +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: 6e47a0f6-9904-11ee-98e8-6d05b1d4d9a1 From: Federico Serafini To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Federico Serafini , Jan Beulich , Andrew Cooper , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Wei Liu , Stefano Stabellini Subject: [XEN PATCH 2/4] x86/asm: address violations of MISRA C:2012 Rule 8.2 Date: Tue, 12 Dec 2023 16:37:40 +0100 Message-Id: <0db906df2d3649fc8652be6b80e14870b78b0f56.1702394721.git.federico.serafini@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Add missing parameter names. No functional change. Signed-off-by: Federico Serafini Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich --- xen/arch/x86/include/asm/amd.h | 2 +- xen/arch/x86/include/asm/debugreg.h | 4 ++-- xen/arch/x86/include/asm/flushtlb.h | 3 ++- xen/arch/x86/include/asm/hap.h | 2 +- xen/arch/x86/include/asm/iommu.h | 2 +- xen/arch/x86/include/asm/microcode.h | 2 +- 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/xen/arch/x86/include/asm/amd.h b/xen/arch/x86/include/asm/amd.h index 0700827561..2cc0ce2e9f 100644 --- a/xen/arch/x86/include/asm/amd.h +++ b/xen/arch/x86/include/asm/amd.h @@ -157,7 +157,7 @@ #define is_zen4_uarch() boot_cpu_has(X86_FEATURE_AUTO_IBRS) struct cpuinfo_x86; -int cpu_has_amd_erratum(const struct cpuinfo_x86 *, int, ...); +int cpu_has_amd_erratum(const struct cpuinfo_x86 *cpu, int osvw_id, ...); extern s8 opt_allow_unsafe; diff --git a/xen/arch/x86/include/asm/debugreg.h b/xen/arch/x86/include/asm/debugreg.h index b6454cc04e..2bdaf5d9aa 100644 --- a/xen/arch/x86/include/asm/debugreg.h +++ b/xen/arch/x86/include/asm/debugreg.h @@ -96,8 +96,8 @@ #define breakpoint_addr_ok(a) __addr_ok(a) struct vcpu; -long set_debugreg(struct vcpu *, unsigned int reg, unsigned long value); -void activate_debugregs(const struct vcpu *); +long set_debugreg(struct vcpu *v, unsigned int reg, unsigned long value); +void activate_debugregs(const struct vcpu *curr); struct cpu_policy; diff --git a/xen/arch/x86/include/asm/flushtlb.h b/xen/arch/x86/include/asm/flushtlb.h index a461ee36ff..bb0ad58db4 100644 --- a/xen/arch/x86/include/asm/flushtlb.h +++ b/xen/arch/x86/include/asm/flushtlb.h @@ -141,7 +141,8 @@ unsigned int flush_area_local(const void *va, unsigned int flags); #define flush_local(flags) flush_area_local(NULL, flags) /* Flush specified CPUs' TLBs/caches */ -void flush_area_mask(const cpumask_t *, const void *va, unsigned int flags); +void flush_area_mask(const cpumask_t *mask, const void *va, + unsigned int flags); #define flush_mask(mask, flags) flush_area_mask(mask, NULL, flags) /* Flush all CPUs' TLBs/caches */ diff --git a/xen/arch/x86/include/asm/hap.h b/xen/arch/x86/include/asm/hap.h index 05e124ad57..f01ce73fb4 100644 --- a/xen/arch/x86/include/asm/hap.h +++ b/xen/arch/x86/include/asm/hap.h @@ -32,7 +32,7 @@ int hap_track_dirty_vram(struct domain *d, unsigned int nr_frames, XEN_GUEST_HANDLE(void) guest_dirty_bitmap); -extern const struct paging_mode *hap_paging_get_mode(struct vcpu *); +extern const struct paging_mode *hap_paging_get_mode(struct vcpu *v); int hap_set_allocation(struct domain *d, unsigned int pages, bool *preempted); unsigned int hap_get_allocation(struct domain *d); diff --git a/xen/arch/x86/include/asm/iommu.h b/xen/arch/x86/include/asm/iommu.h index eb720205e2..15a848ddc3 100644 --- a/xen/arch/x86/include/asm/iommu.h +++ b/xen/arch/x86/include/asm/iommu.h @@ -87,7 +87,7 @@ extern const struct iommu_init_ops *iommu_init_ops; void iommu_update_ire_from_apic(unsigned int apic, unsigned int pin, uint64_t rte); unsigned int iommu_read_apic_from_ire(unsigned int apic, unsigned int reg); -int iommu_setup_hpet_msi(struct msi_desc *); +int iommu_setup_hpet_msi(struct msi_desc *msi); static inline void iommu_adjust_irq_affinities(void) { diff --git a/xen/arch/x86/include/asm/microcode.h b/xen/arch/x86/include/asm/microcode.h index 62ce3418f7..8f59b20b02 100644 --- a/xen/arch/x86/include/asm/microcode.h +++ b/xen/arch/x86/include/asm/microcode.h @@ -22,7 +22,7 @@ struct cpu_signature { DECLARE_PER_CPU(struct cpu_signature, cpu_sig); void microcode_set_module(unsigned int idx); -int microcode_update(XEN_GUEST_HANDLE(const_void), unsigned long len); +int microcode_update(XEN_GUEST_HANDLE(const_void) buf, unsigned long len); int early_microcode_init(unsigned long *module_map, const struct multiboot_info *mbi); int microcode_init_cache(unsigned long *module_map, From patchwork Tue Dec 12 15:37:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Federico Serafini X-Patchwork-Id: 13489543 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 E4E25C4332F for ; Tue, 12 Dec 2023 15:38:21 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.653195.1019585 (Exim 4.92) (envelope-from ) id 1rD4ph-0001Uv-L7; Tue, 12 Dec 2023 15:38:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 653195.1019585; Tue, 12 Dec 2023 15:38:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rD4ph-0001Uc-Dj; Tue, 12 Dec 2023 15:38:05 +0000 Received: by outflank-mailman (input) for mailman id 653195; Tue, 12 Dec 2023 15:38:03 +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 1rD4pf-0000ZS-Kg for xen-devel@lists.xenproject.org; Tue, 12 Dec 2023 15:38:03 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 6e8d04b2-9904-11ee-9b0f-b553b5be7939; Tue, 12 Dec 2023 16:38:01 +0100 (CET) Received: from Dell.homenet.telecomitalia.it (host-82-60-45-193.retail.telecomitalia.it [82.60.45.193]) by support.bugseng.com (Postfix) with ESMTPSA id 6E0734EE0C92; Tue, 12 Dec 2023 16:38:00 +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: 6e8d04b2-9904-11ee-9b0f-b553b5be7939 From: Federico Serafini To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Federico Serafini , Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH 3/4] xen/drivers: address violations of MISRA C:2012 Rule 8.2 Date: Tue, 12 Dec 2023 16:37:41 +0100 Message-Id: <6cd192af722b99323021c6f1561c5cf0178a1aaf.1702394721.git.federico.serafini@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Add missing parameter names. No functional change. Signed-off-by: Federico Serafini Reviewed-by: Stefano Stabellini --- xen/drivers/char/ehci-dbgp.c | 4 ++-- xen/drivers/video/vga.c | 2 +- xen/include/xen/video.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/drivers/char/ehci-dbgp.c b/xen/drivers/char/ehci-dbgp.c index 72e1beabbb..0f5b41899e 100644 --- a/xen/drivers/char/ehci-dbgp.c +++ b/xen/drivers/char/ehci-dbgp.c @@ -341,7 +341,7 @@ struct ehci_dbgp { struct ehci_caps __iomem *ehci_caps; }; -static int ehci_dbgp_external_startup(struct ehci_dbgp *); +static int ehci_dbgp_external_startup(struct ehci_dbgp *dbgp); static void ehci_dbgp_status(struct ehci_dbgp *dbgp, const char *str) { @@ -997,7 +997,7 @@ err: return -ENODEV; } -typedef void (*set_debug_port_t)(struct ehci_dbgp *, unsigned int); +typedef void (*set_debug_port_t)(struct ehci_dbgp *dbgp, unsigned int port); static void cf_check default_set_debug_port( struct ehci_dbgp *dbgp, unsigned int port) diff --git a/xen/drivers/video/vga.c b/xen/drivers/video/vga.c index 18b590cdf0..b4d0183261 100644 --- a/xen/drivers/video/vga.c +++ b/xen/drivers/video/vga.c @@ -21,7 +21,7 @@ static unsigned char *video; static void cf_check vga_text_puts(const char *s, size_t nr); static void cf_check vga_noop_puts(const char *s, size_t nr) {} -void (*video_puts)(const char *, size_t nr) = vga_noop_puts; +void (*video_puts)(const char *s, size_t nr) = vga_noop_puts; /* * 'vga=[,keep]' where is one of: diff --git a/xen/include/xen/video.h b/xen/include/xen/video.h index 96f8a50132..1ee1aa46b1 100644 --- a/xen/include/xen/video.h +++ b/xen/include/xen/video.h @@ -13,7 +13,7 @@ #ifdef CONFIG_VIDEO void video_init(void); -extern void (*video_puts)(const char *, size_t nr); +extern void (*video_puts)(const char *s, size_t nr); void video_endboot(void); #else #define video_init() ((void)0) From patchwork Tue Dec 12 15:37:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Federico Serafini X-Patchwork-Id: 13489542 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 55A56C4167D for ; Tue, 12 Dec 2023 15:38:21 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.653193.1019558 (Exim 4.92) (envelope-from ) id 1rD4pf-0000j8-Up; Tue, 12 Dec 2023 15:38:03 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 653193.1019558; Tue, 12 Dec 2023 15:38:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rD4pf-0000i1-O8; Tue, 12 Dec 2023 15:38:03 +0000 Received: by outflank-mailman (input) for mailman id 653193; Tue, 12 Dec 2023 15:38:02 +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 1rD4pe-0000ZM-4R for xen-devel@lists.xenproject.org; Tue, 12 Dec 2023 15:38:02 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 6ecebe66-9904-11ee-98e8-6d05b1d4d9a1; Tue, 12 Dec 2023 16:38:01 +0100 (CET) Received: from Dell.homenet.telecomitalia.it (host-82-60-45-193.retail.telecomitalia.it [82.60.45.193]) by support.bugseng.com (Postfix) with ESMTPSA id DD1994EE0C96; Tue, 12 Dec 2023 16:38:00 +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: 6ecebe66-9904-11ee-98e8-6d05b1d4d9a1 From: Federico Serafini To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Federico Serafini , Jan Beulich , Paul Durrant , =?utf-8?q?Rog?= =?utf-8?q?er_Pau_Monn=C3=A9?= , Stefano Stabellini Subject: [XEN PATCH 4/4] xen/iommu: address leftover violation of MISRA C:2012 Rule 8.2 Date: Tue, 12 Dec 2023 16:37:42 +0100 Message-Id: <443dc3828fd6cdfb97d2e9d0c9ec93bb23228d5b.1702394721.git.federico.serafini@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Add missing parameter name. No functional change. Signed-off-by: Federico Serafini Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich --- xen/include/xen/iommu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/include/xen/iommu.h b/xen/include/xen/iommu.h index 69d572543c..f53d045e2c 100644 --- a/xen/include/xen/iommu.h +++ b/xen/include/xen/iommu.h @@ -296,7 +296,7 @@ struct iommu_ops { uint64_t rte); unsigned int (*read_apic_from_ire)(unsigned int apic, unsigned int reg); - int (*setup_hpet_msi)(struct msi_desc *); + int (*setup_hpet_msi)(struct msi_desc *msi_desc); void (*adjust_irq_affinities)(void); void (*clear_root_pgtable)(struct domain *d);