From nobody Mon Nov 25 02:54:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1718816985009489.24142392732165; Wed, 19 Jun 2024 10:09:45 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.743952.1150963 (Exim 4.92) (envelope-from ) id 1sJyoM-00054r-EC; Wed, 19 Jun 2024 17:09:30 +0000 Received: by outflank-mailman (output) from mailman id 743952.1150963; Wed, 19 Jun 2024 17:09: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 1sJyoM-00054k-A0; Wed, 19 Jun 2024 17:09:30 +0000 Received: by outflank-mailman (input) for mailman id 743952; Wed, 19 Jun 2024 17:09:29 +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 1sJyoL-0004ov-BR for xen-devel@lists.xenproject.org; Wed, 19 Jun 2024 17:09:29 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id af83f3af-2e5e-11ef-b4bb-af5377834399; Wed, 19 Jun 2024 19:09:28 +0200 (CEST) Received: from delta.bugseng.com.homenet.telecomitalia.it (host-87-17-171-46.retail.telecomitalia.it [87.17.171.46]) by support.bugseng.com (Postfix) with ESMTPSA id 715DF4EE0739; Wed, 19 Jun 2024 19:09:27 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: af83f3af-2e5e-11ef-b4bb-af5377834399 From: Alessandro Zucchelli To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Alessandro Zucchelli , Simone Ballarin , Doug Goldstein , Stefano Stabellini Subject: [PATCH 1/2] automation/eclair_analysis: deviate MISRA C Rule 21.2 Date: Wed, 19 Jun 2024 19:09:09 +0200 Message-Id: <5b8364528a9ece8fec9f0e70bee81c2ea94c1820.1718816397.git.alessandro.zucchelli@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1718816986568100001 Content-Type: text/plain; charset="utf-8" Rule 21.2 reports identifiers reserved for the C and POSIX standard libraries: all xen's translation units are compiled with option -nostdinc, this guarantees that these libraries are not used, therefore a justification is provided for allowing uses of such identifiers in the project. Builtins starting with "__builtin_" still remain available. No functional change. Signed-off-by: Alessandro Zucchelli --- automation/eclair_analysis/ECLAIR/deviations.ecl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl b/automation/= eclair_analysis/ECLAIR/deviations.ecl index 447c1e6661..9fa9a7f01c 100644 --- a/automation/eclair_analysis/ECLAIR/deviations.ecl +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl @@ -487,6 +487,17 @@ leads to a violation of the Rule are deviated." # Series 21. # =20 +-doc_begin=3D"Rules 21.1 and 21.2 report identifiers reserved for the C an= d POSIX +standard libraries: if these libraries are not used there is no reason to = avoid such +identifiers. All xen's translation units are compiled with option -nostdin= c, +this guarantees that these libraries are not used. Some compilers could pe= rform +optimization using built-in functions: this risk is partially addressed by +using the compilation option -fno-builtin. Builtins starting with \"__buil= tin_\" +still remain available." +-config=3DMC3R1.R21.1,macros=3D{safe , "!^__builtin_$" } +-config=3DMC3R1.R21.2,declarations+=3D{safe, "!^__builtin_.*$"} +-doc_end + -doc_begin=3D"Xen does not use the functions provided by the Standard Libr= ary, but implements a set of functions that share the same names as their Standard = Library equivalent. The implementation of these functions is available in source form, so the = undefined, unspecified --=20 2.34.1 From nobody Mon Nov 25 02:54:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1718816992823955.3659123757961; Wed, 19 Jun 2024 10:09:52 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.743953.1150973 (Exim 4.92) (envelope-from ) id 1sJyoR-0005OL-Kt; Wed, 19 Jun 2024 17:09:35 +0000 Received: by outflank-mailman (output) from mailman id 743953.1150973; Wed, 19 Jun 2024 17:09:35 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sJyoR-0005O7-Hr; Wed, 19 Jun 2024 17:09:35 +0000 Received: by outflank-mailman (input) for mailman id 743953; Wed, 19 Jun 2024 17:09:34 +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 1sJyoQ-0004ov-Ce for xen-devel@lists.xenproject.org; Wed, 19 Jun 2024 17:09:34 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id b28c2bee-2e5e-11ef-b4bb-af5377834399; Wed, 19 Jun 2024 19:09:33 +0200 (CEST) Received: from delta.bugseng.com.homenet.telecomitalia.it (host-87-17-171-46.retail.telecomitalia.it [87.17.171.46]) by support.bugseng.com (Postfix) with ESMTPSA id 8A0484EE073D; Wed, 19 Jun 2024 19:09:32 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: b28c2bee-2e5e-11ef-b4bb-af5377834399 From: Alessandro Zucchelli To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Nicola Vetrini , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH 2/2] x86/APIC: address violation of MISRA C Rule 21.2 Date: Wed, 19 Jun 2024 19:09:10 +0200 Message-Id: <4a31cfc5e8d4e2c5e159ca4d67ac477feb000073.1718816397.git.alessandro.zucchelli@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1718816994365100001 Content-Type: text/plain; charset="utf-8" From: Nicola Vetrini The rule disallows the usage of an identifier reserved by the C standard. All identfiers starting with '__' are reserved for any use, so the label can be renamed in order to avoid the violation. No functional change. Signed-off-by: Nicola Vetrini --- xen/arch/x86/apic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/apic.c b/xen/arch/x86/apic.c index 6567af685a..2a60e6fe26 100644 --- a/xen/arch/x86/apic.c +++ b/xen/arch/x86/apic.c @@ -925,7 +925,7 @@ void __init init_apic_mappings(void) unsigned long apic_phys; =20 if ( x2apic_enabled ) - goto __next; + goto next; /* * If no local APIC can be found then set up a fake all * zeroes page to simulate the local APIC and another @@ -941,7 +941,7 @@ void __init init_apic_mappings(void) apic_printk(APIC_VERBOSE, "mapped APIC to %08Lx (%08lx)\n", APIC_BASE, apic_phys); =20 -__next: +next: /* * Fetch the APIC ID of the BSP in case we have a * default configuration (or the MP table is broken). --=20 2.34.1