Re: [PATCH v5 05/12] arm/sve: save/restore SVE context switch

2023-04-13 Thread Luca Fancellu
> On 13 Apr 2023, at 14:11, Julien Grall wrote: > > > > On 12/04/2023 10:49, Luca Fancellu wrote: >> Save/restore context switch for SVE, allocate memory to contain >> the Z0-31 registers whose length is maximum 2048 bits each and >> FFR who can be maxim

Re: [PATCH v5 02/12] xen/arm: add SVE vector length field to the domain

2023-04-13 Thread Luca Fancellu
> > >> Can we move this somewhere else to avoid adding extra padding? Also shouldn't this be protected with #ifdef CONFIG_ARM_64 to make clear this is not supported on Xen 32-bit? >>> Yes, I’ll move it and protect with CONFIG_ARM_64, is it ok for you if I >>> move it after: >>>

Re: [PATCH v5 02/12] xen/arm: add SVE vector length field to the domain

2023-04-14 Thread Luca Fancellu
> On 13 Apr 2023, at 20:52, Julien Grall wrote: > > Hi Luca, > > On 13/04/2023 15:05, Luca Fancellu wrote: >>> On 13 Apr 2023, at 14:30, Julien Grall wrote: >>> >>> >>> >>> On 13/04/2023 14:24, Luca Fancellu wrote: >>&g

Re: [PATCH v5 01/12] xen/arm: enable SVE extension for Xen

2023-04-14 Thread Luca Fancellu
> On 13 Apr 2023, at 13:47, Bertrand Marquis wrote: > > Hi Luca, > >> On 12 Apr 2023, at 11:49, Luca Fancellu wrote: >> >> Enable Xen to handle the SVE extension, add code in cpufeature module >> to handle ZCR SVE register, disable trapping SVE fea

Re: [PATCH v7 2/5] xen/arm64: Rework the memory layout

2023-04-17 Thread Luca Fancellu
e reserved area for identity mapping. > > Signed-off-by: Julien Grall > Hi Julien, It looks fine to me. Reviewed-by: Luca Fancellu

Re: [PATCH v7 3/5] xen/arm64: mm: Introduce helpers to prepare/enable/disable the identity mapping

2023-04-17 Thread Luca Fancellu
he identity mapping > > Signed-off-by: Julien Grall > Hi Julien, Reviewed-by: Luca Fancellu

Re: [PATCH v6 7/9] docs: Change Makefile and sphinx configuration for doxygen

2021-07-02 Thread Luca Fancellu
Hi Stefano, > On 1 Jul 2021, at 18:43, Stefano Stabellini wrote: > > On Thu, 1 Jul 2021, Luca Fancellu wrote: >>> On 24 Jun 2021, at 00:33, Stefano Stabellini wrote: >>> >>> On Mon, 10 May 2021, Luca Fancellu wrote: >>>> Modify docs/Makefi

Re: [PATCH v6 9/9] docs/doxygen: doxygen documentation for grant_table.h

2021-07-02 Thread Luca Fancellu
> On 1 Jul 2021, at 18:44, Stefano Stabellini wrote: > > On Thu, 1 Jul 2021, Luca Fancellu wrote: >> Hi Stefano, >> >>> On 24 Jun 2021, at 00:34, Stefano Stabellini wrote: >>> >>> On Mon, 10 May 2021, Luca Fancellu wrote: >>>> Mod

Re: [PATCH] tools/xenstored: Stash the correct request in lu_status->in

2021-07-05 Thread Luca Fancellu
> On 1 Jul 2021, at 15:03, Julien Grall wrote: > > From: Julien Grall > > When Live-Updating with some load, Xenstored may hit the assert > req->in == lu_status->in in do_lu_start(). > > This is happening because the request is stashed when Live-Update > begins. This happens in a different

Re: [PATCH v6 7/9] docs: Change Makefile and sphinx configuration for doxygen

2021-07-05 Thread Luca Fancellu
> On 2 Jul 2021, at 23:23, Stefano Stabellini wrote: > > On Fri, 2 Jul 2021, Luca Fancellu wrote: >>> On 1 Jul 2021, at 18:43, Stefano Stabellini wrote: >>> >>> On Thu, 1 Jul 2021, Luca Fancellu wrote: >>>>> On 24 Jun 2021, at 00:33, Stefan

[PATCH v7 0/9] Use Doxygen and sphinx for html documentation

2021-07-05 Thread Luca Fancellu
ause my gitlab username contains a dot, this is a known limitation of gitlab pages so there is nothing to worry about. Luca Fancellu (9): docs: add doxygen configuration file docs: add Xen png logo for the doxygen documentation docs: add doxygen templates m4/python: add function to docs_tool.m4 and n

[PATCH v7 2/9] docs: add Xen png logo for the doxygen documentation

2021-07-05 Thread Luca Fancellu
Add the xen-doxygen folder for the doxygen template and add the Xen png logo in it. Signed-off-by: Luca Fancellu Acked-by: Stefano Stabellini --- docs/xen-doxygen/xen_project_logo_165x67.png | Bin 0 -> 18223 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 docs/

[PATCH v7 3/9] docs: add doxygen templates

