Re: [PATCH v6 2/2] flask: implement xsm_set_system_active

2022-05-03 Thread Luca Fancellu
he necessary resources for domain > construction. > > Signed-off-by: Daniel P. Smith > Reviewed-by: Jason Andryuk Hi Daniel, I’ve built and tested the whole serie on arm, checked SILO and FLASK with builtin flask policy and I’ve tested that Dom0 is booting fine. So for me: Reviewe

Re: [PATCH v2] xen/arm: p2m don't fall over on FEAT_LPA enabled hw

2022-05-03 Thread Luca Fancellu
Cc: Richard Henderson > Cc: Stefano Stabellini > Cc: Julien Grall > Cc: Volodymyr Babchuk > Cc: Bertrand Marquis > > --- > v2 > - clamp p2m_ipa_bits = PADDR_BIT instead > --- Hi Alex, I’ve tested the patch on fvp and Xen+Dom0 runs fine. Tested-by: Luca Fancellu Cheers, Luca

Re: [PATCH v8 0/7] Boot time cpupools

2022-05-06 Thread Luca Fancellu
l. > > In this particular case Xen must boot with different type of cpus, so the > boot argument hmp_unsafe must be enabled. > > Luca Fancellu (7): > tools/cpupools: Give a name to unnamed cpupools > xen/sched: create public function for cpupools creation > xen/sched: retri

Re: [PATCH v8 0/7] Boot time cpupools

2022-05-06 Thread Luca Fancellu
>>> >>> Luca Fancellu (7): >>> tools/cpupools: Give a name to unnamed cpupools >>> xen/sched: create public function for cpupools creation >>> xen/sched: retrieve scheduler id by name >>> xen/cpupool: Create different cpupools at boot time &g

[PATCH v8 0/7] Boot time cpupools

2022-05-06 Thread Luca Fancellu
reg = <0x9200 0x1ff>; bootargs = "..."; }; }; }; [...] The example DT is instructing Xen to have two cpu pools, one having two phisical cpus and the one having 4 phisical cpus, the last mentioned cpu pool uses the null scheduler and from the /chosen no

[PATCH v8 6/7] arm/dom0less: assign dom0less guests to cpupools

2022-05-06 Thread Luca Fancellu
XEN_DOMCTL_INTERFACE_VERSION version is bumped. Add public function to retrieve a pool id from the device tree cpupool node. Update documentation about the property. Signed-off-by: Luca Fancellu Reviewed-by: Stefano Stabellini --- Changes in v8: - no changes Changes in v7: - Add comment for

[PATCH v8 1/7] tools/cpupools: Give a name to unnamed cpupools

2022-05-06 Thread Luca Fancellu
hange, remove the check for poolid == 0 from libxl_cpupoolid_to_name(...). Signed-off-by: Luca Fancellu Reviewed-by: Anthony PERARD --- Changes in v8: - no changes Changes in v7: - Add R-by from Anthony Changes in v6: - Reworked loop to have only one error path (Anthony) Changes in v5: - no changes Ch

[PATCH v8 2/7] xen/sched: create public function for cpupools creation

2022-05-06 Thread Luca Fancellu
Create new public function to create cpupools, can take as parameter the scheduler id or a negative value that means the default Xen scheduler will be used. Signed-off-by: Luca Fancellu Reviewed-by: Juergen Gross --- Changes in v8: - no changes Changes in v7: - no changes Changes in v6: - add R

[PATCH v8 4/7] xen/cpupool: Create different cpupools at boot time

2022-05-06 Thread Luca Fancellu
the feature. Signed-off-by: Luca Fancellu Reviewed-by: Stefano Stabellini --- Changes in v8: - moved Kconfig parameter from xen/common/Kconfig to xen/common/sched/Kconfig (Jan) - Add R-by (Stefano) Changes in v7: - rename xen/common/boot_cpupools.c to xen/common/sched/boot-cpupool.c (Jan

[PATCH v8 7/7] xen/cpupool: Allow cpupool0 to use different scheduler

2022-05-06 Thread Luca Fancellu
cated). Signed-off-by: Luca Fancellu Reviewed-by: Juergen Gross --- Changes in v8: - no changes Changes in v7: - no changes Changes in v6: - Add R-by Changes in v5: - no changes Changes in v4: - no changes Changes in v3: - fix typo in commit message (Juergen) - rebase changes Changes in v2: - new

[PATCH v8 5/7] xen/cpupool: Don't allow removing cpu0 from cpupool0

2022-05-06 Thread Luca Fancellu
Cpu0 must remain in cpupool0, otherwise some operations like moving cpus between cpupools, cpu hotplug, destroying cpupools, shutdown of the host, might not work in a sane way. Signed-off-by: Luca Fancellu Reviewed-by: Juergen Gross --- Changes in v8: - Add R-by (Juergen) Changes in v7: - new

[PATCH v8 3/7] xen/sched: retrieve scheduler id by name

2022-05-06 Thread Luca Fancellu
scheduler_init. Signed-off-by: Luca Fancellu Reviewed-by: Juergen Gross Reviewed-by: Dario Faggioli --- Changes in v8: - no changes Changes in v7: - Add R-by (Dario) Changes in v6: - no changes Changes in v5: - no changes Changes in v4: - no changes Changes in v3: - add R-by Changes in v2: - replace open

