[PATCH v4 5/7] xen/arm: Rework heap page allocation outside allocate_bank_memory

2024-05-24 Thread Luca Fancellu
signature of allocate_bank_memory and remove the 'struct domain' parameter, which can be retrieved from 'struct kernel_info'. No functional changes is intended. Signed-off-by: Luca Fancellu Reviewed-by: Michal Orzel --- v3 changes: - Add R-by Michal v2: - Reduce

[PATCH v4 7/7] xen/docs: Describe static shared memory when host address is not provided

2024-05-24 Thread Luca Fancellu
From: Penny Zheng This commit describe the new scenario where host address is not provided in "xen,shared-mem" property and a new example is added to the page to explain in details. Take the occasion to fix some typos in the page. Signed-off-by: Penny Zheng Signed-off-by: Luc

[PATCH v4 4/7] xen/arm: Parse xen,shared-mem when host phys address is not provided

2024-05-24 Thread Luca Fancellu
hat starts with INVALID_PADDR from any computation. The changes above holds because of this consideration. Signed-off-by: Luca Fancellu Reviewed-by: Michal Orzel --- v4 changes: - Fix wrong condition for paddr_assigned (Michal) v3 changes: - fix typo in commit msg, add R-by Michal v2 changes: - fi

[PATCH v4 1/7] xen/arm: Lookup bootinfo shm bank during the mapping

2024-05-24 Thread Luca Fancellu
hen the bank doesn't need to be allocated, however it will be convenient later to use it as an argument for assign_shared_memory when dealing with the use case where the Host physical address is not supplied by the user. Signed-off-by: Luca Fancellu Reviewed-by: Michal Orzel --- v3 changes: -

[PATCH v4 0/7] Static shared memory followup v2 - pt2

2024-05-24 Thread Luca Fancellu
the static shared memory allocation from the Xen heap. Luca Fancellu (5): xen/arm: Lookup bootinfo shm bank during the mapping xen/arm: Wrap shared memory mapping code in one function xen/arm: Parse xen,shared-mem when host phys address is not provided xen/arm: Rework heap page allocation

[PATCH v4 2/7] xen/arm: Wrap shared memory mapping code in one function

2024-05-24 Thread Luca Fancellu
Wrap the code and logic that is calling assign_shared_memory and map_regions_p2mt into a new function 'handle_shared_mem_bank', it will become useful later when the code will allow the user to don't pass the host physical address. Signed-off-by: Luca Fancellu Reviewed-by: Micha

[PATCH v4 6/7] xen/arm: Implement the logic for static shared memory from Xen heap

2024-05-24 Thread Luca Fancellu
sign_pages is called for every bank. When the bank is already allocated, for every bank allocated with the corresponding shm_id, handle_shared_mem_bank is called and the mapping are done. Signed-off-by: Luca Fancellu Reviewed-by: Michal Orzel --- v4 changes: - Add R-by Michal v3 changes: -

Re: [PATCH v4 3/7] xen/p2m: put reference for level 2 superpage

2024-05-28 Thread Luca Fancellu
Hi Julien, > On 24 May 2024, at 13:56, Julien Grall wrote: > > Hi Luca, > > On 24/05/2024 13:40, Luca Fancellu wrote: >> From: Penny Zheng >> We are doing foreign memory mapping for static shared memory, and >> there is a great possibility that it co

[PATCH v4.2] xen/p2m: put reference for level 2 superpage

2024-05-28 Thread Luca Fancellu
such superpages, for which at some point Xen might end up freeing memory and therefore for such a big mapping it could end up in a very long operation. Signed-off-by: Penny Zheng Signed-off-by: Luca Fancellu --- v4.2 changes: - rework commit message to don't explicit say the size of the ma

Re: [PATCH v4 0/7] Static shared memory followup v2 - pt2

2024-06-11 Thread Luca Fancellu
+ Oleksii > On 24 May 2024, at 13:40, Luca Fancellu wrote: > > This serie is a partial rework of this other serie: > https://patchwork.kernel.org/project/xen-devel/cover/20231206090623.1932275-1-penny.zh...@arm.com/ > > The original serie is addressing an issue of the st

Re: [PATCH v4 0/7] Static shared memory followup v2 - pt2

2024-06-14 Thread Luca Fancellu
Hi Julien, > On 13 Jun 2024, at 12:31, Julien Grall wrote: > > Hi, > > On 11/06/2024 13:42, Michal Orzel wrote: >>> We would like this serie to be in Xen 4.19, there was a misunderstanding on >>> our side because we thought >>> that since the serie was sent before the last posting date, it cou

Re: [PATCH] docs/misra: add Rule 9.3

2023-07-12 Thread Luca Fancellu
> On 11 Jul 2023, at 21:21, Stefano Stabellini wrote: > > From: Stefano Stabellini > > Specify that {} is allowed for zero-initialization. > > Signed-off-by: Stefano Stabellini Reviewed-by: Luca Fancellu > --- > docs/misra/rules.rst | 5 + > 1 file chan

Re: [PATCH] docs/misra: add Rule 9.3

2023-07-12 Thread Luca Fancellu
> On 12 Jul 2023, at 10:22, Jan Beulich wrote: > > On 12.07.2023 10:21, Luca Fancellu wrote: >>> On 11 Jul 2023, at 21:21, Stefano Stabellini wrote: >>> >>> From: Stefano Stabellini >>> >>> Specify that {} is allowed for zero-init

