From patchwork Wed Sep 6 08:57:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Federico Serafini X-Patchwork-Id: 13375383 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 A3A6CEB8FA5 for ; Wed, 6 Sep 2023 08:58:05 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.596372.930250 (Exim 4.92) (envelope-from ) id 1qdoMC-00005k-4A; Wed, 06 Sep 2023 08:57:52 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 596372.930250; Wed, 06 Sep 2023 08:57:52 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qdoMB-00005M-UM; Wed, 06 Sep 2023 08:57:51 +0000 Received: by outflank-mailman (input) for mailman id 596372; Wed, 06 Sep 2023 08:57:50 +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 1qdoMA-0008TQ-BH for xen-devel@lists.xenproject.org; Wed, 06 Sep 2023 08:57:50 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 73ecc2ff-4c93-11ee-8783-cb3800f73035; Wed, 06 Sep 2023 10:57:48 +0200 (CEST) Received: from Dell.homenet.telecomitalia.it (host-87-6-207-235.retail.telecomitalia.it [87.6.207.235]) by support.bugseng.com (Postfix) with ESMTPSA id 02D444EE0739; Wed, 6 Sep 2023 10:57:47 +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: 73ecc2ff-4c93-11ee-8783-cb3800f73035 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 Subject: [XEN PATCH 1/4] x86/genapic: address a violation of MISRA C:2012 Rule 8.3 Date: Wed, 6 Sep 2023 10:57:38 +0200 Message-Id: <375af065f072488f74003256aecc325f166d532a.1693990010.git.federico.serafini@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Make function delcaration consistent with the corresponding definition. No functional change. Signed-off-by: Federico Serafini Acked-by: Jan Beulich --- xen/arch/x86/include/asm/genapic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/include/asm/genapic.h b/xen/arch/x86/include/asm/genapic.h index beeaddf19d..970df8ffe0 100644 --- a/xen/arch/x86/include/asm/genapic.h +++ b/xen/arch/x86/include/asm/genapic.h @@ -43,7 +43,7 @@ void cf_check send_IPI_self_legacy(uint8_t vector); void cf_check init_apic_ldr_flat(void); unsigned int cf_check cpu_mask_to_apicid_flat(const cpumask_t *cpumask); -void cf_check send_IPI_mask_flat(const cpumask_t *mask, int vector); +void cf_check send_IPI_mask_flat(const cpumask_t *cpumask, int vector); const cpumask_t *cf_check vector_allocation_cpumask_flat(int cpu); #define GENAPIC_FLAT \ .int_delivery_mode = dest_LowestPrio, \ From patchwork Wed Sep 6 08:57: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: 13375380 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 96EB6EB8FAD for ; Wed, 6 Sep 2023 08:58:00 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.596373.930255 (Exim 4.92) (envelope-from ) id 1qdoMC-0000B9-DX; Wed, 06 Sep 2023 08:57:52 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 596373.930255; Wed, 06 Sep 2023 08:57:52 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qdoMC-00009J-4k; Wed, 06 Sep 2023 08:57:52 +0000 Received: by outflank-mailman (input) for mailman id 596373; Wed, 06 Sep 2023 08:57:50 +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 1qdoMA-0008Tb-PF for xen-devel@lists.xenproject.org; Wed, 06 Sep 2023 08:57:50 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 742b585f-4c93-11ee-9b0d-b553b5be7939; Wed, 06 Sep 2023 10:57:48 +0200 (CEST) Received: from Dell.homenet.telecomitalia.it (host-87-6-207-235.retail.telecomitalia.it [87.6.207.235]) by support.bugseng.com (Postfix) with ESMTPSA id 61D814EE073C; Wed, 6 Sep 2023 10:57:48 +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: 742b585f-4c93-11ee-9b0d-b553b5be7939 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 Subject: [XEN PATCH 2/4] x86/io: address violations of MISRA C:2012 Rule 8.3 Date: Wed, 6 Sep 2023 10:57:39 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Make declarations consistent, no functional change. Signed-off-by: Federico Serafini Acked-by: Jan Beulich --- xen/arch/x86/include/asm/io.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/include/asm/io.h b/xen/arch/x86/include/asm/io.h index 92b784a861..8c8a15bd06 100644 --- a/xen/arch/x86/include/asm/io.h +++ b/xen/arch/x86/include/asm/io.h @@ -51,6 +51,6 @@ __OUT(l,,int) #define IOEMUL_QUIRK_STUB_BYTES 9 struct cpu_user_regs; extern unsigned int (*ioemul_handle_quirk)( - u8 opcode, char *io_emul_stub, struct cpu_user_regs *regs); + uint8_t opcode, char *io_emul_stub, struct cpu_user_regs *regs); #endif From patchwork Wed Sep 6 08:57: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: 13375384 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 4EC16EB8FB5 for ; Wed, 6 Sep 2023 08:58:06 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.596374.930260 (Exim 4.92) (envelope-from ) id 1qdoMC-0000J3-ML; Wed, 06 Sep 2023 08:57:52 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 596374.930260; Wed, 06 Sep 2023 08:57:52 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qdoMC-0000GG-Dz; Wed, 06 Sep 2023 08:57:52 +0000 Received: by outflank-mailman (input) for mailman id 596374; Wed, 06 Sep 2023 08:57:51 +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 1qdoMB-0008TQ-Bb for xen-devel@lists.xenproject.org; Wed, 06 Sep 2023 08:57:51 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 7468798e-4c93-11ee-8783-cb3800f73035; Wed, 06 Sep 2023 10:57:49 +0200 (CEST) Received: from Dell.homenet.telecomitalia.it (host-87-6-207-235.retail.telecomitalia.it [87.6.207.235]) by support.bugseng.com (Postfix) with ESMTPSA id CA65D4EE073D; Wed, 6 Sep 2023 10:57:48 +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: 7468798e-4c93-11ee-8783-cb3800f73035 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 Subject: [XEN PATCH 3/4] x86/io_apic: address violations of MISRA C:2012 Rules 8.2 and 8.3 Date: Wed, 6 Sep 2023 10:57:40 +0200 Message-Id: <56bfeae4c6a5c7f65a3f329003583aed6de13b19.1693990010.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 and make function declarations and definitions consistent. No functional change. Signed-off-by: Federico Serafini Acked-by: Jan Beulich --- xen/arch/x86/include/asm/io_apic.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/include/asm/io_apic.h b/xen/arch/x86/include/asm/io_apic.h index 9165da2281..a7e4c9e146 100644 --- a/xen/arch/x86/include/asm/io_apic.h +++ b/xen/arch/x86/include/asm/io_apic.h @@ -199,7 +199,7 @@ extern struct IO_APIC_route_entry __ioapic_read_entry( unsigned int apic, unsigned int pin, bool raw); void __ioapic_write_entry( unsigned int apic, unsigned int pin, bool raw, - struct IO_APIC_route_entry); + struct IO_APIC_route_entry e); extern struct IO_APIC_route_entry **alloc_ioapic_entries(void); extern void free_ioapic_entries(struct IO_APIC_route_entry **ioapic_entries); @@ -211,6 +211,6 @@ extern int restore_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries, unsigned highest_gsi(void); int ioapic_guest_read( unsigned long physbase, unsigned int reg, u32 *pval); -int ioapic_guest_write(unsigned long physbase, unsigned int reg, u32 pval); +int ioapic_guest_write(unsigned long physbase, unsigned int reg, u32 val); #endif From patchwork Wed Sep 6 08:57: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: 13375381 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 4F92AEB8FA5 for ; Wed, 6 Sep 2023 08:58:02 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.596375.930271 (Exim 4.92) (envelope-from ) id 1qdoMD-0000Ym-C9; Wed, 06 Sep 2023 08:57:53 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 596375.930271; Wed, 06 Sep 2023 08:57:53 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qdoMD-0000Vy-5S; Wed, 06 Sep 2023 08:57:53 +0000 Received: by outflank-mailman (input) for mailman id 596375; Wed, 06 Sep 2023 08:57:52 +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 1qdoMC-0008TQ-Bd for xen-devel@lists.xenproject.org; Wed, 06 Sep 2023 08:57:52 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 74a2f0b9-4c93-11ee-8783-cb3800f73035; Wed, 06 Sep 2023 10:57:49 +0200 (CEST) Received: from Dell.homenet.telecomitalia.it (host-87-6-207-235.retail.telecomitalia.it [87.6.207.235]) by support.bugseng.com (Postfix) with ESMTPSA id 357964EE073E; Wed, 6 Sep 2023 10:57:49 +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: 74a2f0b9-4c93-11ee-8783-cb3800f73035 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 Subject: [XEN PATCH 4/4] xen/vpci: address a violation of MISRA C:2012 Rule 8.3 Date: Wed, 6 Sep 2023 10:57:41 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Make function declarations and definitions consistent. No functional change. Signed-off-by: Federico Serafini --- xen/arch/x86/include/asm/hap.h | 2 +- xen/include/xen/vpci.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/include/asm/hap.h b/xen/arch/x86/include/asm/hap.h index 9d12327b12..05e124ad57 100644 --- a/xen/arch/x86/include/asm/hap.h +++ b/xen/arch/x86/include/asm/hap.h @@ -30,7 +30,7 @@ void hap_vcpu_init(struct vcpu *v); int hap_track_dirty_vram(struct domain *d, unsigned long begin_pfn, unsigned int nr_frames, - XEN_GUEST_HANDLE(void) dirty_bitmap); + XEN_GUEST_HANDLE(void) guest_dirty_bitmap); extern const struct paging_mode *hap_paging_get_mode(struct vcpu *); int hap_set_allocation(struct domain *d, unsigned int pages, bool *preempted); diff --git a/xen/include/xen/vpci.h b/xen/include/xen/vpci.h index 0b8a2a3c74..d743d96a10 100644 --- a/xen/include/xen/vpci.h +++ b/xen/include/xen/vpci.h @@ -26,7 +26,7 @@ typedef int vpci_register_init_t(struct pci_dev *dev); __used_section(".data.vpci." p) = x /* Add vPCI handlers to device. */ -int __must_check vpci_add_handlers(struct pci_dev *dev); +int __must_check vpci_add_handlers(struct pci_dev *pdev); /* Remove all handlers and free vpci related structures. */ void vpci_remove_device(struct pci_dev *pdev);