Re: [PATCH v4 1/2] xen: sync xs_wire.h header with upstream xen

2022-05-10 Thread Luca Fancellu
Hi Stefano, > On 5 May 2022, at 01:23, Stefano Stabellini wrote: > > From: Stefano Stabellini > > Sync the xs_wire.h header file in Linux with the one in Xen. > > Signed-off-by: Stefano Stabellini > --- > include/xen/interface/io/xs_wire.h | 34 +++--- > 1 file change

Re: [REGRESSION] [PATCH v8 6/7] arm/dom0less: assign dom0less guests to cpupools

2022-05-17 Thread Luca Fancellu
Hi Andrew, > On 17 May 2022, at 14:01, Andrew Cooper wrote: > > On 06/05/2022 13:00, Luca Fancellu wrote: >> Introduce domain-cpupool property of a xen,domain device tree node, >> that specifies the cpupool device tree handle of a xen,cpupool node >> that identifie

Re: [PATCH 1/2] xen/cpupool: Reject attempts to add a domain to CPUPOOLID_NONE

2022-05-18 Thread Luca Fancellu
upools, on an arm machine and booting Xen+Dom0 and another DomU by dom0less feature, and all works. Reviewed-by: Luca Fancellu Tested-by: Luca Fancellu Cheers, Luca

Re: [PATCH 2/2] tools/ocaml: Fix stubs the introduction of domain_create.cpupool_id

2022-05-18 Thread Luca Fancellu
> On 18 May 2022, at 11:12, Andrew Cooper wrote: > > On 18/05/2022 10:51, Edwin Torok wrote: >>> diff --git a/tools/ocaml/libs/xc/xenctrl.ml b/tools/ocaml/libs/xc/xenctrl.ml >>> index 7503031d8f61..8eab6f60eb14 100644 >>> --- a/tools/ocaml/libs/xc/xenctrl.ml >>> +++ b/tools/ocaml/libs/xc/xenctr

Re: [PATCH 2/2] tools/ocaml: Fix stubs the introduction of domain_create.cpupool_id

2022-05-18 Thread Luca Fancellu
+ Adding toolstack maintainer > On 18 May 2022, at 12:34, Andrew Cooper wrote: > > On 18/05/2022 11:30, Luca Fancellu wrote: >>> On 18 May 2022, at 11:12, Andrew Cooper wrote: >>> >>> On 18/05/2022 10:51, Edwin Torok wrote: >>>>> diff --

[PATCH] tools/libxl: optimize domain creation skipping domain cpupool move

2022-05-26 Thread Luca Fancellu
an cpupool0, but the toolstack can benefit from it because it can now use the struct member directly instead of creating the guest in cpupool0 and then moving it to the target cpupool. Suggested-by: Andrew Cooper Signed-off-by: Luca Fancellu --- tools/libs/light/libxl_create.c | 8 +--- 1 file

Re: [PATCH 03/16] xen/arm: mm: Avoid flushing the TLBs when mapping are inserted

2022-05-26 Thread Luca Fancellu
destroying few guests and I’ve got no problem Reviewed-by: Luca Fancellu Tested-by: Luca Fancellu

Re: [PATCH 10/16] xen/arm: add Persistent Map (PMAP) infrastructure

2022-05-26 Thread Luca Fancellu
Julien, with ASSERT(!in_irq()) in pmap_unmap(const void *p) as you previously say. Reviewed-by: Luca Fancellu I’ve also tested patches up to this one, start/destroying/connecting-to few guests and no problem. Tested-by: Luca Fancellu

Re: [PATCH 14/16] xen/arm64: mm: Add memory to the boot allocator first

2022-05-26 Thread Luca Fancellu
r we need to exclude the > xenheap for the boot allocator. Gate the difference with CONFIG_ARM_32 > so the code be re-used on arm64. > > Signed-off-by: Julien Grall > Hi Julien, Seems ok to me! Reviewed-by: Luca Fancellu I’ve also tested on arm64 patches until this one and no problem. Tested-by: Luca Fancellu

Re: [PATCH 16/16] xen/arm: mm: Re-implement setup_frame_table_mappings() with map_pages_to_xen()

2022-05-26 Thread Luca Fancellu
ences between 32-bit and > 64-bit code. > > Lastly remove create_mappings() as there is no more callers. > > Signed-off-by: Julien Grall > Signed-off-by: Julien Grall > Hi Julien, Reviewed-by: Luca Fancellu I’ve also tested all patches including this one on arm64, booting

[PATCH] docs/efi: Fix wrong compatible in dts example

2021-12-02 Thread Luca Fancellu
The example in section "UEFI boot and dom0less on ARM" has a wrong compatible for the DTB passthrough, it is "ramdisk" instead of "device-tree". This patch fixes the example. Fixes: a1743fc3a9 ("arm/efi: Use dom0less configuration when using EFI boot") Si

Re: [PATCH 0/7] (mainly) xz imports from Linux

2021-12-03 Thread Luca Fancellu
validate the value before assigning it to an enum variable > For the whole serie Reviewed-by: Luca Fancellu > Jan

Re: [PATCH 1/3] EFI: move efi-boot.h inclusion point

