From patchwork Wed Oct 18 14:25:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Federico Serafini X-Patchwork-Id: 13427175 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 1AD4DCDB47E for ; Wed, 18 Oct 2023 14:26:35 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.618618.962487 (Exim 4.92) (envelope-from ) id 1qt7V9-0001bL-0e; Wed, 18 Oct 2023 14:26:23 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 618618.962487; Wed, 18 Oct 2023 14:26:22 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qt7V8-0001ax-SL; Wed, 18 Oct 2023 14:26:22 +0000 Received: by outflank-mailman (input) for mailman id 618618; Wed, 18 Oct 2023 14:26:21 +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 1qt7V7-0001YJ-EN for xen-devel@lists.xenproject.org; Wed, 18 Oct 2023 14:26:21 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 4e887e8c-6dc2-11ee-98d4-6d05b1d4d9a1; Wed, 18 Oct 2023 16:26:20 +0200 (CEST) Received: from Dell.bugseng.com (unknown [37.161.127.233]) by support.bugseng.com (Postfix) with ESMTPSA id 309214EE0740; Wed, 18 Oct 2023 16:26:19 +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: 4e887e8c-6dc2-11ee-98d4-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 Subject: [XEN PATCH 1/7] x86/mctelem: address violations of MISRA C:2012 Rule 8.2 Date: Wed, 18 Oct 2023 16:25:54 +0200 Message-Id: <3e811e830f6f49af6cc5abf4fec3c8c74b72256c.1697638486.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 Acked-by: Jan Beulich --- xen/arch/x86/cpu/mcheck/mctelem.c | 2 +- xen/arch/x86/cpu/mcheck/mctelem.h | 25 +++++++++++++------------ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/xen/arch/x86/cpu/mcheck/mctelem.c b/xen/arch/x86/cpu/mcheck/mctelem.c index 77a4d1d5ff..b8d0368a7d 100644 --- a/xen/arch/x86/cpu/mcheck/mctelem.c +++ b/xen/arch/x86/cpu/mcheck/mctelem.c @@ -208,7 +208,7 @@ void mctelem_defer(mctelem_cookie_t cookie, bool lmce) * @lmce: indicate which pending list on @cpu is handled */ void mctelem_process_deferred(unsigned int cpu, - int (*fn)(mctelem_cookie_t), + int (*fn)(mctelem_cookie_t mctc), bool lmce) { struct mctelem_ent *tep; diff --git a/xen/arch/x86/cpu/mcheck/mctelem.h b/xen/arch/x86/cpu/mcheck/mctelem.h index 21b251847b..f4c5ff848d 100644 --- a/xen/arch/x86/cpu/mcheck/mctelem.h +++ b/xen/arch/x86/cpu/mcheck/mctelem.h @@ -60,18 +60,19 @@ typedef enum mctelem_class { MC_NCLASSES } mctelem_class_t; -extern void mctelem_init(unsigned int); -extern mctelem_cookie_t mctelem_reserve(mctelem_class_t); -extern void *mctelem_dataptr(mctelem_cookie_t); -extern void mctelem_commit(mctelem_cookie_t); -extern void mctelem_dismiss(mctelem_cookie_t); -extern mctelem_cookie_t mctelem_consume_oldest_begin(mctelem_class_t); -extern void mctelem_consume_oldest_end(mctelem_cookie_t); -extern void mctelem_ack(mctelem_class_t, mctelem_cookie_t); -extern void mctelem_defer(mctelem_cookie_t, bool lmce); -extern void mctelem_process_deferred(unsigned int, - int (*)(mctelem_cookie_t), bool lmce); -bool mctelem_has_deferred(unsigned int); +extern void mctelem_init(unsigned int datasz); +extern mctelem_cookie_t mctelem_reserve(mctelem_class_t which); +extern void *mctelem_dataptr(mctelem_cookie_t cookie); +extern void mctelem_commit(mctelem_cookie_t cookie); +extern void mctelem_dismiss(mctelem_cookie_t cookie); +extern mctelem_cookie_t mctelem_consume_oldest_begin(mctelem_class_t which); +extern void mctelem_consume_oldest_end(mctelem_cookie_t cookie); +extern void mctelem_ack(mctelem_class_t which, mctelem_cookie_t cookie); +extern void mctelem_defer(mctelem_cookie_t cookie, bool lmce); +extern void mctelem_process_deferred(unsigned int cpu, + int (*fn)(mctelem_cookie_t mctc), + bool lmce); +bool mctelem_has_deferred(unsigned int cpu); bool mctelem_has_deferred_lmce(unsigned int cpu); #endif From patchwork Wed Oct 18 14:25:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Federico Serafini X-Patchwork-Id: 13427180 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 4B097CDB482 for ; Wed, 18 Oct 2023 14:26:43 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.618619.962494 (Exim 4.92) (envelope-from ) id 1qt7V9-0001gP-AS; Wed, 18 Oct 2023 14:26:23 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 618619.962494; Wed, 18 Oct 2023 14:26:23 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qt7V9-0001eT-2p; Wed, 18 Oct 2023 14:26:23 +0000 Received: by outflank-mailman (input) for mailman id 618619; Wed, 18 Oct 2023 14:26:22 +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 1qt7V8-0001YJ-FI for xen-devel@lists.xenproject.org; Wed, 18 Oct 2023 14:26:22 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 4f62fdc0-6dc2-11ee-98d4-6d05b1d4d9a1; Wed, 18 Oct 2023 16:26:22 +0200 (CEST) Received: from Dell.bugseng.com (unknown [37.161.127.233]) by support.bugseng.com (Postfix) with ESMTPSA id 06ADC4EE073F; Wed, 18 Oct 2023 16:26:20 +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: 4f62fdc0-6dc2-11ee-98d4-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 Subject: [XEN PATCH 2/7] x86/mtrr: address violation of MISRA C:2012 Rule 8.2 Date: Wed, 18 Oct 2023 16:25:55 +0200 Message-Id: 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 Acked-by: Jan Beulich --- xen/arch/x86/include/asm/mtrr.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xen/arch/x86/include/asm/mtrr.h b/xen/arch/x86/include/asm/mtrr.h index 14246e3387..1d2744eceb 100644 --- a/xen/arch/x86/include/asm/mtrr.h +++ b/xen/arch/x86/include/asm/mtrr.h @@ -48,7 +48,7 @@ struct mtrr_state { }; extern struct mtrr_state mtrr_state; -extern void cf_check mtrr_save_fixed_ranges(void *); +extern void cf_check mtrr_save_fixed_ranges(void *info); extern void mtrr_save_state(void); extern int mtrr_add(unsigned long base, unsigned long size, unsigned int type, char increment); @@ -68,14 +68,14 @@ extern void mtrr_aps_sync_begin(void); extern void mtrr_aps_sync_end(void); extern void mtrr_bp_restore(void); -extern bool_t mtrr_var_range_msr_set(struct domain *, struct mtrr_state *, +extern bool_t mtrr_var_range_msr_set(struct domain *d, struct mtrr_state *m, uint32_t msr, uint64_t msr_content); -extern bool_t mtrr_fix_range_msr_set(struct domain *, struct mtrr_state *, +extern bool_t mtrr_fix_range_msr_set(struct domain *d, struct mtrr_state *m, uint32_t row, uint64_t msr_content); -extern bool_t mtrr_def_type_msr_set(struct domain *, struct mtrr_state *, +extern bool_t mtrr_def_type_msr_set(struct domain *d, struct mtrr_state *m, uint64_t msr_content); #ifdef CONFIG_HVM -extern void memory_type_changed(struct domain *); +extern void memory_type_changed(struct domain *d); #else static inline void memory_type_changed(struct domain *d) {} #endif From patchwork Wed Oct 18 14:25:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Federico Serafini X-Patchwork-Id: 13427176 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 AC393CDB483 for ; Wed, 18 Oct 2023 14:26:36 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.618620.962512 (Exim 4.92) (envelope-from ) id 1qt7VB-0002Iu-L1; Wed, 18 Oct 2023 14:26:25 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 618620.962512; Wed, 18 Oct 2023 14:26: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 1qt7VB-0002If-Gl; Wed, 18 Oct 2023 14:26:25 +0000 Received: by outflank-mailman (input) for mailman id 618620; Wed, 18 Oct 2023 14:26: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 1qt7VA-0001YD-JS for xen-devel@lists.xenproject.org; Wed, 18 Oct 2023 14:26:24 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 4ff7eb0a-6dc2-11ee-9b0e-b553b5be7939; Wed, 18 Oct 2023 16:26:22 +0200 (CEST) Received: from Dell.bugseng.com (unknown [37.161.127.233]) by support.bugseng.com (Postfix) with ESMTPSA id DEC424EE0742; Wed, 18 Oct 2023 16:26:21 +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: 4ff7eb0a-6dc2-11ee-9b0e-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 3/7] x86/domain: address violations of MISRA C:2012 Rule 8.2 Date: Wed, 18 Oct 2023 16:25:56 +0200 Message-Id: <95f9938db062ac2ef10e10790fd12a987eaa90b1.1697638486.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 Acked-by: Jan Beulich --- xen/arch/x86/include/asm/domain.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/xen/arch/x86/include/asm/domain.h b/xen/arch/x86/include/asm/domain.h index 619e667938..d033224d2b 100644 --- a/xen/arch/x86/include/asm/domain.h +++ b/xen/arch/x86/include/asm/domain.h @@ -74,20 +74,20 @@ struct mapcache_domain { unsigned long *garbage; }; -int mapcache_domain_init(struct domain *); -int mapcache_vcpu_init(struct vcpu *); -void mapcache_override_current(struct vcpu *); +int mapcache_domain_init(struct domain *d); +int mapcache_vcpu_init(struct vcpu *v); +void mapcache_override_current(struct vcpu *v); /* x86/64: toggle guest between kernel and user modes. */ -void toggle_guest_mode(struct vcpu *); +void toggle_guest_mode(struct vcpu *v); /* x86/64: toggle guest page tables between kernel and user modes. */ -void toggle_guest_pt(struct vcpu *); +void toggle_guest_pt(struct vcpu *v); /* * Initialise a hypercall-transfer page. The given pointer must be mapped * in Xen virtual address space (accesses are not validated or checked). */ -void init_hypercall_page(struct domain *d, void *); +void init_hypercall_page(struct domain *d, void *ptr); /************************************************/ /* shadow paging extension */ @@ -342,8 +342,8 @@ struct arch_domain struct page_list_head relmem_list; const struct arch_csw { - void (*from)(struct vcpu *); - void (*to)(struct vcpu *); + void (*from)(struct vcpu *v); + void (*to)(struct vcpu *v); void noreturn (*tail)(void); } *ctxt_switch; @@ -690,12 +690,12 @@ void update_guest_memory_policy(struct vcpu *v, void domain_cpu_policy_changed(struct domain *d); -bool update_secondary_system_time(struct vcpu *, - struct vcpu_time_info *); -void force_update_secondary_system_time(struct vcpu *, - struct vcpu_time_info *); +bool update_secondary_system_time(struct vcpu *v, + struct vcpu_time_info *u); +void force_update_secondary_system_time(struct vcpu *v, + struct vcpu_time_info *map); -void vcpu_show_registers(const struct vcpu *); +void vcpu_show_registers(const struct vcpu *v); static inline struct vcpu_guest_context *alloc_vcpu_guest_context(void) { From patchwork Wed Oct 18 14:25:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Federico Serafini X-Patchwork-Id: 13427181 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 16570CDB484 for ; Wed, 18 Oct 2023 14:26:44 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.618621.962522 (Exim 4.92) (envelope-from ) id 1qt7VC-0002ZP-TK; Wed, 18 Oct 2023 14:26:26 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 618621.962522; Wed, 18 Oct 2023 14:26: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 1qt7VC-0002ZG-QL; Wed, 18 Oct 2023 14:26:26 +0000 Received: by outflank-mailman (input) for mailman id 618621; Wed, 18 Oct 2023 14:26: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 1qt7VB-0001YJ-1u for xen-devel@lists.xenproject.org; Wed, 18 Oct 2023 14:26:25 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 50eefe53-6dc2-11ee-98d4-6d05b1d4d9a1; Wed, 18 Oct 2023 16:26:24 +0200 (CEST) Received: from Dell.bugseng.com (unknown [37.161.127.233]) by support.bugseng.com (Postfix) with ESMTPSA id 35FA94EE0741; Wed, 18 Oct 2023 16:26:23 +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: 50eefe53-6dc2-11ee-98d4-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 Subject: [XEN PATCH 4/7] x86/cpuidle: address violations of MISRA C:2012 Rule 8.2 Date: Wed, 18 Oct 2023 16:25:57 +0200 Message-Id: <2ce963d3d7c8d14f2ddc80600454ea990599e0e6.1697638486.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 Acked-by: Jan Beulich --- xen/arch/x86/include/asm/cpuidle.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/xen/arch/x86/include/asm/cpuidle.h b/xen/arch/x86/include/asm/cpuidle.h index 3edd7a75d2..707b3e948d 100644 --- a/xen/arch/x86/include/asm/cpuidle.h +++ b/xen/arch/x86/include/asm/cpuidle.h @@ -15,16 +15,17 @@ extern void (*lapic_timer_on)(void); extern uint64_t (*cpuidle_get_tick)(void); -int mwait_idle_init(struct notifier_block *); +int mwait_idle_init(struct notifier_block *nfb); int cpuidle_init_cpu(unsigned int cpu); void cf_check default_dead_idle(void); void cf_check acpi_dead_idle(void); void play_dead(void); void trace_exit_reason(u32 *irq_traced); -void update_idle_stats(struct acpi_processor_power *, - struct acpi_processor_cx *, uint64_t, uint64_t); -void update_last_cx_stat(struct acpi_processor_power *, - struct acpi_processor_cx *, uint64_t); +void update_idle_stats(struct acpi_processor_power *power, + struct acpi_processor_cx *cx, + uint64_t before, uint64_t after); +void update_last_cx_stat(struct acpi_processor_power *power, + struct acpi_processor_cx *cx, uint64_t ticks); bool errata_c6_workaround(void); From patchwork Wed Oct 18 14:25:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Federico Serafini X-Patchwork-Id: 13427177 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 ECDDBCDB482 for ; Wed, 18 Oct 2023 14:26:36 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.618622.962532 (Exim 4.92) (envelope-from ) id 1qt7VE-0002rL-8V; Wed, 18 Oct 2023 14:26:28 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 618622.962532; Wed, 18 Oct 2023 14:26:28 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qt7VE-0002qJ-57; Wed, 18 Oct 2023 14:26:28 +0000 Received: by outflank-mailman (input) for mailman id 618622; Wed, 18 Oct 2023 14:26:26 +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 1qt7VC-0001YJ-SM for xen-devel@lists.xenproject.org; Wed, 18 Oct 2023 14:26:26 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 520793b4-6dc2-11ee-98d4-6d05b1d4d9a1; Wed, 18 Oct 2023 16:26:26 +0200 (CEST) Received: from Dell.bugseng.com (unknown [37.161.127.233]) by support.bugseng.com (Postfix) with ESMTPSA id B27864EE0743; Wed, 18 Oct 2023 16:26:24 +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: 520793b4-6dc2-11ee-98d4-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 Subject: [XEN PATCH 5/7] x86/mcaction: address a violation of MISRA C:2012 Rule 8.2 Date: Wed, 18 Oct 2023 16:25:58 +0200 Message-Id: <80b8eee23c265708dab569b513da9fbfc81febb9.1697638486.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 Acked-by: Jan Beulich --- xen/arch/x86/cpu/mcheck/mcaction.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/cpu/mcheck/mcaction.h b/xen/arch/x86/cpu/mcheck/mcaction.h index 5cbe558fb0..9cb2ad6c9f 100644 --- a/xen/arch/x86/cpu/mcheck/mcaction.h +++ b/xen/arch/x86/cpu/mcheck/mcaction.h @@ -13,7 +13,7 @@ mc_memerr_dhandler(struct mca_binfo *binfo, #define MC_ADDR_VIRTUAL 1 typedef bool (*mce_check_addr_t)(uint64_t status, uint64_t misc, int addr_type); -extern void mce_register_addrcheck(mce_check_addr_t); +extern void mce_register_addrcheck(mce_check_addr_t cbfunc); extern mce_check_addr_t mc_check_addr; From patchwork Wed Oct 18 14:25:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Federico Serafini X-Patchwork-Id: 13427182 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 45BA4CDB47E for ; Wed, 18 Oct 2023 14:26:46 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.618623.962542 (Exim 4.92) (envelope-from ) id 1qt7VG-0003BX-IN; Wed, 18 Oct 2023 14:26:30 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 618623.962542; Wed, 18 Oct 2023 14:26:30 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qt7VG-0003BM-FM; Wed, 18 Oct 2023 14:26:30 +0000 Received: by outflank-mailman (input) for mailman id 618623; Wed, 18 Oct 2023 14:26:28 +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 1qt7VE-0001YJ-O3 for xen-devel@lists.xenproject.org; Wed, 18 Oct 2023 14:26:28 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 5320d6e0-6dc2-11ee-98d4-6d05b1d4d9a1; Wed, 18 Oct 2023 16:26:28 +0200 (CEST) Received: from Dell.bugseng.com (unknown [37.161.127.233]) by support.bugseng.com (Postfix) with ESMTPSA id 70AE34EE073F; Wed, 18 Oct 2023 16:26:26 +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: 5320d6e0-6dc2-11ee-98d4-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 Subject: [XEN PATCH 6/7] x86/vmce: address violations of MISRA C:2012 Rule 8.2 Date: Wed, 18 Oct 2023 16:25:59 +0200 Message-Id: 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 Acked-by: Jan Beulich --- xen/arch/x86/cpu/mcheck/vmce.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/cpu/mcheck/vmce.h b/xen/arch/x86/cpu/mcheck/vmce.h index 2e9b32a9bd..a9a325f776 100644 --- a/xen/arch/x86/cpu/mcheck/vmce.h +++ b/xen/arch/x86/cpu/mcheck/vmce.h @@ -11,10 +11,10 @@ int vmce_init(struct cpuinfo_x86 *c); int unmmap_broken_page(struct domain *d, mfn_t mfn, unsigned long gfn); -int vmce_intel_rdmsr(const struct vcpu *, uint32_t msr, uint64_t *val); -int vmce_intel_wrmsr(struct vcpu *, uint32_t msr, uint64_t val); -int vmce_amd_rdmsr(const struct vcpu *, uint32_t msr, uint64_t *val); -int vmce_amd_wrmsr(struct vcpu *, uint32_t msr, uint64_t val); +int vmce_intel_rdmsr(const struct vcpu *v, uint32_t msr, uint64_t *val); +int vmce_intel_wrmsr(struct vcpu *v, uint32_t msr, uint64_t val); +int vmce_amd_rdmsr(const struct vcpu *v, uint32_t msr, uint64_t *val); +int vmce_amd_wrmsr(struct vcpu *v, uint32_t msr, uint64_t val); int fill_vmsr_data(struct mcinfo_bank *mc_bank, struct domain *d, uint64_t gstatus, int vmce_vcpuid); From patchwork Wed Oct 18 14:26:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Federico Serafini X-Patchwork-Id: 13427178 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 6C665CDB482 for ; Wed, 18 Oct 2023 14:26:40 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.618624.962552 (Exim 4.92) (envelope-from ) id 1qt7VH-0003TT-Su; Wed, 18 Oct 2023 14:26:31 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 618624.962552; Wed, 18 Oct 2023 14:26:31 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qt7VH-0003TB-Nh; Wed, 18 Oct 2023 14:26:31 +0000 Received: by outflank-mailman (input) for mailman id 618624; Wed, 18 Oct 2023 14:26:29 +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 1qt7VF-0001YJ-Qy for xen-devel@lists.xenproject.org; Wed, 18 Oct 2023 14:26:29 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 53c8e717-6dc2-11ee-98d4-6d05b1d4d9a1; Wed, 18 Oct 2023 16:26:29 +0200 (CEST) Received: from Dell.bugseng.com (unknown [37.161.127.233]) by support.bugseng.com (Postfix) with ESMTPSA id 49E054EE0740; Wed, 18 Oct 2023 16:26:28 +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: 53c8e717-6dc2-11ee-98d4-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 Subject: [XEN PATCH 7/7] x86/hpet: address violations of MISRA C:2012 Rule 8.2 Date: Wed, 18 Oct 2023 16:26:00 +0200 Message-Id: <4d3f6608e5c76152e4ad0bbb57e38ac80cf316f3.1697638486.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 Acked-by: Jan Beulich --- xen/arch/x86/hpet.c | 2 +- xen/arch/x86/include/asm/hpet.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/hpet.c b/xen/arch/x86/hpet.c index 79c07f6a9e..63d4158f0f 100644 --- a/xen/arch/x86/hpet.c +++ b/xen/arch/x86/hpet.c @@ -37,7 +37,7 @@ struct hpet_event_channel s_time_t next_event; cpumask_var_t cpumask; spinlock_t lock; - void (*event_handler)(struct hpet_event_channel *); + void (*event_handler)(struct hpet_event_channel *ch); unsigned int idx; /* physical channel idx */ unsigned int cpu; /* msi target */ diff --git a/xen/arch/x86/include/asm/hpet.h b/xen/arch/x86/include/asm/hpet.h index 9919f74730..b342a154e6 100644 --- a/xen/arch/x86/include/asm/hpet.h +++ b/xen/arch/x86/include/asm/hpet.h @@ -60,7 +60,7 @@ extern int8_t opt_hpet_legacy_replacement; * Return value is zero if HPET is unavailable. */ u64 hpet_setup(void); -void hpet_resume(u32 *); +void hpet_resume(u32 *boot_cfg); /* * Disable HPET hardware: restore it to boot time state.