From patchwork Fri Sep 29 08:56:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Federico Serafini X-Patchwork-Id: 13403926 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 98193E732D0 for ; Fri, 29 Sep 2023 08:58:09 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.610426.949806 (Exim 4.92) (envelope-from ) id 1qm9Jt-0007v8-9z; Fri, 29 Sep 2023 08:57:57 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 610426.949806; Fri, 29 Sep 2023 08:57: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 1qm9Jt-0007v1-76; Fri, 29 Sep 2023 08:57:57 +0000 Received: by outflank-mailman (input) for mailman id 610426; Fri, 29 Sep 2023 08:57:56 +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 1qm9Js-0007un-Kq for xen-devel@lists.xenproject.org; Fri, 29 Sep 2023 08:57:56 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 47c760eb-5ea6-11ee-878b-cb3800f73035; Fri, 29 Sep 2023 10:57:55 +0200 (CEST) Received: from Dell.homenet.telecomitalia.it (host-87-11-204-216.retail.telecomitalia.it [87.11.204.216]) by support.bugseng.com (Postfix) with ESMTPSA id 18FDA4EE073E; Fri, 29 Sep 2023 10:57:55 +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: 47c760eb-5ea6-11ee-878b-cb3800f73035 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 , Henry Wang Subject: [XEN PATCH 1/4] video/vesa: drop bool_t Date: Fri, 29 Sep 2023 10:56:14 +0200 Message-Id: <96027a74236514f38f54051d24a93b6d692644ac.1695972930.git.federico.serafini@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Drop bool_t to make function declaration and definition consistent and address a violation of MISRA C:2012 Rule 8.3. No functional change. Signed-off-by: Federico Serafini --- xen/drivers/video/vesa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/drivers/video/vesa.c b/xen/drivers/video/vesa.c index b007ff5678..70feca21ac 100644 --- a/xen/drivers/video/vesa.c +++ b/xen/drivers/video/vesa.c @@ -145,7 +145,7 @@ static void cf_check lfb_flush(void) __asm__ __volatile__ ("sfence" : : : "memory"); } -void __init vesa_endboot(bool_t keep) +void __init vesa_endboot(bool keep) { if ( keep ) { From patchwork Fri Sep 29 08:56:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Federico Serafini X-Patchwork-Id: 13403928 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 BC7C5E732E3 for ; Fri, 29 Sep 2023 08:58:10 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.610429.949830 (Exim 4.92) (envelope-from ) id 1qm9Jv-0008Ln-Bd; Fri, 29 Sep 2023 08:57:59 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 610429.949830; Fri, 29 Sep 2023 08:57:59 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qm9Jv-0008KS-1g; Fri, 29 Sep 2023 08:57:59 +0000 Received: by outflank-mailman (input) for mailman id 610429; Fri, 29 Sep 2023 08:57:57 +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 1qm9Jt-0007us-PU for xen-devel@lists.xenproject.org; Fri, 29 Sep 2023 08:57:57 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 480b17ea-5ea6-11ee-9b0d-b553b5be7939; Fri, 29 Sep 2023 10:57:56 +0200 (CEST) Received: from Dell.homenet.telecomitalia.it (host-87-11-204-216.retail.telecomitalia.it [87.11.204.216]) by support.bugseng.com (Postfix) with ESMTPSA id A91CA4EE0C81; Fri, 29 Sep 2023 10:57:55 +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: 480b17ea-5ea6-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 , Henry Wang Subject: [XEN PATCH 2/4] x86/uaccess: address violations of MISRA C:2012 Rule 8.3 Date: Fri, 29 Sep 2023 10:56:15 +0200 Message-Id: <7e32d3b6c078a7692668a509d05c44175ad99310.1695972930.git.federico.serafini@bugseng.com> 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 Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich --- xen/arch/x86/include/asm/uaccess.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/include/asm/uaccess.h b/xen/arch/x86/include/asm/uaccess.h index 684fccd95c..7443519d5b 100644 --- a/xen/arch/x86/include/asm/uaccess.h +++ b/xen/arch/x86/include/asm/uaccess.h @@ -10,10 +10,10 @@ #include unsigned int copy_to_guest_pv(void __user *to, const void *from, - unsigned int len); -unsigned int clear_guest_pv(void __user *to, unsigned int len); + unsigned int n); +unsigned int clear_guest_pv(void __user *to, unsigned int n); unsigned int copy_from_guest_pv(void *to, const void __user *from, - unsigned int len); + unsigned int n); /* Handles exceptions in both to and from, but doesn't do access_ok */ unsigned int copy_to_guest_ll(void __user*to, const void *from, unsigned int n); From patchwork Fri Sep 29 08:56:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Federico Serafini X-Patchwork-Id: 13403927 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 892A9E743D5 for ; Fri, 29 Sep 2023 08:58:10 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.610428.949821 (Exim 4.92) (envelope-from ) id 1qm9Ju-0008Dj-S2; Fri, 29 Sep 2023 08:57:58 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 610428.949821; Fri, 29 Sep 2023 08:57:58 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qm9Ju-0008DE-N3; Fri, 29 Sep 2023 08:57:58 +0000 Received: by outflank-mailman (input) for mailman id 610428; Fri, 29 Sep 2023 08:57:57 +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 1qm9Jt-0007un-9L for xen-devel@lists.xenproject.org; Fri, 29 Sep 2023 08:57:57 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 485340ee-5ea6-11ee-878b-cb3800f73035; Fri, 29 Sep 2023 10:57:56 +0200 (CEST) Received: from Dell.homenet.telecomitalia.it (host-87-11-204-216.retail.telecomitalia.it [87.11.204.216]) by support.bugseng.com (Postfix) with ESMTPSA id 287E54EE0C87; Fri, 29 Sep 2023 10:57:56 +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: 485340ee-5ea6-11ee-878b-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 , Henry Wang Subject: [XEN PATCH 3/4] x86/xstate: address a violation of MISRA C:2012 Rule 8.3 Date: Fri, 29 Sep 2023 10:56:16 +0200 Message-Id: <198577fa8876efc48a08a89b55fa5f95694b37c1.1695972930.git.federico.serafini@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Make function declaration and definition consistent. No functional change. Signed-off-by: Federico Serafini Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich --- xen/arch/x86/xstate.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/xstate.c b/xen/arch/x86/xstate.c index f442610fc5..cf94761d05 100644 --- a/xen/arch/x86/xstate.c +++ b/xen/arch/x86/xstate.c @@ -54,16 +54,16 @@ static inline bool xsetbv(u32 index, u64 xfeatures) return lo != 0; } -bool set_xcr0(u64 val) +bool set_xcr0(u64 xfeatures) { uint64_t *this_xcr0 = &this_cpu(xcr0); - if ( *this_xcr0 != val ) + if ( *this_xcr0 != xfeatures ) { - if ( !xsetbv(XCR_XFEATURE_ENABLED_MASK, val) ) + if ( !xsetbv(XCR_XFEATURE_ENABLED_MASK, xfeatures) ) return false; - *this_xcr0 = val; + *this_xcr0 = xfeatures; } return true; From patchwork Fri Sep 29 08:56:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Federico Serafini X-Patchwork-Id: 13403925 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 779B6CE7B1F for ; Fri, 29 Sep 2023 08:58:08 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.610430.949835 (Exim 4.92) (envelope-from ) id 1qm9Jv-0008Us-N3; Fri, 29 Sep 2023 08:57:59 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 610430.949835; Fri, 29 Sep 2023 08:57:59 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qm9Jv-0008TO-Ew; Fri, 29 Sep 2023 08:57:59 +0000 Received: by outflank-mailman (input) for mailman id 610430; Fri, 29 Sep 2023 08:57:58 +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 1qm9Ju-0007un-9Z for xen-devel@lists.xenproject.org; Fri, 29 Sep 2023 08:57:58 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 489beda4-5ea6-11ee-878b-cb3800f73035; Fri, 29 Sep 2023 10:57:57 +0200 (CEST) Received: from Dell.homenet.telecomitalia.it (host-87-11-204-216.retail.telecomitalia.it [87.11.204.216]) by support.bugseng.com (Postfix) with ESMTPSA id 9C2B14EE0C88; Fri, 29 Sep 2023 10:57:56 +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: 489beda4-5ea6-11ee-878b-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 , Henry Wang Subject: [XEN PATCH 4/4] x86/psr: address a violation of MISRA C:2012 Rule 8.3 Date: Fri, 29 Sep 2023 10:56:17 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Make function declaration and definition consistent. No functional change. Signed-off-by: Federico Serafini Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich --- xen/arch/x86/include/asm/psr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/include/asm/psr.h b/xen/arch/x86/include/asm/psr.h index c2257da7fc..8ecb7a0eea 100644 --- a/xen/arch/x86/include/asm/psr.h +++ b/xen/arch/x86/include/asm/psr.h @@ -81,7 +81,7 @@ int psr_get_info(unsigned int socket, enum psr_type type, int psr_get_val(struct domain *d, unsigned int socket, uint32_t *val, enum psr_type type); int psr_set_val(struct domain *d, unsigned int socket, - uint64_t val, enum psr_type type); + uint64_t new_val, enum psr_type type); void psr_domain_init(struct domain *d); void psr_domain_free(struct domain *d);