2021-12-03 Thread Luca Fancellu
ie are above the char line limit, however everything looks fine. Reviewed-by: Luca Fancellu > Signed-off-by: Jan Beulich > > --- a/xen/common/efi/boot.c > +++ b/xen/common/efi/boot.c > @@ -111,25 +111,10 @@ struct file { > }; > }; > > -static CHAR16 *FormatDec(UIN

Re: [PATCH 2/3] EFI: constify EFI_LOADED_IMAGE * function parameters

2021-12-03 Thread Luca Fancellu
> On 3 Dec 2021, at 10:57, Jan Beulich wrote: > > Instead of altering Arm's forward declarations, drop them. Like > elsewhere we should limit such to cases where the first use lives ahead > of the definition. > Reviewed-by: Luca Fancellu > Signed-off-by: Jan Be

Re: [PATCH 3/3] EFI: drop copy-in from QueryVariableInfo()'s OUT-only variable bouncing

2021-12-03 Thread Luca Fancellu
eally > be needed. In exchange the local variables need to gain initializers to > avoid copying back prior stack contents. > Reviewed-by: Luca Fancellu > Signed-off-by: Jan Beulich > > --- a/xen/common/efi/runtime.c > +++ b/xen/common/efi/runtime.c > @@ -608

Re: [PATCH 1/5] perfc: conditionalize credit/credit2 counters

2021-12-03 Thread Luca Fancellu
> On 3 Dec 2021, at 12:03, Jan Beulich wrote: > > There's no point including them when the respective scheduler isn't > enabled in the build. > Reviewed-by: Luca Fancellu > Signed-off-by: Jan Beulich > > --- a/xen/include/xen/perfc_defn.h > +++ b/xe

Re: [PATCH 1/3] EFI: move efi-boot.h inclusion point

2021-12-06 Thread Luca Fancellu
> On 6 Dec 2021, at 07:27, Jan Beulich wrote: > > On 03.12.2021 17:10, Luca Fancellu wrote: >>> On 3 Dec 2021, at 10:56, Jan Beulich wrote: >>> >>> When it was introduced, it was imo placed way too high up, making it >>> necessary to forward-d

[PATCH] arm/efi: Handle Xen bootargs from both xen.cfg and DT

2021-12-06 Thread Luca Fancellu
en even if the keyword "options=" is not used. This patch handle this case, if xen,xen-bootargs is found in the device tree, it is used for xen boot arguments regardless they are specified in the Xen configuration file or not. Signed-off-by: Luca Fancellu --- docs/misc/efi.pandoc

[PATCH] xen/arm: Add Kconfig parameter for memory banks number

2021-12-06 Thread Luca Fancellu
Currently the maximum number of memory banks is fixed to 128, but on some new platforms that have a large amount of memory, this value is not enough and prevents Xen from booting. Create a Kconfig parameter to set the value, by default 128. Signed-off-by: Luca Fancellu --- xen/arch/arm/Kconfig

Re: [RFC PATCH 0/2] Boot time cpupools

2021-12-07 Thread Luca Fancellu
Hi all, Thank you for all your feedbacks, sorry for the late response. Given the amount of suggestions I’ve been working on a proposal for the boot time cpupools that I hope could be good for everyone. The feature will be enabled by CONFIG_BOOT_TIME_CPUPOOLS, so without it everything is behavin

Re: [PATCH] xen/arm: Add Kconfig parameter for memory banks number

2021-12-07 Thread Luca Fancellu
> On 6 Dec 2021, at 17:05, Julien Grall wrote: > > Hi Luca, > > On 06/12/2021 15:37, Luca Fancellu wrote: >> Currently the maximum number of memory banks is fixed to >> 128, but on some new platforms that have a large amount >> of memory, this value is not

Re: [PATCH] arm/efi: Handle Xen bootargs from both xen.cfg and DT

2021-12-10 Thread Luca Fancellu
> On 8 Dec 2021, at 18:10, Julien Grall wrote: > > Hi Luca, > > On 06/12/2021 15:36, Luca Fancellu wrote: >> Currently the Xen UEFI stub can accept Xen boot arguments from >> the Xen configuration file using the "options=" keyword, but also >> direc

[PATCH] xen/arm: increase memory banks number define value

2021-12-13 Thread Luca Fancellu
Currently the maximum number of memory banks (NR_MEM_BANKS define) is fixed to 128, but on some new platforms that have a large amount of memory, this value is not enough and prevents Xen from booting. Increase the value to 256. Signed-off-by: Luca Fancellu --- xen/include/asm-arm/setup.h | 2

[PATCH v2] arm/efi: Handle Xen bootargs from both xen.cfg and DT

2021-12-13 Thread Luca Fancellu
en even if the keyword "options=" is not used. This patch handle this case, so if the Xen configuration file is not specifying boot arguments, the device tree boot arguments will be used, if they are present. Signed-off-by: Luca Fancellu --- v2 changes: - Changed logic, now xen c

Re: [PATCH 1/5] tools/libxl: Mark pointer args of many functions constant

2021-12-29 Thread Luca Fancellu
further, allowing more checking and security. Looks ok to me Reviewed-by: Luca Fancellu > > Signed-off-by: Elliott Mitchell > --- > tools/include/libxl_json.h| 22 -- > tools/libs/light/gentypes.py | 8 > tools/libs/light/libxl_c

Re: [PATCH 2/5] tools/xl: Mark libxl_domain_config * arg of printf_info_*() const

2021-12-29 Thread Luca Fancellu
e so. Looks ok to me Reviewed-by: Luca Fancellu > > Signed-off-by: Elliott Mitchell > --- > tools/xl/xl.h | 2 +- > tools/xl/xl_info.c | 2 +- > tools/xl/xl_sxp.c | 6 +++--- > 3 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/tools/xl/xl.h b/tools/

Re: [PATCH 3/5] tools/xl: Rename printf_info()/list_domains_details() to dump_by_...()

2021-12-29 Thread Luca Fancellu
to better reflect their functionality. > > Both were simply outputting full domain information. As this is more of > a dump operation, "dump" is a better name. > Looks ok to me Reviewed-by: Luca Fancellu > Signed-off-by: Elliott Mitchell > --- > tools/xl/

Re: [PATCH 4/5] tools/xl: Merge down debug/dry-run section of create_domain()

2021-12-29 Thread Luca Fancellu
tput. > Don’t know if the extra output is a problem, but for me looks ok Reviewed-by: Luca Fancellu > Signed-off-by: Elliott Mitchell > --- > tools/xl/xl_vmcontrol.c | 14 +- > 1 file changed, 1 insertion(+), 13 deletions(-) > > diff --git a/tools/xl/xl_vmco

Re: [PATCH 5/5] tools/xl: Fix potential deallocation bug

2021-12-29 Thread Luca Fancellu
> address this issue (making use of divergent info/info_free values is > under consideration). > Looks ok to me Reviewed-by: Luca Fancellu > Signed-off-by: Elliott Mitchell > --- > tools/xl/xl_info.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff

Re: [PATCH 1/5] tools/libxl: Mark pointer args of many functions constant

2022-01-05 Thread Luca Fancellu
> On 5 Jan 2022, at 10:09, Anthony PERARD wrote: > > On Fri, Dec 18, 2020 at 01:37:44PM -0800, Elliott Mitchell wrote: >> Anything *_is_empty(), *_is_default(), or *_gen_json() is going to be >> examining the pointed to thing, not modifying it. This potentially >> results in higher-performanc

Re: [PATCH v4] EFI: always map EfiRuntimeServices{Code,Data}

2022-01-12 Thread Luca Fancellu
> Signed-off-by: Jan Beulich Hi, I’ve tested this patch on an arm machine with UEFI boot and it works fine. Reviewed-by: Luca Fancellu Tested-by: Luca Fancellu Cheers, Luca > --- > v4: Drop EFI_MEMORY_CACHEABILITY_MASK. Fold with pre-existing if() (into >switch()). Style.

Re: [XEN PATCH v2 1/5] xen: introduce xen,enhanced dom0less property

2022-01-13 Thread Luca Fancellu
llini > CC: Julien Grall > CC: Volodymyr Babchuk > CC: Bertrand Marquis Hi Stefano, Subject to Bertrand’s comment on commit message: Reviewed-by: Luca Fancellu Just a small curiosity, why we use the prefix “xen,” for the property? I thought since the node uses a “xen,domain&quo

[PATCH 01/11] xen/arm: remove stale addr_cells/size_cells in assign_shared_memory

2024-03-12 Thread Luca Fancellu
From: Penny Zheng Function parameters {addr_cells,size_cells} are stale parameters in assign_shared_memory, so we shall remove them. Signed-off-by: Penny Zheng Signed-off-by: Luca Fancellu Reviewed-by: Michal Orzel --- v1: - This is this patch: https://patchwork.kernel.org/project/xen

[PATCH 05/11] xen/arm: Introduce helper for static memory pages

2024-03-12 Thread Luca Fancellu
Introduce a new helper function in the static-memory module that can be called to manage static memory banks, this is done to reuse the code when other modules would like to manage static memory banks that are not part of the reserved_mem structure. Signed-off-by: Luca Fancellu --- xen/arch/arm

[PATCH 03/11] xen/arm: Introduce a generic way to access memory bank structures

2024-03-12 Thread Luca Fancellu
duced static inline helpers to access the new field of 'struct meminfo' named 'common'. - code accessing 'struct kernel_info *' member 'mem' now use the new introduced macro 'kernel_info_get_mem(...)' to access the new field of 'struct memin

[PATCH 07/11] xen/arm: Avoid code duplication in check_reserved_regions_overlap

2024-03-12 Thread Luca Fancellu
The function check_reserved_regions_overlap is calling 'meminfo_overlap_check' on the same type of structure, this code can be written in a way to avoid code duplication, so rework the function to do that. Signed-off-by: Luca Fancellu --- xen/arch/arm/setup.c | 24 +

[PATCH 11/11] xen/arm: List static shared memory regions as /memory nodes

2024-03-12 Thread Luca Fancellu
Currently Xen is not exporting the static shared memory regions to the device tree as /memory node, this commit is fixing this issue. Signed-off-by: Luca Fancellu --- xen/arch/arm/dom0less-build.c | 5 +++ xen/arch/arm/domain_build.c | 7 +++- xen/arch/arm/include/asm

[PATCH 04/11] xen/arm: Conditional compilation of kernel_info.shm_mem member

2024-03-12 Thread Luca Fancellu
ue, protect the member with the Kconfig parameter and modify the signature of the only function using it to remove any reference to the member from outside the static-shmem module. Signed-off-by: Luca Fancellu --- xen/arch/arm/dom0less-build.c | 3 +-- xen/arch/arm/domain_build.c

[PATCH 02/11] xen/arm: avoid repetitive checking in process_shm_node

2024-03-12 Thread Luca Fancellu
From: Penny Zheng Putting overlap and overflow checking in the loop is causing repetitive operation, so this commit extracts both checking outside the loop. Signed-off-by: Penny Zheng Signed-off-by: Luca Fancellu --- v1: - Rework of https://patchwork.kernel.org/project/xen-devel/patch

[PATCH 09/11] xen/arm: remove shm holes for extended regions

2024-03-12 Thread Luca Fancellu
shm info from "kinfo", we use "remove_shm_from_rangeset" to remove static shm. For direct-map domain with iommu off, as static shm has already been taken care of through reserved memory banks, we do nothing. Signed-off-by: Penny Zheng Signed-off-by: Luca Fancellu --- v1: - Rework of ht

[PATCH 06/11] xen/arm: Avoid code duplication in find_unallocated_memory

2024-03-12 Thread Luca Fancellu
The function find_unallocated_memory is using the same code to loop through 3 structure of the same type, in order to avoid code duplication, rework the code to have only one loop that goes through all the structures. Signed-off-by: Luca Fancellu --- xen/arch/arm/domain_build.c | 62

[PATCH 00/11] Static shared memory followup v2 - pt1

2024-03-12 Thread Luca Fancellu
original serie and it is splitting the rework in two part, this first part is addressing the memory footprint issue and the device tree generation, there will be a following serie addressing the last missing feature soon. Luca Fancellu (7): xen/arm: Introduce a generic way to access memory bank

[PATCH 10/11] xen/arm: fix duplicate /reserved-memory node in Dom0

2024-03-12 Thread Luca Fancellu
generation and guest would not be able to detect the static shared memory region. Avoid this issue checking the presence of the /reserved-memory node and appending the nodes instead of generating a duplicate /reserved-memory. Signed-off-by: Penny Zheng Signed-off-by: Luca Fancellu --- v1

[PATCH 08/11] xen/arm: Reduce struct membank size on static shared memory

2024-03-12 Thread Luca Fancellu
ge also the 'shm_mem' member type to be 'struct shared_meminfo' in order to match the above changes and allow a memory space reduction also in 'struct kernel_info'. Signed-off-by: Luca Fancellu --- xen/arch/arm/arm32/mmu/mm.c | 24 + xen/arch/arm/arm6

Re: [PATCH v3 4/9] xen/ppc: Update setup.h with required definitions for bootfdt

2024-03-15 Thread Luca Fancellu
Hi Shawn, > On 14 Mar 2024, at 22:15, Shawn Anastasio > wrote: > > Add the definitions used by ARM's bootfdt.c, which will be moved into > xen/common in a later patch, to PPC's setup.h. > > Signed-off-by: Shawn Anastasio > --- > xen/arch/ppc/include/asm/setup.h | 112

Re: [PATCH 03/11] xen/arm: Introduce a generic way to access memory bank structures

2024-03-19 Thread Luca Fancellu
> On 19 Mar 2024, at 13:10, Michal Orzel wrote: > > Hi Luca, Hi Michal, Thanks for having a look > > On 12/03/2024 14:03, Luca Fancellu wrote: >> >> >> Currently the 'stuct meminfo' is defining a static defined array of >> 'struc

Re: [PATCH 06/11] xen/arm: Avoid code duplication in find_unallocated_memory

2024-03-20 Thread Luca Fancellu
> On 20 Mar 2024, at 10:57, Michal Orzel wrote: > > Hi Luca, > > On 12/03/2024 14:03, Luca Fancellu wrote: >> >> >> The function find_unallocated_memory is using the same code to >> loop through 3 structure of the same type, in order to avoid >&

Re: [PATCH 09/11] xen/arm: remove shm holes for extended regions

2024-03-22 Thread Luca Fancellu
> On 22 Mar 2024, at 15:09, Michal Orzel wrote: > > Hi Luca, > > NIT: title s/for/from? > > On 12/03/2024 14:03, Luca Fancellu wrote: >> >> >> From: Penny Zheng >> >> Static shared memory acts as reserved memory in guest, so it shall be

Re: [PATCH 11/11] xen/arm: List static shared memory regions as /memory nodes

2024-03-26 Thread Luca Fancellu
> On 25 Mar 2024, at 08:58, Michal Orzel wrote: > > Hi Luca, > Hi Michal, > On 12/03/2024 14:03, Luca Fancellu wrote: >> >> >> Currently Xen is not exporting the static shared memory regions >> to the device tree as /memory node, this commit is

Re: [PATCH 04/11] xen/arm: Conditional compilation of kernel_info.shm_mem member

2024-04-04 Thread Luca Fancellu
> On 19 Mar 2024, at 14:58, Michal Orzel wrote: > > Hi Luca, > > On 12/03/2024 14:03, Luca Fancellu wrote: >> >> >> The user of shm_mem member of the 'struct kernel_info' is only >> the code managing the static shared memory feature, which c

Re: [PATCH 08/11] xen/arm: Reduce struct membank size on static shared memory

2024-04-04 Thread Luca Fancellu
> On 22 Mar 2024, at 10:30, Michal Orzel wrote: > > Hi Luca, > > On 12/03/2024 14:03, Luca Fancellu wrote: >> >> >> Currently the memory footprint of the static shared memory feature >> is impacting all the struct meminfo instances with memor

[PATCH v2 02/13] xen/arm: avoid repetitive checking in process_shm_node

2024-04-09 Thread Luca Fancellu
From: Penny Zheng Putting overlap and overflow checking in the loop is causing repetitive operation, so this commit extracts both checking outside the loop. Signed-off-by: Penny Zheng Signed-off-by: Luca Fancellu Reviewed-by: Michal Orzel --- v2: - add Michal R-by v1: - Rework of https

[PATCH v2 08/13] xen/arm: Introduce helper for static memory pages

2024-04-09 Thread Luca Fancellu
banks will be removed from reserved_mem. Signed-off-by: Luca Fancellu Reviewed-by: Michal Orzel --- v2: - Add Michal R-by - Changed commit msg v1: - new patch --- --- xen/arch/arm/include/asm/static-memory.h | 13 + xen/arch/arm/static-memory.c | 12 +--- 2 files

[PATCH v2 07/13] xen/arm: Avoid code duplication in check_reserved_regions_overlap

2024-04-09 Thread Luca Fancellu
The function check_reserved_regions_overlap is calling 'meminfo_overlap_check' on the same type of structure, this code can be written in a way to avoid code duplication, so rework the function to do that. Signed-off-by: Luca Fancellu --- v2: - no changes v1: - new patch --- --- xe

[PATCH v2 00/13] Static shared memory followup v2 - pt1

2024-04-09 Thread Luca Fancellu
per. Luca Fancellu (9): xen/arm: Pass struct kernel_info parameter to make_resv_memory_node xen/arm: Introduce a generic way to access memory bank structures xen/arm: Conditional compilation of kernel_info.shm_mem member xen/arm: Avoid code duplication in find_unallocated_memory xen/

[PATCH v2 04/13] xen/arm: Introduce a generic way to access memory bank structures

2024-04-09 Thread Luca Fancellu
new field of 'struct meminfo' named 'common'. Constify pointers where needed. Suggested-by: Julien Grall Signed-off-by: Luca Fancellu --- v2: - Fixed typos in commit message and mention flexible array member - Add static assert for struct membanks - use static inline for

[PATCH v2 10/13] xen/arm: remove shm holes from extended regions

2024-04-09 Thread Luca Fancellu
shm info from "kinfo", we use "remove_shm_from_rangeset" to remove static shm. For direct-map domain with iommu off, as static shm has already been taken care of through reserved memory banks, we do nothing. Signed-off-by: Penny Zheng Signed-off-by: Luca Fancellu --- v2:

[PATCH v2 12/13] xen/device_tree: Introduce function to merge overlapping intervals

2024-04-09 Thread Luca Fancellu
not needed, NULL can be provided. Signed-off-by: Luca Fancellu --- v2: - new patch --- --- xen/arch/arm/bootfdt.c| 5 +- xen/arch/arm/io.c | 11 ++- xen/arch/x86/extable.c| 5 +- xen/common/device_tree.c | 140 ++ xen/include

[PATCH v2 01/13] xen/arm: remove stale addr_cells/size_cells in assign_shared_memory

2024-04-09 Thread Luca Fancellu
From: Penny Zheng Function parameters {addr_cells,size_cells} are stale parameters in assign_shared_memory, so we shall remove them. Signed-off-by: Penny Zheng Signed-off-by: Luca Fancellu Reviewed-by: Michal Orzel --- v2: - no change v1: - This is this patch: https://patchwork.kernel.org

[PATCH v2 09/13] xen/arm: Reduce struct membank size on static shared memory

2024-04-09 Thread Luca Fancellu
' member of the 'struct bootinfo'. Change also the 'shm_mem' member type to be 'struct shared_meminfo' in order to match the above changes and allow a memory space reduction also in 'struct kernel_info'. Signed-off-by: Luca Fancellu --- v2: - Made

[PATCH v2 06/13] xen/arm: Avoid code duplication in find_unallocated_memory

2024-04-09 Thread Luca Fancellu
The function find_unallocated_memory is using the same code to loop through 3 structure of the same type, in order to avoid code duplication, rework the code to have only one loop that goes through all the structures. Signed-off-by: Luca Fancellu --- v2: - Add comment in the loop inside

[PATCH v2 11/13] xen/arm: fix duplicate /reserved-memory node in Dom0

2024-04-09 Thread Luca Fancellu
make_shm_resv_memory_node to make clear it produces childs for /reserved-memory. Signed-off-by: Penny Zheng Signed-off-by: Luca Fancellu Reviewed-by: Michal Orzel --- v2: - fix comment, remove function signature change, fixed commit msg - rename make_shm_memory_node to make_shm_resv_memory_node in

[PATCH v2 03/13] xen/arm: Pass struct kernel_info parameter to make_resv_memory_node

2024-04-09 Thread Luca Fancellu
. Signed-off-by: Luca Fancellu --- v2: - new patch --- --- xen/arch/arm/dom0less-build.c | 3 +-- xen/arch/arm/domain_build.c | 3 +-- xen/arch/arm/include/asm/static-shmem.h | 9 - xen/arch/arm/static-shmem.c | 16 +--- 4 files changed, 15

[PATCH v2 05/13] xen/arm: Conditional compilation of kernel_info.shm_mem member

2024-04-09 Thread Luca Fancellu
ue, protect the member with the Kconfig parameter and modify the signature of the only function using it to remove any reference to the member from outside the static-shmem module. Signed-off-by: Luca Fancellu Reviewed-by: Michal Orzel --- v2: - add Michal R-by - Removed the signature

[PATCH v2 13/13] xen/arm: List static shared memory regions as /memory nodes

2024-04-09 Thread Luca Fancellu
rameter. Signed-off-by: Luca Fancellu --- v2: - try to use make_memory_node, don't add overlapping ranges of memory, commit message changed. v1: - new patch --- --- xen/arch/arm/dom0less-build.c | 2 +- xen/arch/arm/domain_build.c | 38 ++---

Re: [PATCH v2 06/13] xen/arm: Avoid code duplication in find_unallocated_memory

2024-04-09 Thread Luca Fancellu
> On 9 Apr 2024, at 14:38, Michal Orzel wrote: > > Hi Luca, > > On 09/04/2024 13:45, Luca Fancellu wrote: >> >> >> The function find_unallocated_memory is using the same code to >> loop through 3 structure of the same type, in order to avoid >&

Re: [PATCH v2 09/13] xen/arm: Reduce struct membank size on static shared memory

2024-04-10 Thread Luca Fancellu
Hi Michal, > On 10 Apr 2024, at 11:01, Michal Orzel wrote: > > Hi Luca, > > On 09/04/2024 13:45, Luca Fancellu wrote: >> >> >> Currently the memory footprint of the static shared memory feature >> is impacting all the struct meminfo instances with memor

Re: [PATCH v2 09/13] xen/arm: Reduce struct membank size on static shared memory

2024-04-10 Thread Luca Fancellu
Afterwards, create a new structure 'struct shared_meminfo' which has the same interface of 'struct meminfo', but requires less >>> I would expect some justification for selecting 32 as the max number of >>> shmem banks >> >> So I have to say I picked up a value I thought was ok

Re: [PATCH v2 10/13] xen/arm: remove shm holes from extended regions

2024-04-10 Thread Luca Fancellu
Hi Michal, >> >> For direct-map domain with iommu on, after we get guest shm info from >> "kinfo", >> we use "remove_shm_from_rangeset" to remove static shm. >> >> For direct-map domain with iommu off, as static shm has already been taken >> care of through reserved memory banks, we do nothing.

Re: [PATCH v2 10/13] xen/arm: remove shm holes from extended regions

2024-04-10 Thread Luca Fancellu
Hi Michal, >> >> For direct-map domain with iommu off, as static shm has already been taken >> care of through reserved memory banks, we do nothing. > Stale info given that shmem is no longer part of reserved memory banks. It's > been taken care > of by removing shmem regions in find_unallocat

Re: [PATCH] xen/spinlock: Adjust LOCK_DEBUG_INITVAL to placate MISRA

2024-04-10 Thread Luca Fancellu
> On 10 Apr 2024, at 20:35, Andrew Cooper wrote: > > Resolves an R7.2 violation. > > Fixes: c286bb93d20c ("xen/spinlock: support higher number of cpus") > Signed-off-by: Andrew Cooper Yes makes sense Reviewed-by: Luca Fancellu

Re: [PATCH] xen/vPCI: Remove shadowed variable

2024-04-10 Thread Luca Fancellu
> On 10 Apr 2024, at 20:33, Andrew Cooper wrote: > > Resolves a MISRA R5.3 violation. > > Fixes: 622bdd962822 ("vpci/header: handle p2m range sets per BAR") > Signed-off-by: Andrew Cooper > --- Reviewed-by: Luca Fancellu

Re: [PATCH] xen/nospec: Remove unreachable code

2024-04-10 Thread Luca Fancellu
} > > Insert an #else to take out the second return. > > Fixes: 7ef0084418e1 ("x86/spinlock: introduce support for blocking > speculation into critical regions") > Signed-off-by: Andrew Cooper > --- Reviewed-by: Luca Fancellu