2021-07-05 Thread Luca Fancellu
Add doxygen templates for the doxygen documentation. Signed-off-by: Luca Fancellu Acked-by: Stefano Stabellini --- docs/xen-doxygen/customdoxygen.css | 36 +++ docs/xen-doxygen/footer.html | 21 +++ docs/xen-doxygen/header.html | 56

[PATCH v7 1/9] docs: add doxygen configuration file

2021-07-05 Thread Luca Fancellu
Add xen.doxyfile.in as template for the doxygen configuration file, it will be used to generate the doxygen documentation. Signed-off-by: Luca Fancellu Acked-by: Stefano Stabellini --- docs/xen.doxyfile.in | 2316 ++ 1 file changed, 2316 insertions

[PATCH v7 4/9] m4/python: add function to docs_tool.m4 and new m4 module

2021-07-05 Thread Luca Fancellu
Add ax_python_module.m4 to have a way to check if a python module is installed in the system. Add a function to docs_tool.m4 to throw an error if the required docs tool is missing. Signed-off-by: Luca Fancellu Acked-by: Stefano Stabellini --- m4/ax_python_module.m4 | 56

[PATCH v7 8/9] docs: hypercalls sphinx skeleton for generated html

2021-07-05 Thread Luca Fancellu
Create a skeleton for the documentation about hypercalls. At this stage the documentation can be created only for one architecture at a time. Signed-off-by: Luca Fancellu --- v7 changes: - modify the commit message v6 changes: - Now every platform has the same sections in .rst files

[PATCH v7 5/9] docs: add checks to configure for sphinx and doxygen

2021-07-05 Thread Luca Fancellu
Add checks in the configure files to see if the system is capable of generating the sphinx html docs using doxygen and sphinx-breathe tools. Signed-off-by: Luca Fancellu Acked-by: Stefano Stabellini --- config/Docs.mk.in | 2 + docs/configure| 258

[PATCH v7 9/9] docs/doxygen: doxygen documentation for grant_table.h

2021-07-05 Thread Luca Fancellu
for grant table Signed-off-by: Luca Fancellu --- v7 changes: - commit message changed - Add comment about grant table queries and uses to the documentation v6 changes: - Fix misaligned comment - Moved comments to make them display in the docs - Included more documentation in the docs v5 changes

[PATCH v7 6/9] docs: add doxygen preprocessor and related files

2021-07-05 Thread Luca Fancellu
: Luca Fancellu --- v7 changes: - add comment to address one limitation of the preprocessor and change commit message. --- docs/xen-doxygen/doxy-preprocessor.py | 116 ++ docs/xen-doxygen/doxy_input.list | 0 docs/xen-doxygen/doxygen_include.h.in | 32 +++ 3 files

[PATCH v7 7/9] docs: Change Makefile and sphinx configuration for doxygen

2021-07-05 Thread Luca Fancellu
for doxygen. Signed-off-by: Luca Fancellu --- v7 changes: - in conf.py, get DOXYGEN_OUTPUT as environmental variable and add new types into cpp_id_attributes --- .gitignore| 6 ++ docs/Makefile | 43 --- docs/conf.py | 43

Re: [PATCH v7 9/9] docs/doxygen: doxygen documentation for grant_table.h

2021-07-05 Thread Luca Fancellu
Hi Jan, > On 5 Jul 2021, at 14:03, Jan Beulich wrote: > > On 05.07.2021 12:51, Luca Fancellu wrote: >> Modification to include/public/grant_table.h: >> >> 1) Add doxygen tags to: >> - Create Grant tables section >> - include variables in the genera

Re: [PATCH v7 9/9] docs/doxygen: doxygen documentation for grant_table.h

2021-07-06 Thread Luca Fancellu
> On 5 Jul 2021, at 14:27, Jan Beulich wrote: > > On 05.07.2021 15:23, Luca Fancellu wrote: >> Hi Jan, >> >>> On 5 Jul 2021, at 14:03, Jan Beulich wrote: >>> >>> On 05.07.2021 12:51, Luca Fancellu wrote: >>>> Modification to inc

Re: [PATCH v7 9/9] docs/doxygen: doxygen documentation for grant_table.h

2021-07-06 Thread Luca Fancellu
> On 5 Jul 2021, at 15:20, Julien Grall wrote: > > Hi Luca, > > On 05/07/2021 11:51, Luca Fancellu wrote: >> Modification to include/public/grant_table.h: >> 1) Add doxygen tags to: >> - Create Grant tables section >> - include variables in

Re: [RFC PATCH 1/4] xen/Makefile: add analysis-coverity and analysis-eclair

2022-11-25 Thread Luca Fancellu
> On 14 Nov 2022, at 16:25, Anthony PERARD wrote: > > On Mon, Nov 07, 2022 at 10:47:36AM +0000, Luca Fancellu wrote: >> xen/Makefile| 50 ++- > > Hi Luca, Hi, > > Could you write a shell script which would probably be easier

Re: [XEN PATCH maybe for-4.17] tools/include: Fix clean and rework COPYING for installed Xen public header

2022-11-25 Thread Luca Fancellu
> On 24 Nov 2022, at 16:42, Anthony PERARD wrote: > > Use actual include directory used to install the public header in > COPYING file. > > Also, move the input file out of "tools/include/xen/" because that > directory is removed on `make clean`. > > We can't used ./configure because $include

