Re: [XEN PATCH v3] arm/mem_access: add conditional build of mem_access.c

2024-05-12 Thread Alessandro Zucchelli
On 2024-05-10 22:59, Julien Grall wrote: Hi, On 10/05/2024 13:32, Alessandro Zucchelli wrote: In order to comply to MISRA C:2012 Rule 8.4 for ARM the following changes are done: revert preprocessor conditional changes to xen/mem_access.h which had it build unconditionally, add conditional

[XEN PATCH v3] arm/mem_access: add conditional build of mem_access.c

2024-05-10 Thread Alessandro Zucchelli
. Signed-off-by: Alessandro Zucchelli --- Changes from v2: Stylistic changes to code aimed to respect xen's coding guidelines. --- Changes from v1: Reverted preprocessor conditional changes to xen/mem_access.h; added conditional build for xen/mem_access.c; provided stubs for asm/mem_access.h

Re: [XEN PATCH v2] arm/mem_access: add conditional build of mem_access.c

2024-05-09 Thread Alessandro Zucchelli
On 2024-05-09 12:52, Julien Grall wrote: Hi, On 09/05/2024 11:39, Alessandro Zucchelli wrote: In order to comply to MISRA C:2012 Rule 8.4 for ARM asm/mem_access.h in the case where MEM_ACCESS=n stubs are needed to allow the conditional compilation of the users of this header. I think you

[XEN PATCH v2] arm/mem_access: add conditional build of mem_access.c

2024-05-09 Thread Alessandro Zucchelli
In order to comply to MISRA C:2012 Rule 8.4 for ARM asm/mem_access.h in the case where MEM_ACCESS=n stubs are needed to allow the conditional compilation of the users of this header. Signed-off-by: Alessandro Zucchelli --- Changes from v1: Reverted preprocessor conditional changes to xen

Re: [XEN PATCH] xen/mem_access: address violations of MISRA C: 2012 Rule 8.4

2024-05-08 Thread Alessandro Zucchelli
On 2024-05-03 11:32, Julien Grall wrote: Hi, On 03/05/2024 08:09, Alessandro Zucchelli wrote: On 2024-04-29 17:58, Jan Beulich wrote: On 29.04.2024 17:45, Alessandro Zucchelli wrote: Change #ifdef CONFIG_MEM_ACCESS by OR-ing defined(CONFIG_ARM), allowing asm/mem_access.h to be included

Re: [XEN PATCH] xen/mem_access: address violations of MISRA C: 2012 Rule 8.4

2024-05-03 Thread Alessandro Zucchelli
On 2024-04-29 17:58, Jan Beulich wrote: On 29.04.2024 17:45, Alessandro Zucchelli wrote: Change #ifdef CONFIG_MEM_ACCESS by OR-ing defined(CONFIG_ARM), allowing asm/mem_access.h to be included in all ARM build configurations. This is to address the violation of MISRA C: 2012 Rule 8.4 which

[XEN PATCH] xen/mem_access: address violations of MISRA C: 2012 Rule 8.4

2024-04-29 Thread Alessandro Zucchelli
ernal linkage is defined". Functions p2m_mem_access_check and p2m_mem_access_check_and_get_page when CONFIG_MEM_ACCESS is not defined in ARM builds don't have visible declarations in the file containing their definitions. Signed-off-by: Alessandro Zucchelli --- xen/include/xen/mem_access.h | 2

Re: [XEN PATCH] automation/eclair_enalysis: amend configuration for some MISRA rules

2024-04-29 Thread Alessandro Zucchelli
On 2024-04-29 14:44, Alessandro Zucchelli wrote: Adjust ECLAIR configuration for rules: R21.14, R21.15, R21.16 by taking into account mem* macros defined in the Xen sources as if they were equivalent to the ones in Standard Library. Signed-off-by: Alessandro Zucchelli --- automation

[XEN PATCH] automation/eclair_enalysis: amend configuration for some MISRA rules

2024-04-29 Thread Alessandro Zucchelli
Adjust ECLAIR configuration for rules: R21.14, R21.15, R21.16 by taking into account mem* macros defined in the Xen sources as if they were equivalent to the ones in Standard Library. Signed-off-by: Alessandro Zucchelli --- automation/eclair_analysis/ECLAIR/analysis.ecl | 17

Re: [XEN PATCH 2/2] x86/msr: add suffix 'U' to MSR_AMD_CSTATE_CFG macro.

2024-04-24 Thread Alessandro Zucchelli
On 2024-04-24 14:53, Teddy Astie wrote: Le 24/04/2024 à 14:11, Alessandro Zucchelli a écrit : This addresses violations of MISRA C:2012 Rule 7.2 which states as following: A “u” or “U” suffix shall be applied to all integer constants that are represented in an unsigned type. No functional

Re: [XEN PATCH 1/2] pci: add suffix 'U' to PCI_CONF_ADDRESS macro.

2024-04-24 Thread Alessandro Zucchelli
On 2024-04-24 14:47, Jan Beulich wrote: On 24.04.2024 14:11, Alessandro Zucchelli wrote: This addresses violations of MISRA C:2012 Rule 7.2 which states as following: A “u” or “U” suffix shall be applied to all integer constants that are represented in an unsigned type. No functional change

[XEN PATCH 1/2] pci: add suffix 'U' to PCI_CONF_ADDRESS macro.

2024-04-24 Thread Alessandro Zucchelli
This addresses violations of MISRA C:2012 Rule 7.2 which states as following: A “u” or “U” suffix shall be applied to all integer constants that are represented in an unsigned type. No functional change. Signed-off-by: Alessandro Zucchelli --- xen/arch/x86/x86_64/pci.c | 2 +- 1 file changed

[XEN PATCH 0/2] x86: address remaining violation of Rule 7.2

2024-04-24 Thread Alessandro Zucchelli
This patch series addresses the last violations of MISRA C:2012 Rule 7.2. This rule will soon be tagged as clean for ECLAIR in a future patch. Alessandro Zucchelli (2): pci: add suffix 'U' to PCI_CONF_ADDRESS macro. x86/msr: add suffix 'U' to MSR_AMD_CSTATE_CFG macro. xen/arch/x86/include

[XEN PATCH 2/2] x86/msr: add suffix 'U' to MSR_AMD_CSTATE_CFG macro.

2024-04-24 Thread Alessandro Zucchelli
This addresses violations of MISRA C:2012 Rule 7.2 which states as following: A “u” or “U” suffix shall be applied to all integer constants that are represented in an unsigned type. No functional change. Signed-off-by: Alessandro Zucchelli --- xen/arch/x86/include/asm/msr-index.h | 2 +- 1