Re: [PATCH v2 4/4] xen/virtual-region: Drop setup_virtual_regions()

2024-04-10 Thread Luca Fancellu
the opportunity to move 'core' into read_mostly, where it probably should > have lived all along. > > Signed-off-by: Andrew Cooper For the arm part: Reviewed-by: Luca Fancellu #arm I’ve also tested the serie on arm32 and arm64 on qemu Tested-by: Luca Fancellu

Re: [PATCH v2 12/13] xen/device_tree: Introduce function to merge overlapping intervals

2024-04-11 Thread Luca Fancellu
> On 9 Apr 2024, at 12:45, Luca Fancellu wrote: > > Introduce a function that given an array of cells containing > (address,size) intervals, merges the overlapping ones, returning > an array with no overlapping intervals. > > The algorithm needs to sort the interva

Re: [PATCH v2 12/13] xen/device_tree: Introduce function to merge overlapping intervals

2024-04-11 Thread Luca Fancellu
> > I’ve just spotted an issue with the algorithm, the fix is this one: > > diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c > index 24914a80d03b..262385a041a8 100644 > --- a/xen/common/device_tree.c > +++ b/xen/common/device_tree.c > @@ -2360,6 +2360,10 @@ int __init > dt_merge_

Re: [PATCH 1/5] gzip: colocate gunzip code files