Re: [RFC v2 04/12] xen/arm32: head: Remove restriction where to load Xen

2022-11-25 Thread Luca Fancellu
> On 17 Nov 2022, at 20:18, Julien Grall wrote: > > Hi Luca, > > On 25/10/2022 12:56, Luca Fancellu wrote: >>> On 22 Oct 2022, at 16:04, Julien Grall wrote: >>> >>> From: Julien Grall >>> >>> At the moment, bootloaders can load

[PATCH 0/4] Static analyser finding deviation

2022-11-28 Thread Luca Fancellu
pushed as RFC and collected many feedbacks, thank you for the review. In this serie to analyse the codebase, a script is used instead of integrating the process into the makefile. --- Luca Fancellu (4): xen/scripts: add xen-analysis.py for coverity and eclair analysis xen/scripts: add cppcheck

[PATCH 2/4] xen/scripts: add cppcheck tool to the xen-analysis.py script

2022-11-28 Thread Luca Fancellu
pdate documentation. - update .gitignore Signed-off-by: Luca Fancellu --- .gitignore| 8 +- docs/misra/cppcheck.txt | 27 +- docs/misra/documenting-violations.rst | 7 +- docs/misra/false-positive-cppcheck.json | 12 +

[PATCH 3/4] tools/misra: fix skipped rule numbers

2022-11-28 Thread Luca Fancellu
dictionary that list the rules in misra c2012. Fixes: 57caa5375321 ("xen: Add MISRA support to cppcheck make rule") Signed-off-by: Luca Fancellu --- xen/tools/convert_misra_doc.py | 32 ++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a

[PATCH 1/4] xen/scripts: add xen-analysis.py for coverity and eclair analysis

2022-11-28 Thread Luca Fancellu
docs/misra/xen-static-analysis.rst to explain how to use the script to analyse Xen. Add analysis artifacts files to .gitignore. Signed-off-by: Luca Fancellu --- .gitignore | 1 + docs/misra/documenting-violations.rst| 191 +++ docs

[PATCH 4/4] xen: Justify linker script defined symbols in include/xen/kernel.h

2022-11-28 Thread Luca Fancellu
cases. Signed-off-by: Luca Fancellu --- docs/misra/safe.json | 9 + xen/include/xen/kernel.h | 4 2 files changed, 13 insertions(+) diff --git a/docs/misra/safe.json b/docs/misra/safe.json index e079d3038120..e3c8a1d8eb36 100644 --- a/docs/misra/safe.json +++ b/docs/misra

Re: [PATCH 2/4] xen/scripts: add cppcheck tool to the xen-analysis.py script

2022-11-28 Thread Luca Fancellu
> On 28 Nov 2022, at 15:19, Jan Beulich wrote: > > On 28.11.2022 15:10, Luca Fancellu wrote: >> Change cppcheck invocation method by using the xen-analysis.py >> script using the arguments --run-cppcheck. >> >> Now cppcheck analysis will build Xen while th

Re: [PATCH 0/4] Static analyser finding deviation

2022-11-29 Thread Luca Fancellu
> On 29 Nov 2022, at 01:55, Stefano Stabellini wrote: > > On Mon, 28 Nov 2022, Luca Fancellu wrote: >> This serie introduces a way to suppress a static analyser finding providing a >> proper justification for it. >> The process is explained in the docs/misra

Re: [PATCH 2/4] xen/scripts: add cppcheck tool to the xen-analysis.py script

2022-11-29 Thread Luca Fancellu
> On 29 Nov 2022, at 09:42, Jan Beulich wrote: > > On 28.11.2022 16:37, Luca Fancellu wrote: >>> On 28 Nov 2022, at 15:19, Jan Beulich wrote: >>> On 28.11.2022 15:10, Luca Fancellu wrote: >>>> Change cppcheck invocation method by using the xen-analysis.p

Re: [PATCH 0/4] Static analyser finding deviation

2022-11-29 Thread Luca Fancellu
> On 29 Nov 2022, at 09:46, Luca Fancellu wrote: > > > >> On 29 Nov 2022, at 01:55, Stefano Stabellini wrote: >> >> On Mon, 28 Nov 2022, Luca Fancellu wrote: >>> This serie introduces a way to suppress a static analyser finding providing >>

Re: [PATCH 3/4] tools/misra: fix skipped rule numbers

2022-11-30 Thread Luca Fancellu
> On 29 Nov 2022, at 23:51, Stefano Stabellini wrote: > > On Mon, 28 Nov 2022, Luca Fancellu wrote: >> Currently the script convert_misra_doc.py is using a loop through >> range(1,22) to enumerate rules that needs to be skipped, however >> range function does not

Re: [PATCH 2/4] xen/scripts: add cppcheck tool to the xen-analysis.py script

2022-11-30 Thread Luca Fancellu
Hi Stefano, > I think the revert of the cppcheck integration in xen/Makefile and > xen/tools/merge_cppcheck_reports.py could be a separate patch. There is > no need to make sure cppcheck support in the xen Makefile is > "bisectable". That patch could have my acked-by already. Ok I will split thes

Re: [PATCH 2/4] xen/scripts: add cppcheck tool to the xen-analysis.py script