[PATCH] docs: Fix style in misc/arm/silicon-errata.txt table

2023-07-12 Thread Luca Fancellu
Fix the right border of the silicon-errata.txt table Fixes: 1814a626fb58 ("xen/arm: Update silicon-errata.txt with the Neovers AT erratum") Signed-off-by: Luca Fancellu --- docs/misc/arm/silicon-errata.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc

Re: [PATCH] docs: Fix style in misc/arm/silicon-errata.txt table

2023-07-12 Thread Luca Fancellu
> On 12 Jul 2023, at 14:04, Michal Orzel wrote: > > Hi Luca, > > On 12/07/2023 14:04, Luca Fancellu wrote: >> >> >> Fix the right border of the silicon-errata.txt table >> >> Fixes: 1814a626fb58 ("xen/arm: Update silicon-errata.txt with th

Re: [XEN PATCH] xen: fix violations of MISRA C:2012 Rule 3.1

2023-07-12 Thread Luca Fancellu
> --- a/xen/include/xen/atomic.h > +++ b/xen/include/xen/atomic.h > @@ -78,7 +78,7 @@ static inline void _atomic_set(atomic_t *v, int i); > * int old = atomic_read(&v); > * int new = old + 1; > * if ( likely(old == atomic_cmpxchg(&v, old, new)) ) > - * break; // success! > + * break; > * } > */ > static inline int atomic_cmpxchg(atomic_t *v, int old, int new); > -- > 2.34.1 > > Anyway apart from that, the patch looks ok to me. Reviewed-by: Luca Fancellu

Re: [XEN PATCH] xen: fix violations of MISRA C:2012 Rule 3.1

2023-07-12 Thread Luca Fancellu
> On 12 Jul 2023, at 17:17, Nicola Vetrini wrote: > > > > On 12/07/23 18:02, Luca Fancellu wrote: >>> On 12 Jul 2023, at 16:54, Nicola Vetrini wrote: >>> >>> In the file 'xen/common/xmalloc_tlsf.c' is not clear how >>> the c

Re: [RFC PATCH 2/4] xen/arm64: bitops: justify uninitialized variable inside a macro

2023-07-14 Thread Luca Fancellu
> On 14 Jul 2023, at 12:49, Nicola Vetrini wrote: > > The macro 'testop' expands to a function that declares the local > variable 'oldbit', which is written before being set, but is such a > way that is not amenable to automatic checking. > > Therefore, a deviation comment, is introduced to do

Re: [RFC PATCH 2/4] xen/arm64: bitops: justify uninitialized variable inside a macro

2023-07-14 Thread Luca Fancellu
> On 14 Jul 2023, at 15:20, Luca Fancellu wrote: > > > >> On 14 Jul 2023, at 12:49, Nicola Vetrini wrote: >> >> The macro 'testop' expands to a function that declares the local >> variable 'oldbit', which is written before being set

Re: [RFC PATCH 2/4] xen/arm64: bitops: justify uninitialized variable inside a macro

2023-07-14 Thread Luca Fancellu
>>> "id": "SAF-2-safe", >>> +"analyser": { >>> +"eclair": "MC3R1.R9.1" >>> +}, >>> +"name": "Rule 9.1: initializer not needed", >>> +"text": "The following local variables are possibly subject to >>> being read before being

Re: [RFC PATCH 2/4] xen/arm64: bitops: justify uninitialized variable inside a macro

2023-07-16 Thread Luca Fancellu
> On 14 Jul 2023, at 14:05, Julien Grall wrote: > > Hi, > > On 14/07/2023 12:49, Nicola Vetrini wrote: >> The macro 'testop' expands to a function that declares the local >> variable 'oldbit', which is written before being set, but is such a >> way that is not amenable to automatic checking. >

Experiments with clang-format and exclude-list.json

2023-07-18 Thread Luca Fancellu
Hi all, I’ve done some experiment with clang-format and the hypervisor code (xen/xen/**), I had the need to exclude some files from the tool and I thought to use the exclude-list.json, but since it was intended for MISRA, I’m now asking your feedback about that. In my opinion it could make sens

[PATCH 2/2] xen/misra: diff-report.py: fix function invocation

2023-07-18 Thread Luca Fancellu
Fix the invocation of invoke_command() that takes an optional parameter for the exception type, but in the code the error message template was passed instead, so fix it passing a new exception type. Fixes: 1d7c45f895b6 ("xen/misra: diff-report.py: add report patching feature") Signed-of

[PATCH 1/2] xen/misra: diff-report.py: Fix UnifiedFormatParser change line registration

2023-07-18 Thread Luca Fancellu
ffected by the bug. Fixes: 1d7c45f895b6 ("xen/misra: diff-report.py: add report patching feature") Signed-off-by: Luca Fancellu --- .../xen_analysis/diff_tool/unified_format_parser.py| 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xen/scripts/xen_analysis

[PATCH 0/2] diff-report bugfix

2023-07-18 Thread Luca Fancellu
This serie has some bugfix for some issues found on the diff-report.py tool during usage of its module or by luck by code inspection. Luca Fancellu (2): xen/misra: diff-report.py: Fix UnifiedFormatParser change line registration xen/misra: diff-report.py: fix function invocation xen

[OSSTEST] ts-kernel-build: add kernel kconfig for the Arndale

2023-07-21 Thread Luca Fancellu
tible when CONFIG_AHCI_DWC is selected. The module is needed for the Arndale board to have the SATA controller working, so enable the CONFIG_AHCI_DWC as additional kconfig parameter in ts-kernel-build. Signed-off-by: Luca Fancellu --- Tested successfully on: - arndale-lakeside - arndale-m

Re: [OSSTEST] ts-kernel-build: add kernel kconfig for the Arndale

2023-07-21 Thread Luca Fancellu
> On 21 Jul 2023, at 14:24, Jan Beulich wrote: > > On 21.07.2023 14:16, Luca Fancellu wrote: >> The Linux commit 33629d35090f5ce2b1b4ce78aa39954c603536d5 has >> removed the 'snps,dwc-ahci' compatible from the generic >> AHCI-platf

Re: [OSSTEST] ts-kernel-build: add kernel kconfig for the Arndale

2023-07-24 Thread Luca Fancellu
> On 24 Jul 2023, at 11:28, Anthony PERARD wrote: > > On Fri, Jul 21, 2023 at 04:45:44PM +0000, Luca Fancellu wrote: >>> On 21 Jul 2023, at 14:24, Jan Beulich wrote: >>> On 21.07.2023 14:16, Luca Fancellu wrote: >>>> --- a/ts-kernel-build >>&

Re: [PATCH v2] xen/arm32: head: Widen the use of the temporary mapping

2023-07-24 Thread Luca Fancellu
e to simplify the logic to identity map > Xen. > > Signed-off-by: Julien Grall Hi Julien, Seems good to me, I’ve also tested on qemu and FVP, creating/destroying guests and no issues so far. Reviewed-by: Luca Fancellu Tested-by: Luca Fancellu

Re: [XEN PATCH] xen: change parameter name in monitor_domctl() declaration

2023-07-27 Thread Luca Fancellu
n shall use the same names and type qualifiers". > > No functional changes. > > Signed-off-by: Federico Serafini Reviewed-by: Luca Fancellu

[RFC PATCH 0/5] clang-format for Xen

2023-07-28 Thread Luca Fancellu
there are outstanding blockers on the adoption of the tool and we can't reach an agreement, I won't spend further time on it. I understand that the release is coming soon and some people are on holiday in this period, so worst case I will ping again after the release. Luca Fancellu (5): [

[RFC PATCH 3/5] [WIP]xen/scripts: add codestyle.py script

2023-07-28 Thread Luca Fancellu
This script finds every .c and .h file in the xen hypervisor codebase, takes the exclusion list from docs/misra, removes the file excluded from the list and for the remaining files is calling clang-format on them. TBD: write it better Signed-off-by: Luca Fancellu --- xen/scripts/codestyle.py

[RFC PATCH 2/5] [WIP]cppcheck: rework exclusion_file_list.py code

2023-07-28 Thread Luca Fancellu
cppcheck_exclusion_file_list(). No functional changes are intended. TBD: Read the field in each entry and act accordingly. Signed-off-by: Luca Fancellu --- xen/scripts/xen_analysis/cppcheck_analysis.py | 6 ++-- .../xen_analysis/exclusion_file_list.py | 31 ++- 2 files changed, 19 insertions

[RFC PATCH 1/5] [WIP]misra: add entries to the excluded list

2023-07-28 Thread Luca Fancellu
Add entries to the exclusion list, so that they can be excluded from the formatter tool. TBD: add a field on each entry to understand for what tool is the exclusion Signed-off-by: Luca Fancellu --- docs/misra/exclude-list.json | 88 1 file changed, 88

[RFC PATCH 5/5] xen: Add clang-format configuration

2023-07-28 Thread Luca Fancellu
Add a clang format configuration for the Xen Hypervisor. Signed-off-by: Luca Fancellu --- xen/.clang-format | 693 ++ 1 file changed, 693 insertions(+) create mode 100644 xen/.clang-format diff --git a/xen/.clang-format b/xen/.clang-format new file

[RFC PATCH 4/5] x86/HVM: protect mm_type_tbl format from clang-format

2023-07-28 Thread Luca Fancellu
The array mm_type_tbl initialization is formatted in a way that clang-format can't keep, so disable clang-format on that array initialization. Signed-off-by: Luca Fancellu --- xen/arch/x86/hvm/mtrr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arc

Re: [RFC PATCH 0/5] clang-format for Xen

2023-07-28 Thread Luca Fancellu
> On 28 Jul 2023, at 11:12, Jan Beulich wrote: > > On 28.07.2023 10:11, Luca Fancellu wrote: >> I've read the past threads about the brave people who dared to try to >> introduce >> clang-format for the xen codebase, some of them from 5 years ago, two poi

Re: [RFC PATCH 0/5] clang-format for Xen

2023-07-29 Thread Luca Fancellu
> On 29 Jul 2023, at 01:30, Stefano Stabellini wrote: > > On Fri, 28 Jul 2023, Luca Fancellu wrote: >> ## Introduction >> >> >> In this serie, I would like to get feedbacks on the output gen

Re: [RFC PATCH 1/5] [WIP]misra: add entries to the excluded list

2023-07-31 Thread Luca Fancellu
Hi Jan, >> +{ >> +"rel_path": "arch/x86/include/asm/bug.h", >> +"comment": "Includes mostly assembly macro" >> +}, > > Mind me asking why assembly macros wouldn't want maintaining in proper > style? From what I know (experts on CF correct me if I am wrong)

Re: [RFC PATCH 1/5] [WIP]misra: add entries to the excluded list

2023-07-31 Thread Luca Fancellu
> On 31 Jul 2023, at 16:20, Jan Beulich wrote: > > On 31.07.2023 17:11, Luca Fancellu wrote: >>>> +{ >>>> +"rel_path": "arch/x86/include/asm/bug.h", >>>> +"comment": "Includes mos

[RFC PATCH] arm/gicv2: make GICv2 driver and vGICv2 optional

2023-08-02 Thread Luca Fancellu
and can be deselected if the user doesn't want to offer the vGICv2 interface to guests or maybe its GICv3 hardware can't offer the GICv2 compatible mode. Signed-off-by: Luca Fancellu --- xen/arch/arm/Kconfig| 13 + xen/arch/arm/Makefile | 4 ++-- xe

Re: [RFC PATCH] arm/gicv2: make GICv2 driver and vGICv2 optional

2023-08-02 Thread Luca Fancellu
> On 2 Aug 2023, at 15:26, Michal Orzel wrote: > > Hi Luca, > > On 02/08/2023 15:53, Luca Fancellu wrote: >> >> >> Introduce Kconfig GICV2 to be able to compile the GICv2 driver only >> when needed, the option is active by default. >> >>

Re: [RFC PATCH] arm/gicv2: make GICv2 driver and vGICv2 optional

2023-08-02 Thread Luca Fancellu
> On 2 Aug 2023, at 15:48, Michal Orzel wrote: > > Hi, > > On 02/08/2023 16:42, Luca Fancellu wrote: >> >> >>> On 2 Aug 2023, at 15:26, Michal Orzel wrote: >>> >>> Hi Luca, >>> >>> On 02/08/2023 15:53, Luca Fancel

Re: [RFC PATCH] arm/gicv2: make GICv2 driver and vGICv2 optional

2023-08-02 Thread Luca Fancellu
> On 2 Aug 2023, at 18:39, Julien Grall wrote: > > Hi Luca, > > On 02/08/2023 16:05, Luca Fancellu wrote: >>> On 2 Aug 2023, at 15:48, Michal Orzel wrote: >>> >>> Hi, >>> >>> On 02/08/2023 16:42, Luca Fancellu wrote: &g

Re: [RFC PATCH] arm/gicv2: make GICv2 driver and vGICv2 optional

2023-08-02 Thread Luca Fancellu
> On 2 Aug 2023, at 19:39, Julien Grall wrote: > > Hi, > > On 02/08/2023 18:54, Luca Fancellu wrote: >>> On 2 Aug 2023, at 18:39, Julien Grall wrote: >>> >>> Hi Luca, >>> >>> On 02/08/2023 16:05, Luca Fancellu wrote: >>

Re: [RFC PATCH] arm/gicv2: make GICv2 driver and vGICv2 optional

2023-08-03 Thread Luca Fancellu
>> >> - UART enabled - >> - Boot CPU booting - >> - Current EL 0008 - >> - Initialize CPU - >> - Turning on paging - >> - Zero BSS - >> - Ready - >> (XEN) Checking for initrd in /chosen >> (XEN) RAM: 8000 - feff >> (X

Re: [RFC PATCH] arm/gicv2: make GICv2 driver and vGICv2 optional

2023-08-03 Thread Luca Fancellu
> On 3 Aug 2023, at 09:29, Julien Grall wrote: > > > > On 03/08/2023 09:04, Luca Fancellu wrote: >>>> There are so many things that can go wrong during early boot including the >>>> entire boofdt parsing >>>> and having earlycon would be

Re: [XEN PATCH v2] xen/string: add missing parameter names

2023-08-03 Thread Luca Fancellu
st void *cs, const void *ct, size_t count); > +void *memchr(const void *s, int c, size_t n); > +void *memchr_inv(const void *s, int c, size_t n); @Stefano: would it make sense to remove it as part of this patch or maybe not? Apart from that, the patch looks good to me: Reviewed-by: Luca Fancellu

Re: [XEN PATCH v2] xen/string: add missing parameter names

2023-08-03 Thread Luca Fancellu
> On 3 Aug 2023, at 12:46, Julien Grall wrote: > > Hi Luca, > > On 03/08/2023 11:28, Luca Fancellu wrote: >>> On 3 Aug 2023, at 09:26, Federico Serafini >>> wrote: >>> >>> Add missing parameter names to address violation of MISRA C:2012

Re: [RFC PATCH] arm/gicv2: make GICv2 driver and vGICv2 optional

2023-08-03 Thread Luca Fancellu
Hi Julien, >> + >> config GICV3 >> bool "GICv3 driver" >> depends on !NEW_VGIC >> @@ -92,6 +100,11 @@ config HAS_ITS >> bool "GICv3 ITS MSI controller support (UNSUPPORTED)" if UNSUPPORTED >> depends on GICV3 && !NEW_VGIC && !ARM_32 >> +config VGICV2 >> + bool "vGICv2 inter

Re: [RFC PATCH] arm/gicv2: make GICv2 driver and vGICv2 optional

2023-08-03 Thread Luca Fancellu
> On 3 Aug 2023, at 14:03, Luca Fancellu wrote: > > Hi Julien, > >>> + >>> config GICV3 >>> bool "GICv3 driver" >>> depends on !NEW_VGIC >>> @@ -92,6 +100,11 @@ config HAS_ITS >>> bool "GICv3 ITS

Re: [XEN PATCH 03/13] xen/arm: address violations of MISRA C:2012 Rule 7.3

2023-08-03 Thread Luca Fancellu
se the "L" suffix instead of the "l" suffix, to avoid potential ambiguity. > If the "u" suffix is used near "L", use the "U" suffix instead, for > consistency. > > The changes in this patch are mechanical. > > Signed-off-by: Gianluca Luparini > Signed-off-by: Simone Ballarin > --- Reviewed-by: Luca Fancellu

[PATCH] arm/gicv2: make GICv2 driver and vGICv2 optional

2023-08-03 Thread Luca Fancellu
optional and can be deselected if the user doesn't want to offer the v2 emulation to domains or maybe its GICv3 hardware can't offer the GICv2 compatible mode. Signed-off-by: Luca Fancellu --- Changes from RFC: - removed dependency on (GICV2 || GICV3) && !NEW_VGIC from VGICV2 s

Re: [PATCH v2 2/2] fdt: make fdt handling reusable across arch

2023-08-03 Thread Luca Fancellu
Hi Daniel, [...] > diff --git a/xen/common/fdt.c b/xen/common/fdt.c > new file mode 100644 > index 00..8d7acaaa43 > --- /dev/null > +++ b/xen/common/fdt.c > @@ -0,0 +1,153 @@ > +/* > + * Flattened Device Tree > + * > + * Copyright (C) 2012-2014 Citrix Systems, Inc. > + * > + * This program

Re: [PATCH v2 2/2] fdt: make fdt handling reusable across arch

2023-08-03 Thread Luca Fancellu
> >> Regarding the coding style, I think it’s better to keep the style you’ve >> found in the original file, >> and change only some bits when the code is not following it. >> I know there is nothing enforcing parameters on the same line of the >> function definition at the >> moment, but it is

[PATCH 2/5] xen/arm: Add asm/domain.h include to kernel.h

2023-08-08 Thread Luca Fancellu
Add asm/domain.h that is defining the type 'enum domain_type', it is needed on arm64 build where this type is used for a member of the structure kernel_info. Fixes: 66e994a5e74f ("xen: arm64: add guest type to domain field.") Signed-off-by: Luca Fancellu --- xen/arch/arm/

[PATCH 0/5] Fine granular configuration

2023-08-08 Thread Luca Fancellu
This serie aims to add more modularity to some feature that can be excluded without issues from the build. The first patch is already reviewed. Luca Fancellu (5): arm/gicv2: make GICv2 driver and vGICv2 optional xen/arm: Add asm/domain.h include to kernel.h arm/dom0less: put dom0less

[PATCH 5/5] arm/dom0less: introduce Kconfig for dom0less feature

2023-08-08 Thread Luca Fancellu
code when the Kconfig is not enabled. Signed-off-by: Luca Fancellu --- xen/arch/arm/Kconfig | 9 + xen/arch/arm/Makefile | 2 +- xen/arch/arm/efi/efi-boot.h | 4 xen/arch/arm/include/asm/dom0less-build.h | 12 4

[PATCH 1/5] arm/gicv2: make GICv2 driver and vGICv2 optional

2023-08-08 Thread Luca Fancellu
optional and can be deselected if the user doesn't want to offer the v2 emulation to domains or maybe its GICv3 hardware can't offer the GICv2 compatible mode. Signed-off-by: Luca Fancellu Reviewed-by: Julien Grall Reviewed-by: Michal Orzel --- xen/arch/arm/Kconfig

[PATCH 4/5] xen/arm: Move static memory build code in separate modules

2023-08-08 Thread Luca Fancellu
, it will call the process_shm function for the '/chosen' node, and will be used by the funciton construct_dom0 instead of using directly process_shm, allowing some #ifdef to be removed. No functional changes are intended. Signed-off-by: Luca Fancellu --- xen/arch/ar

Re: [PATCH] automation: Fix missing smoke.serial in artifacts of qemu arm32 jobs

2023-08-08 Thread Luca Fancellu
ctory but the qemu-smoke-dom0{less}-arm32.sh scripts create > this file under binaries/. Fix it so that smoke.serial gets created in > project directory just like for every other test job. > > Signed-off-by: Michal Orzel Reviewed-by: Luca Fancellu

Re: [PATCH] xen/arm64: head: Introduce a helper to flush local TLBs

2023-08-08 Thread Luca Fancellu
2 by the commit: > dea9dddeceec8a1d68da24b14d5b2396effe555f > > This is also making the flush sequence in enable_mmu more clear and > consistent. > > Signed-off-by: Michal Orzel > --- Hi Michal, Looks good to me Reviewed-by: Luca Fancellu

Re: [PATCH] mem-sharing: move (x86) / drop (Arm) arch_dump_shared_mem_info()

2023-08-08 Thread Luca Fancellu
ING. > > --- a/xen/arch/arm/mm.c > +++ b/xen/arch/arm/mm.c > @@ -1297,10 +1297,6 @@ void free_init_memory(void) > printk("Freed %ldkB init memory.\n", (long)(__init_end-__init_begin)>>10); > } > > -void arch_dump_shared_mem_info(void) > -{ > -} > - Hi Jan, For the arm part: Reviewed-by: Luca Fancellu #arm

Re: [XEN PATCH 4/8] xen/arm: address MISRA C:2012 Rule 8.4

2023-08-09 Thread Luca Fancellu
> On 9 Aug 2023, at 13:42, Jan Beulich wrote: > > On 09.08.2023 13:02, Nicola Vetrini wrote: >> 'xen/hypercall.h' is included in 'xen/arch/arm/setup.c' to allow >> the declaration of 'arch_get_xen_caps' to be visible when >> defining the function. >> >> The header 'xen/delay.h' is included in

Re: [XEN PATCH 2/8] xen/memory: address MISRA C:2012 Rule 8.4

2023-08-09 Thread Luca Fancellu
nge. > > Signed-off-by: Nicola Vetrini Makes sense, Reviewed-by: Luca Fancellu Maybe it’s also better adding this: Fixes: 9244528955de ("xen/memory: Fix acquire_resource size semantics”) If the maintainers agree

Re: [XEN PATCH 6/8] xen/arm: mm: address MISRA C:2012 Rule 8.4

2023-08-09 Thread Luca Fancellu
> On 9 Aug 2023, at 12:02, Nicola Vetrini wrote: > > Add a declaration for the variable 'init_ttbr' to resolve > the violation of Rule 8.4 present in the associated source file 'mm.c'. > > No functional changes. > > Signed-off-by: Nicola Vetri

Re: [XEN PATCH 1/8] arm/efi: address MISRA C:2012 Rule 8.4

2023-08-09 Thread Luca Fancellu
nge. > > Signed-off-by: Nicola Vetrini Reviewed-by: Luca Fancellu With Fixes: 6d70ea10d49f ("Add ARM EFI boot support”)

Re: [XEN PATCH 3/8] xen: address MISRA C:2012 Rule 8.4

2023-08-09 Thread Luca Fancellu
> On 9 Aug 2023, at 12:02, Nicola Vetrini wrote: > > The variable 'saved_cmdline' can be defined static, > as its only uses are within the same file. This in turn avoids > violating Rule 8.4 because no declaration is present. > > Signed-off-by: Nicola Vetrini > --- > xen/common/kernel.c | 2

Re: [XEN PATCH 2/2] xen/delay: address MISRA C:2012 Rule 5.3.

2023-08-09 Thread Luca Fancellu
> On 9 Aug 2023, at 08:55, Nicola Vetrini wrote: > > The variable 'msec' declared in the macro shadows the local > variable in 'ehci_dbgp_bios_handoff', but to prevent any > future clashes with other functions the macro is converted to > a static inline function. > > No functional change. >

Re: [XEN PATCH 3/8] xen: address MISRA C:2012 Rule 8.4

2023-08-09 Thread Luca Fancellu
> On 9 Aug 2023, at 15:06, Jan Beulich wrote: > > On 09.08.2023 15:50, Luca Fancellu wrote: >>> On 9 Aug 2023, at 12:02, Nicola Vetrini wrote: >>> >>> The variable 'saved_cmdline' can be defined static, >>> as its only uses are withi

Re: [RFC PATCH 3/5] [WIP]xen/scripts: add codestyle.py script

2023-08-09 Thread Luca Fancellu
> On 9 Aug 2023, at 16:41, Jan Beulich wrote: > > On 28.07.2023 10:11, Luca Fancellu wrote: >> This script finds every .c and .h file in the xen hypervisor >> codebase, takes the exclusion list from docs/misra, removes the >> file excluded from the list and

Re: [RFC PATCH 5/5] xen: Add clang-format configuration

2023-08-09 Thread Luca Fancellu
> On 9 Aug 2023, at 16:48, Jan Beulich wrote: > > On 28.07.2023 10:11, Luca Fancellu wrote: >> --- /dev/null >> +++ b/xen/.clang-format >> @@ -0,0 +1,693 @@ >> +# SPDX-License-Identifier: GPL-2.0-only >> +# >> +# clang-format configuration file. Int

Re: [RFC PATCH 5/5] xen: Add clang-format configuration

2023-08-10 Thread Luca Fancellu
> On 10 Aug 2023, at 09:08, Jan Beulich wrote: > > On 09.08.2023 18:18, Luca Fancellu wrote: >>> On 9 Aug 2023, at 16:48, Jan Beulich wrote: >>> On 28.07.2023 10:11, Luca Fancellu wrote: >>>> --- /dev/null >>>> +++ b/xen/.clang-format >

Re: Moving Dom0less to common, Was: [PATCH 0/5] Fine granular configuration

2023-08-10 Thread Luca Fancellu
> On 10 Aug 2023, at 10:07, Jan Beulich wrote: > > On 09.08.2023 21:51, Stefano Stabellini wrote: >> Would the x86 maintainers be OK with it too? Of course further changes >> will be needed to make it useable on x86, but looking at the series from >> Christopher, the two sets of internal inter

Re: [PATCH 1/2] xen/arm: Fix initrd placeholders generation in make_chosen_node()

2023-08-10 Thread Luca Fancellu
> > Fixes: 48f4bf6bdeb4 ("arm/acpi: Create min DT stub for Dom0") > Signed-off-by: Michal Orzel Hi Michal, good catch! Reviewed-by: Luca Fancellu Cheers, Luca

Re: [PATCH 2/2] xen/arm: Skip inclusion of domU nodes into hwdom dt /chosen node

2023-08-10 Thread Luca Fancellu
y them (except for modules that we skip) into hardware domain /chosen > node. Fix it by adding "xen,domain" compatible into the list of nodes to > skip in handle_node(). > > Signed-off-by: Michal Orzel Reviewed-by: Luca Fancellu

Re: [PATCH 2/5] xen/arm: Add asm/domain.h include to kernel.h

2023-08-11 Thread Luca Fancellu
> On 11 Aug 2023, at 13:56, Julien Grall wrote: > > Hi Luca, > > On 08/08/2023 09:00, Luca Fancellu wrote: >> Add asm/domain.h that is defining the type 'enum domain_type', it >> is needed on arm64 build where this type is used for a member of >> the

Re: [PATCH 2/5] xen/arm: Add asm/domain.h include to kernel.h

2023-08-11 Thread Luca Fancellu
> On 11 Aug 2023, at 15:13, Julien Grall wrote: > > Hi Luca, > > On 11/08/2023 14:40, Luca Fancellu wrote: >>> On 11 Aug 2023, at 13:56, Julien Grall wrote: >>> >>> Hi Luca, >>> >>> On 08/08/2023 09:00, Luca Fancellu wrote: >&

Re: [PATCH 4/5] xen/arm: Move static memory build code in separate modules

2023-08-11 Thread Luca Fancellu
Hi Julien, > On 11 Aug 2023, at 19:14, Julien Grall wrote: > > Hi Luca, > > On IRC, you suggest to skip the review for the patches moving out some code. > However, I still have one remark. > > On 08/08/2023 09:00, Luca Fancellu wrote: >> Move static memory an

Re: [PATCH v3 0/3] diff-report.py tool

2023-06-05 Thread Luca Fancellu
> On 25 May 2023, at 09:33, Luca Fancellu wrote: > > > This serie is dependent on this patch, in case cppcheck report are generated > using xen-analysis.py that calls the makefile with in-tree

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

2023-06-06 Thread Luca Fancellu
> On 1 Jun 2023, at 11:17, Bertrand Marquis wrote: > > Hi Luca, > >> On 31 May 2023, at 09:24, 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 >

Re: [PATCH v8 09/12] tools: add physinfo arch_capabilities handling for Arm

2023-06-06 Thread Luca Fancellu
> On 31 May 2023, at 08:24, Luca Fancellu wrote: > > On Arm, the SVE vector length is encoded in arch_capabilities field > of struct xen_sysctl_physinfo, make use of this field in the tools > when building for arm. > > Create header arm-arch-capabilities.h to handle

Re: [XEN][PATCH v7 08/19] xen/device-tree: Add device_tree_find_node_by_path() to find nodes in device tree

2023-06-07 Thread Luca Fancellu
erstanding, the main difference between the two functions are >> that the current one is starting from root whereas the current one is >> starting from a given node. So how about "dt_find_node_by_path_from()"? > Thank you for the suggestion. This name was a

[PATCH] docs: Fix xl.cfg documentation

2023-06-07 Thread Luca Fancellu
A recent change to the documentation for the xl.cfg introduced a build error, fix the issue. Fixes: b46e8207d0ae ("xen/tools: add sve parameter in XL configuration") Signed-off-by: Luca Fancellu --- Apologise for the error! I think I was building an old version of the docs and

[PATCH 2/2] tools/python: Fix memory leak on error path

2023-06-08 Thread Luca Fancellu
ities handling for Arm") Signed-off-by: Luca Fancellu Reported-by: Andrew Cooper --- tools/python/xen/lowlevel/xc/xc.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/python/xen/lowlevel/xc/xc.c b/tools/python/xen/lowlevel/xc/xc.c index e14e223ec903..d3

[PATCH 1/2] tools: Fix ifdef for aarch64 that should include also arm

2023-06-08 Thread Luca Fancellu
ts but with the current code it's not. So fix the issue by compiling the code when the toolstack is compiled for both arm32 and arm64. Fixes: 56a7aaa16bfe ("tools: add physinfo arch_capabilities handling for Arm") Signed-off-by: Luca Fancellu Reported-by: Andrew Cooper --- to

Re: [PATCH] tools: Move MASK_INSR to common-macros.h

2023-06-08 Thread Luca Fancellu
ur patch fixes a bug in a specific commit, e.g. you found an issue using ``git bisect``, please use the `Fixes:` tag with the first 12 characters of the commit id, and the one line summary. > Signed-off-by: Andrew Cooper But it makes sense, so Reviewed-by: Luca Fancellu > --- > CC: A

Re: [PATCH] tools/ocaml/xc: Fix xc_physinfo() bindings

2023-06-08 Thread Luca Fancellu
rate function, and make the construction of arch_physinfo_cap_flags common > to prevent other indirection bugs. > > Reintroduce arm_physinfo_caps with the fields broken out. > > Fixes: 56a7aaa16bfe ("tools: add physinfo arch_capabilities handling for Arm") > Signed-off-by:

Re: [PATCH] tools: Move MASK_INSR to common-macros.h

2023-06-09 Thread Luca Fancellu
quot;tools: add physinfo arch_capabilities handling for >> Arm") >> Signed-off-by: Andrew Cooper >> --- >> CC: Anthony PERARD >> CC: Juergen Gross >> CC: Luca Fancellu >> --- >> tools/include/xen-tools/common-macros.h | 1 + >> tools/lib

Re: [PATCH] tools: Move MASK_INSR to common-macros.h

2023-06-09 Thread Luca Fancellu
> On 9 Jun 2023, at 11:06, Andrew Cooper wrote: > > On 08/06/2023 8:37 pm, Luca Fancellu wrote: >>> On 8 Jun 2023, at 18:40, Andrew Cooper wrote: >>> >>> MASK_EXTR() and MASK_INSR() are a matching pair. Keep them together. >>> >>> Fixes

Re: [PATCH] tools: Move MASK_INSR to common-macros.h

2023-06-09 Thread Luca Fancellu
for Arm") > Signed-off-by: Andrew Cooper I think you forgot to retain my R-by: Reviewed-by: Luca Fancellu > --- > CC: Anthony PERARD > CC: Juergen Gross > CC: Luca Fancellu > CC: Jan Beulich > CC: Roger Pau Monné > CC: Wei Liu > > v2: > * Dro

Re: [PATCH] xen: Append a newline character to panic() where missing

2023-06-14 Thread Luca Fancellu
> On 14 Jun 2023, at 08:30, Michal Orzel wrote: > > Missing newline is inconsistent with the rest of the callers, since > panic() expects it. > > Signed-off-by: Michal Orzel Reviewed-by: Luca Fancellu > --- > xen/arch/arm/bootfdt.c| 2 +- >

Re: [PATCH v2] xen/misra: add rules 1.4 and 2.1

2023-06-16 Thread Luca Fancellu
> On 15 Jun 2023, at 22:27, Stefano Stabellini wrote: > > From: Stefano Stabellini > > Also add a comment at the top of the file to say rules.rst could be > changed. > > Signed-off-by: Stefano Stabellini Hi Stefano, Reviewed-by: Luca Fancellu While I was te

Re: Refactoring of a possibly unsafe pattern for variable initialization via function calls

2023-06-19 Thread Luca Fancellu
> On 19 Jun 2023, at 09:23, Julien Grall wrote: > > > > On 19/06/2023 09:18, Jan Beulich wrote: >> On 16.06.2023 22:56, Stefano Stabellini wrote: >>> On Fri, 16 Jun 2023, Nicola Vetrini wrote: On 16/06/23 09:19, Jan Beulich wrote: > On 15.06.2023 18:39, nicola wrote: >> while inv

Re: Refactoring of a possibly unsafe pattern for variable initialization via function calls

2023-06-19 Thread Luca Fancellu
> On 19 Jun 2023, at 09:50, Julien Grall wrote: > > > > On 19/06/2023 09:31, Luca Fancellu wrote: >>> On 19 Jun 2023, at 09:23, Julien Grall wrote: >>> >>> >>> >>> On 19/06/2023 09:18, Jan Beulich wrote: >>>>

Re: [PATCH 1/7] xen/arm32: head: Add missing isb in setup_fixmap()

2023-06-20 Thread Luca Fancellu
the UART. IOW, there could be hardware > translation table access. So we need to ensure the 'dsb' has completed > before continuing. Therefore add an 'isb'. > > Fixes: e7e587d7 ("xen/arm32: head: Remove 1:1 mapping as soon as it is > not used") > Signed-off-by: Julien Grall > --- Hi Julien, Yeah makes sense! Reviewed-by: Luca Fancellu

Re: [PATCH 2/7] xen/arm32: head: Add mising isb in switch_to_runtime_mapping()

2023-06-20 Thread Luca Fancellu
if we were using the temporary area before > jumping returning using a runtime address. So we need to ensure the > 'dsb' has completed before continuing. Therefore add an 'isb'. > > Fixes: fbd9b5fb4c26 ("xen/arm32: head: Remove restriction where to load Xen") > Signed-off-by: Julien Grall Reviewed-by: Luca Fancellu

Re: [PATCH 3/7] xen/arm64: head: Add missing isb in setup_fixmap()

2023-06-20 Thread Luca Fancellu
le access. So we need to ensure the 'dsb' has completed > before continuing. Therefore add an 'isb'. > > Fixes: 2b11c3646105 ("xen/arm64: head: Remove 1:1 mapping as soon as it is > not used") > Signed-off-by: Julien Grall Reviewed-by: Luca Fancellu

Re: [XEN PATCH 13/13] xen: fixed violations of MISRA C:2012 Rule 7.2

2023-06-20 Thread Luca Fancellu
> On 20 Jun 2023, at 14:59, Simone Ballarin wrote: > > Hi, > > Il giorno mar 20 giu 2023 alle ore 15:20 Jan Beulich ha > scritto: > On 20.06.2023 12:35, Simone Ballarin wrote: > > --- a/xen/common/gunzip.c > > +++ b/xen/common/gunzip.c > > @@ -11,7 +11,7 @@ static unsigned char *__initdata

Re: [XEN PATCH 02/13] AMD/IOMMU: fixed violations of MISRA C:2012 Rule 7.2

2023-06-20 Thread Luca Fancellu
> On 20 Jun 2023, at 13:39, Jan Beulich wrote: > > On 20.06.2023 12:34, Simone Ballarin wrote: >> --- a/xen/drivers/passthrough/amd/iommu-defs.h >> +++ b/xen/drivers/passthrough/amd/iommu-defs.h >> @@ -38,49 +38,49 @@ >> ((uint64_t)(offset) << (12 + (PTE_PER_TABLE_SHIFT * ((level) - 1))

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