2024-04-11 Thread Luca Fancellu
> On 11 Apr 2024, at 16:25, Daniel P. Smith > wrote: > > This patch moves the gunzip code files to common/gzip. Makefiles are adjusted > accordingly. > > Signed-off-by: Daniel P. Smith > --- > xen/common/Makefile | 2 +- > xen/common/gzip/Makefile| 1 + > xen/common/{ => g

Re: [PATCH 1/5] gzip: colocate gunzip code files

2024-04-11 Thread Luca Fancellu
>>> create mode 100644 xen/common/gzip/Makefile >>> rename xen/common/{ => gzip}/gunzip.c (100%) >>> rename xen/common/{ => gzip}/inflate.c (100%) >> For inflate.c you will need to update also docs/misra/exclude-list.json > > Something like this? > > diff --git a/docs/misra/exclude-list.json b/

Re: [PATCH] docs: arm: Update where Xen should be loaded in memory

2024-04-11 Thread Luca Fancellu
> Signed-off-by: Michal Orzel > --- Reviewed-by: Luca Fancellu

Re: [PATCH v2 13/13] xen/arm: List static shared memory regions as /memory nodes

2024-04-15 Thread Luca Fancellu
Hi Julien, > On 15 Apr 2024, at 19:41, Julien Grall wrote: > > Hi Luca, > > On 09/04/2024 12:45, Luca Fancellu wrote: >> Currently Xen is not exporting the static shared memory regions >> to the device tree as /memory node, this commit is fixing this >> issue.

Re: [PATCH v2 13/13] xen/arm: List static shared memory regions as /memory nodes

2024-04-16 Thread Luca Fancellu
> On 16 Apr 2024, at 09:50, Julien Grall wrote: > > > > On 16/04/2024 07:27, Luca Fancellu wrote: >> Hi Julien, > > Hi Luca, > >>> On 15 Apr 2024, at 19:41, Julien Grall wrote: >>> >>> Hi Luca, >>> >>> On 09/

Re: [PATCH v2 13/13] xen/arm: List static shared memory regions as /memory nodes

2024-04-16 Thread Luca Fancellu
> On 16 Apr 2024, at 10:06, Julien Grall wrote: > > > > On 16/04/2024 09:59, Luca Fancellu wrote: >>> On 16 Apr 2024, at 09:50, Julien Grall wrote: >>> >>> >>> >>> On 16/04/2024 07:27, Luca Fancellu wrote: >>>>

Re: docs/misra: add R21.6 R21.14 R21.15 R21.16

2024-04-17 Thread Luca Fancellu
> + essentially enum type Also here. > + - > + >* - `Rule 21.17 > <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_21_17.c>`_ > - Mandatory > - Use of the string handling functions from shall not result > in > Apart from them, that I guess can be addressed on commit, it looks good to me, I’ve also tested that the changes don’t break convert_misra_doc.py build. Reviewed-by: Luca Fancellu Tested-by: Luca Fancellu

Re: [PATCH] public: xen: Define missing guest handle for int32_t

2024-04-17 Thread Luca Fancellu
| XEN_GUEST_HANDLE(int32_t) errs; > > Fix it. Also, drop guest handle definition for int given no further use. > > Fixes: afab29d0882f ("public: s/int/int32_t") > Signed-off-by: Michal Orzel > --- I’ve build it for arm64, arm32 and x86 Reviewed-by: Luca Fancellu Tested-by: Luca Fancellu

[PATCH v3 00/12] Static shared memory followup v2 - pt1

2024-04-18 Thread Luca Fancellu
atches, moved the patch related to the static memory helper. Luca Fancellu (8): xen/arm: Pass struct kernel_info parameter to make_{resv,shm}_memory_node xen/arm: Introduce a generic way to access memory bank structures xen/arm: Conditional compilation of kernel_info.shm_mem member x

[PATCH v3 02/12] xen/arm: avoid repetitive checking in process_shm_node

2024-04-18 Thread Luca Fancellu
From: Penny Zheng Putting overlap and overflow checking in the loop is causing repetitive operation, so this commit extracts both checking outside the loop. Signed-off-by: Penny Zheng Signed-off-by: Luca Fancellu Reviewed-by: Michal Orzel --- v2: - add Michal R-by v1: - Rework of https

[PATCH v3 04/12] xen/arm: Introduce a generic way to access memory bank structures

2024-04-18 Thread Luca Fancellu
new field of 'struct meminfo' named 'common'. - introduced KERNEL_INFO_INIT and BOOTINFO_INIT that from now on will be used to initialize 'struct kernel_info' and 'struct bootinfo' respectively, in order to initialize their 'struct memi

[PATCH v3 05/12] xen/arm: Conditional compilation of kernel_info.shm_mem member

2024-04-18 Thread Luca Fancellu
ue, protect the member with the Kconfig parameter and modify the signature of the only function using it to remove any reference to the member from outside the static-shmem module. Signed-off-by: Luca Fancellu Reviewed-by: Michal Orzel --- v2: - add Michal R-by - Removed the signature

<    4   5   6   7   8   9   10   11   12   13   >