2022-12-01 Thread Luca Fancellu
> On 1 Dec 2022, at 08:33, Jan Beulich wrote: > > On 30.11.2022 21:26, Stefano Stabellini wrote: >> On Wed, 30 Nov 2022, Luca Fancellu wrote: >>>> I think the revert of the cppcheck integration in xen/Makefile and >>>> xen/tools/merge_cppcheck_reports

Re: [PATCH 3/4] tools/misra: fix skipped rule numbers

2022-12-01 Thread Luca Fancellu
>> >> Hi Stefano, >> >> MISRA rules are in this format X.Y, misra_c2012_rules is a dictionary where >> the key is >> X and the value is the maximum number that Y can have. >> >> For example rule 13.Y goes from 13.1 to 13.6 (in the dictionary >> misra_c2012_rules[13] == 6), >> so the code ca

Re: [PATCH 2/4] xen/scripts: add cppcheck tool to the xen-analysis.py script

2022-12-01 Thread Luca Fancellu
Hi Stefano, >>> >>> +sm_tool_args="n" +;; +--cppcheck-cmd=*) +CPPCHECK_TOOL="$(eval echo "${OPTION#*=}")" +sm_tool_args="y" +;; +--cppcheck-html) +CPPCHECK_HTML="y" >>>

Re: [PATCH 2/4] xen/scripts: add cppcheck tool to the xen-analysis.py script

2022-12-02 Thread Luca Fancellu
> On 1 Dec 2022, at 20:23, Stefano Stabellini wrote: > > On Thu, 1 Dec 2022, Luca Fancellu wrote: >> Hi Stefano, >> >>>>> >>>>> >>>>>> +sm_tool_args="n" >>>>>> +

[PATCH v2 3/5] xen/Makefile: remove Cppcheck invocation from the Makefile

2022-12-05 Thread Luca Fancellu
. Remove some entry from the .gitignore related to Cppcheck invocation from Makefile Signed-off-by: Luca Fancellu --- v2 changes: - new patch --- --- .gitignore | 2 - xen/Makefile| 116 ++-- xen/tools

[PATCH v2 0/5] Static analyser finding deviation

2022-12-05 Thread Luca Fancellu
applied for some MISRA findings. --- This serie was pushed as RFC and collected many feedbacks, thank you for the review. In this serie to analyse the codebase, a script is used instead of integrating the process into the makefile. --- Luca Fancellu (5): xen/scripts: add xen-analysis.py for coverity

[PATCH v2 5/5] xen: Justify linker script defined symbols in include/xen/kernel.h

2022-12-05 Thread Luca Fancellu
cases. Signed-off-by: Luca Fancellu Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich --- v2 changes: - add R-by and Ack-by (Stefano, Jan) --- --- docs/misra/safe.json | 9 + xen/include/xen/kernel.h | 4 2 files changed, 13 insertions(+) diff --git a/docs/misra/safe.json

[PATCH v2 1/5] xen/scripts: add xen-analysis.py for coverity and eclair analysis

2022-12-05 Thread Luca Fancellu
docs/misra/xen-static-analysis.rst to explain how to use the script to analyse Xen. Add analysis artifacts files to .gitignore. Signed-off-by: Luca Fancellu --- v2 changes: - no change --- --- .gitignore | 1 + docs/misra/documenting-violations.rst

[PATCH v2 4/5] tools/misra: fix skipped rule numbers

2022-12-05 Thread Luca Fancellu
Signed-off-by: Luca Fancellu Reviewed-by: Stefano Stabellini --- Changes in v2: - modified commit message, add R-by (Stefano) --- --- xen/tools/convert_misra_doc.py | 32 ++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/xen/tools/convert_misra_do

[PATCH v2 2/5] xen/scripts: add cppcheck tool to the xen-analysis.py script

2022-12-05 Thread Luca Fancellu
n the compiled file together with the file compilation. - guarded hypercall-defs.c with CPPCHECK define because cppcheck gets confused as the file does not contain c code. - add false-positive-cppcheck.json file - update documentation. - update .gitignore Signed-off-by: Luca Fan

Re: [PATCH v2 2/5] xen/scripts: add cppcheck tool to the xen-analysis.py script

2022-12-06 Thread Luca Fancellu
Hi Stefano, >> >> +++ b/docs/misra/false-positive-cppcheck.json >> @@ -0,0 +1,12 @@ >> +{ >> +"version": "1.0", >> +"content": [ >> +{ >> +"id": "SAF-0-false-positive-cppcheck", >> +"violation-id": "", >> +"tool-version": "", >> +"n

Re: [PATCH] xen: Remove trigraphs from comments

2022-12-06 Thread Luca Fancellu
se them > in the code, but still there are some comments where they are > accidentally used. Fix it. > > Signed-off-by: Michal Orzel Reviewed-by: Luca Fancellu > --- > xen/arch/x86/x86_emulate/x86_emulate.h | 2 +- > xen/include/public/arch-x86_64.h | 2 +

Re: [PATCH v2 3/5] xen/Makefile: remove Cppcheck invocation from the Makefile

2022-12-06 Thread Luca Fancellu
> On 5 Dec 2022, at 15:58, Jan Beulich wrote: > > On 05.12.2022 16:40, Luca Fancellu wrote: >> The script xen-analysis.py is going to be used for the analysis with >> cppcheck, so remove the rules from the Makefile >> >> The python script xen/tools/merge_cp

Re: [PATCH v2 2/5] xen/scripts: add cppcheck tool to the xen-analysis.py script

2022-12-06 Thread Luca Fancellu
> On 6 Dec 2022, at 17:06, Stefano Stabellini wrote: > > On Tue, 6 Dec 2022, Luca Fancellu wrote: >> Hi Stefano, >>>> >>>> +++ b/docs/misra/false-positive-cppcheck.json >>>> @@ -0,0 +1,12 @@ >>>> +{ >>>> +&qu

[PATCH v3 1/5] xen/scripts: add xen-analysis.py for coverity and eclair analysis

2022-12-07 Thread Luca Fancellu
docs/misra/xen-static-analysis.rst to explain how to use the script to analyse Xen. Add analysis artifacts files to .gitignore. Signed-off-by: Luca Fancellu --- v3 changes: - improved help content in the script (Stefano) - used utils.invoke_command from this patch (Stefano) v2 changes: - no

[PATCH v3 5/5] xen: Justify linker script defined symbols in include/xen/kernel.h

2022-12-07 Thread Luca Fancellu
cases. Signed-off-by: Luca Fancellu Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich --- v3 changes: - none v2 changes: - add R-by and Ack-by (Stefano, Jan) --- --- docs/misra/safe.json | 9 + xen/include/xen/kernel.h | 4 2 files changed, 13 insertions(+) diff --git a

[PATCH v3 0/5] Static analyser finding deviation

2022-12-07 Thread Luca Fancellu
applied for some MISRA findings. --- This serie was pushed as RFC and collected many feedbacks, thank you for the review. In this serie to analyse the codebase, a script is used instead of integrating the process into the makefile. --- Luca Fancellu (5): xen/scripts: add xen-analysis.py for coverity

[PATCH v3 4/5] tools/misra: fix skipped rule numbers

2022-12-07 Thread Luca Fancellu
Signed-off-by: Luca Fancellu Reviewed-by: Stefano Stabellini --- v3 changes: - none Changes in v2: - modified commit message, add R-by (Stefano) --- --- xen/tools/convert_misra_doc.py | 32 ++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a

[PATCH v3 2/5] xen/scripts: add cppcheck tool to the xen-analysis.py script

2022-12-07 Thread Luca Fancellu
n the compiled file together with the file compilation. - guarded hypercall-defs.c with CPPCHECK define because cppcheck gets confused as the file does not contain c code. - add false-positive-cppcheck.json file - update documentation. - update .gitignore Signed-off-by: Luca Fancellu -

[PATCH v3 3/5] xen/Makefile: remove Cppcheck invocation from the Makefile

2022-12-07 Thread Luca Fancellu
script is kept as it is used with the new process. Signed-off-by: Luca Fancellu --- v3 changes: - add information on reverted commits (Jan) v2 changes: - new patch --- --- .gitignore | 2 - xen/Makefile| 116 ++-- xen/tools

Re: [PATCH] xen/arm: efi-boot misra rule 4.1 fix

2022-12-09 Thread Luca Fancellu
I’ve checked also with coverity and it solves the violation. Reviewed-by: Luca Fancellu

Re: [PATCH] xen/arm: Allow to set grant table related limits for dom0less domUs

2022-12-14 Thread Luca Fancellu
d to have. > > Update documentation accordingly. > > Note that the sanity checks regarding the passed values are already > there in grant_table_init() resulting in panic in case of errors, > therefore no need to repeat them in create_domUs(). > > Signed-off-by: Michal Orzel The

[RFC PATCH 01/18] arm: cppcheck: misra rule 20.7 deviations for alternative.h

2022-12-20 Thread Luca Fancellu
into account the context of use of the macro arguments and adding parenthesis would break the code, so we can suppress the finding. No error was shown by eclair and coverity for those lines. Signed-off-by: Luca Fancellu --- docs/misra/false-positive-cppcheck.json | 14 ++ xen/arch/arm

[RFC PATCH 02/18] arm: cppcheck: misra rule 20.7 deviation on processor.h

2022-12-20 Thread Luca Fancellu
suppress the finding. Eclair and coverity does not report this finding. Signed-off-by: Luca Fancellu --- xen/arch/arm/include/asm/arm64/processor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/arm/include/asm/arm64/processor.h b/xen/arch/arm/include/asm/arm64

[RFC PATCH 03/18] arm: cppcheck: misra rule 20.7 deviation on asm_defns.h

2022-12-20 Thread Luca Fancellu
coverity does not report these findings. Signed-off-by: Luca Fancellu --- xen/arch/arm/include/asm/asm_defns.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/arch/arm/include/asm/asm_defns.h b/xen/arch/arm/include/asm/asm_defns.h index 29a9dbb002fa..9bf4cf8891f5 100644 --- a/xen/arch/arm

[RFC PATCH 04/18] arm: cppcheck: misra rule 20.7 deviation on config.h

2022-12-20 Thread Luca Fancellu
coverity does not report these findings. Signed-off-by: Luca Fancellu --- xen/arch/arm/include/asm/config.h | 4 1 file changed, 4 insertions(+) diff --git a/xen/arch/arm/include/asm/config.h b/xen/arch/arm/include/asm/config.h index 0fefed1b8aa9..c4843ddffe24 100644 --- a/xen/arch/arm

[RFC PATCH 05/18] arm: cppcheck: fix misra rule 20.7 on arm/include/asm/string.h

2022-12-20 Thread Luca Fancellu
thesis for the argument. Eclair and coverity does not report this finding. Signed-off-by: Luca Fancellu --- xen/arch/arm/include/asm/string.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/arm/include/asm/string.h b/xen/arch/arm/include/asm/string.h index b4

[RFC PATCH 00/18] cppcheck rule 20.7 fixes

2022-12-20 Thread Luca Fancellu
-- CROSS_COMPILE="aarch64-linux-gnu-" XEN_TARGET_ARCH="arm64" O=/path/to/artifacts_folder Luca Fancellu (18): arm: cppcheck: misra rule 20.7 deviations for alternative.h arm: cppcheck: misra rule 20.7 deviation on processor.h arm: cppcheck: misra rule 20.7 deviation on asm_def

[RFC PATCH 06/18] public: cppcheck: misra rule 20.7 on public/arch-arm.h

2022-12-20 Thread Luca Fancellu
can suppress the findings. For the set_xen_guest_handle_raw, the argument is not involved in any expression but it doesn't harm the code or readability to have parenthesis on it, so fix it. Eclair and coverity does not report these findings. Signed-off-by: Luca Fancellu --- xen/include/p

[RFC PATCH 08/18] xen: cppcheck: misra rule 20.7 deviation on init.h

2022-12-20 Thread Luca Fancellu
we can suppress the finding. For the other findings, the argument is not used as an expression, but adding parenthesis doesn't harm the code or the readability, hence add parenthesis on the argument. Eclair and coverity does not report these findings. Signed-off-by: Luca Fancellu --- xen/in

[RFC PATCH 07/18] xen: cppcheck: misra rule 20.7 deviation on compiler.h

2022-12-20 Thread Luca Fancellu
Cppcheck has found a violation of rule 20.7 for the macro sizeof_field, but the parenthesis cannot be applied on the second operand of a member access operator, hence we can suppress the finding. Eclair and coverity does not report this finding. Signed-off-by: Luca Fancellu --- xen/include/xen

[RFC PATCH 09/18] xen: cppcheck: misra rule 20.7 deviation on kconfig.h

2022-12-20 Thread Luca Fancellu
coverity does not report this finding. Signed-off-by: Luca Fancellu --- docs/misra/false-positive-cppcheck.json | 7 +++ xen/include/xen/kconfig.h | 1 + 2 files changed, 8 insertions(+) diff --git a/docs/misra/false-positive-cppcheck.json b/docs/misra/false-positive-cppcheck.json

[RFC PATCH 10/18] xen: cppcheck: misra rule 20.7 deviation on types.h

2022-12-20 Thread Luca Fancellu
Cppcheck has found a violation of rule 20.7 for the macro DECLARE_BITMAP, but the macro parameter is used as variable identifier, so it is safe to suppress the finding and don't put parenthesis. Eclair and coverity does not report this finding. Signed-off-by: Luca Fancellu --- xen/includ

[RFC PATCH 11/18] xen: cppcheck: misra rule 20.7 deviation on xmalloc.h

2022-12-20 Thread Luca Fancellu
these findings. Signed-off-by: Luca Fancellu --- xen/include/xen/xmalloc.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/xen/include/xen/xmalloc.h b/xen/include/xen/xmalloc.h index 16979a117c6a..5bf440502c20 100644 --- a/xen/include/xen/xmalloc.h +++ b/xen/include/xen/xmalloc.h

[RFC PATCH 12/18] arm: cppcheck: misra rule 20.7 deviation on asm/arm64/sysregs.h

2022-12-20 Thread Luca Fancellu
Cppcheck has found a violation of rule 20.7 for the macro WRITE_SYSREG64, the macro parameter "v" is never used in an expression, but adding parenthesis to it doesn't harm the code or the readability, so add parenthesis to it. Eclair and coverity does not report this finding. Sign

[RFC PATCH 13/18] public/x86: cppcheck: misra rule 20.7 deviation on hvm/save.h

2022-12-20 Thread Luca Fancellu
: Luca Fancellu --- xen/include/public/arch-x86/hvm/save.h | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/include/public/arch-x86/hvm/save.h b/xen/include/public/arch-x86/hvm/save.h index 7ecacadde165..08f221483dc8 100644 --- a/xen/include/public/arch-x86/hvm/save.h +++ b/xen/include

[RFC PATCH 14/18] public/x86: cppcheck: misra rule 20.7 deviation on xen-x86_32.h

2022-12-20 Thread Luca Fancellu
add parenthesis, so add them to the argument. For the other findings, the macro parameters are never used as an expression, cppcheck is not taking into account the context for their use, so we can suppress the finding. Eclair and coverity does not report these findings. Signed-off-by: Luca Fan

[RFC PATCH 17/18] public: misra rule 20.7 deviation on errno.h

2022-12-20 Thread Luca Fancellu
Cppcheck has found a violation of rule 20.7 for the macro XEN_ERRNO, while the macro parameter is never used as an expression, it doesn't harm the code or the readability to add parenthesis, so add them. This finding is reported also by eclair and coverity. Signed-off-by: Luca Fancellu ---

[RFC PATCH 18/18] public: misra rule 20.7 deviation on memory.h

2022-12-20 Thread Luca Fancellu
Cppcheck has found a violation of rule 20.7 for the macro XENMEM_SHARING_OP_FIELD_MAKE_GREF, the argument "val" is used in an expression, hence add parenthesis to the argument "val" to fix the violation. Signed-off-by: Luca Fancellu --- xen/include/public/memory.h | 2 +

[RFC PATCH 15/18] public/x86: cppcheck: misra rule 20.7 deviation on xen-x86_64.h

2022-12-20 Thread Luca Fancellu
Cppcheck has found violations of rule 20.7 for the macros __DECL_REG_LOHI, __DECL_REG_LO8 and __DECL_REG_LO16, but the macro parameters are used as variable identifiers, so it is safe to suppress the findings. Eclair and coverity does not report these findings. Signed-off-by: Luca Fancellu

[RFC PATCH 16/18] public/x86: cppcheck: misra rule 20.7 deviation on arch-x86/xen.h

2022-12-20 Thread Luca Fancellu
used in an expression, it doesn't harm the code or the readability, so add them. Eclair and coverity does not report these findings. Signed-off-by: Luca Fancellu --- xen/include/public/arch-x86/xen.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/include/public/arch-x

Re: [RFC PATCH 17/18] public: misra rule 20.7 deviation on errno.h

2022-12-21 Thread Luca Fancellu
> On 20 Dec 2022, at 09:51, Jan Beulich wrote: > > On 20.12.2022 09:50, Luca Fancellu wrote: >> Cppcheck has found a violation of rule 20.7 for the macro XEN_ERRNO, >> while the macro parameter is never used as an expression, it doesn't >> harm the code or th

Re: [RFC PATCH 00/18] cppcheck rule 20.7 fixes

2022-12-21 Thread Luca Fancellu
> On 20 Dec 2022, at 09:55, Jan Beulich wrote: > > On 20.12.2022 09:50, Luca Fancellu wrote: >> In this serie there are some fixes for the rule 20.7, mainly violation found >> by >> cppcheck, most of them are false positive but some of them can be fixed. >>

Re: [RFC PATCH 09/18] xen: cppcheck: misra rule 20.7 deviation on kconfig.h

2022-12-21 Thread Luca Fancellu
> On 20 Dec 2022, at 09:48, Jan Beulich wrote: > > On 20.12.2022 09:50, Luca Fancellu wrote: >> Cppcheck has found a violation of rule 20.7 for the macro >> __config_enabled but the preprocessor branch where this macro is >> defined should not be analysed by cppc

[PATCH 0/2] cppcheck rule 20.7 fixes

2022-12-21 Thread Luca Fancellu
In this serie there are some fixes for the rule 20.7. The analysed build is arm64, to reproduce the reports here the command: ./xen/scripts/xen-analysis.py --cppcheck-misra --run-cppcheck -- CROSS_COMPILE="aarch64-linux-gnu-" XEN_TARGET_ARCH="arm64" O=/path/to/artifacts_fo

[PATCH 1/2] public: misra rule 20.7 fix on errno.h

2022-12-21 Thread Luca Fancellu
Cppcheck has found a violation of rule 20.7 for the macro XEN_ERRNO, while the macro parameter is never used as an expression, it doesn't harm the code or the readability to add parenthesis, so add them. This finding is reported also by eclair and coverity. Signed-off-by: Luca Fancellu Ack

[PATCH 2/2] public: misra rule 20.7 fix on memory.h

2022-12-21 Thread Luca Fancellu
Cppcheck has found a violation of rule 20.7 for the macro XENMEM_SHARING_OP_FIELD_MAKE_GREF, the argument "val" is used in an expression, hence add parenthesis to the argument "val" to fix the violation. Signed-off-by: Luca Fancellu Acked-by: Jan Beulich --- xen/include

[PATCH 2/2] xen/cppcheck: add parameter to skip given MISRA rules

2023-01-06 Thread Luca Fancellu
separated. While there, fix some typos in the help and print functions. Modify settings.py and cppcheck_analysis.py to have a new parameter (--cppcheck-skip-rules) used to specify a list of MISRA rule to be skipped during the cppcheck analysis. Signed-off-by: Luca Fancellu --- xen/scripts

[PATCH 0/2] Cppcheck MISRA analysis improvements

2023-01-06 Thread Luca Fancellu
the specific rules. The serie includes also an improvement for the cppcheck report. Luca Fancellu (2): xen/cppcheck: sort alphabetically cppcheck report entries xen/cppcheck: add parameter to skip given MISRA rules xen/scripts/xen_analysis/cppcheck_analysis.py | 8 +++-- .../xen_analysis

[PATCH 1/2] xen/cppcheck: sort alphabetically cppcheck report entries

2023-01-06 Thread Luca Fancellu
Sort alphabetically cppcheck report entries when producing the text report, this will help comparing different reports and will group together findings from the same file. Signed-off-by: Luca Fancellu --- xen/scripts/xen_analysis/cppcheck_report_utils.py | 2 ++ 1 file changed, 2 insertions

Re: [PATCH 1/2] xen/cppcheck: sort alphabetically cppcheck report entries

2023-01-09 Thread Luca Fancellu
> On 9 Jan 2023, at 11:41, Jan Beulich wrote: > > On 09.01.2023 12:15, Michal Orzel wrote: >> On 06/01/2023 11:41, Luca Fancellu wrote: >>> Sort alphabetically cppcheck report entries when producing the text >>> report, this will help comparing different re

Re: [PATCH] xen: Remove the arch specific header init.h

2023-01-11 Thread Luca Fancellu
gt; an empty header. > > Suggested-by: Jan Beulich > Signed-off-by: Julien Grall > Hi Julien, The arm part looks good to me, I’ve also built x86, arm32 and arm64 and no problems found. Reviewed-by: Luca Fancellu

[RFC PATCH 1/8] xen/arm: enable SVE extension for Xen

2023-01-11 Thread Luca Fancellu
: Luca Fancellu --- xen/arch/arm/Kconfig | 3 +- xen/arch/arm/arm64/Makefile | 1 + xen/arch/arm/arm64/cpufeature.c | 7 ++-- xen/arch/arm/arm64/sve.c | 38 +++ xen/arch/arm/arm64/sve_asm.S | 48

[RFC PATCH 0/8] SVE feature for arm guests

2023-01-11 Thread Luca Fancellu
switch is the most critical part because there can be big registers to be saved, in this serie an easy approach is used and the context is saved/restored every time for the guests that are allowed to use SVE. Luca Fancellu (8): xen/arm: enable SVE extension for Xen xen/arm: add sve_vl_bits field

[RFC PATCH 5/8] arm/sve: save/restore SVE context switch

2023-01-11 Thread Luca Fancellu
. Remove headers from sve.c that are already included using xen/sched.h. Signed-off-by: Luca Fancellu --- xen/arch/arm/arm64/sve.c | 58 +- xen/arch/arm/arm64/sve_asm.S | 141 +++ xen/arch/arm/arm64/vfp.c | 79

[RFC PATCH 2/8] xen/arm: add sve_vl_bits field to domain

2023-01-11 Thread Luca Fancellu
-by: Luca Fancellu --- xen/arch/arm/arm64/sve.c | 9 ++ xen/arch/arm/domain.c| 45 xen/arch/arm/include/asm/arm64/sve.h | 12 xen/arch/arm/include/asm/domain.h| 6 xen/include/public/arch-arm.h| 2 ++ xen

[RFC PATCH 7/8] xen/tools: add sve parameter in XL configuration

2023-01-11 Thread Luca Fancellu
Add sve parameter in XL configuration to allow guests to use SVE feature. Signed-off-by: Luca Fancellu --- docs/man/xl.cfg.5.pod.in | 11 +++ tools/golang/xenlight/helpers.gen.go | 2 ++ tools/golang/xenlight/types.gen.go | 1 + tools/include/libxl.h| 5

[RFC PATCH 4/8] xen/arm: add SVE exception class handling

2023-01-11 Thread Luca Fancellu
SVE has a new exception class with code 0x19, introduce the new code and handle the exception. Signed-off-by: Luca Fancellu --- xen/arch/arm/include/asm/processor.h | 1 + xen/arch/arm/traps.c | 12 2 files changed, 13 insertions(+) diff --git a/xen/arch/arm

[RFC PATCH 8/8] xen/arm: add sve property for dom0less domUs

2023-01-11 Thread Luca Fancellu
Add a device tree property in the dom0less domU configuration to enable the guest to use SVE. Update documentation. Signed-off-by: Luca Fancellu --- docs/misc/arm/device-tree/booting.txt | 7 +++ xen/arch/arm/domain_build.c | 7 +++ 2 files changed, 14 insertions(+) diff

[RFC PATCH 3/8] xen/arm: Expose SVE feature to the guest

2023-01-11 Thread Luca Fancellu
When a guest is allowed to use SVE, expose the SVE features through the identification registers. Signed-off-by: Luca Fancellu --- xen/arch/arm/arm64/vsysreg.c | 39 ++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/arm64/vsysreg.c

[RFC PATCH 6/8] xen/arm: enable Dom0 to use SVE feature

2023-01-11 Thread Luca Fancellu
Add a command line parameter to allow Dom0 the use of SVE resources, the command line parameter dom0_sve controls the feature on this domain and sets the maximum SVE vector length for Dom0. Signed-off-by: Luca Fancellu --- docs/misc/xen-command-line.pandoc| 12 xen/arch/arm

Re: [RFC PATCH 1/8] xen/arm: enable SVE extension for Xen

2023-01-12 Thread Luca Fancellu
> On 11 Jan 2023, at 17:16, Julien Grall wrote: > > Hi Luca, > > As this is an RFC, I will be mostly making general comments. Hi Julien, Thank you. > > On 11/01/2023 14:38, Luca Fancellu wrote: >> diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/dom

Re: [RFC PATCH 2/8] xen/arm: add sve_vl_bits field to domain

2023-01-12 Thread Luca Fancellu
> On 11 Jan 2023, at 17:27, Julien Grall wrote: > > Hi Luca, > > On 11/01/2023 14:38, Luca Fancellu wrote: >> Add sve_vl_bits field to arch_domain and xen_arch_domainconfig >> structure, to allow the domain to have an information about the >> SVE feature an

<    1   2   3   4   5   6   7   8   9   10   >