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

2023-01-12 Thread Luca Fancellu
> On 11 Jan 2023, at 16:59, Julien Grall wrote: > > Hi Luca, > > On 11/01/2023 14:38, Luca Fancellu wrote: >> This serie is introducing the possibility for Dom0 and DomU guests to use >> sve/sve2 instructions. >> SVE feature introduces new instruction and

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

2023-01-13 Thread Luca Fancellu
> On 13 Jan 2023, at 08:53, Julien Grall wrote: > > Hi Luca, > > On 12/01/2023 10:46, Luca Fancellu wrote: >>> On 11 Jan 2023, at 17:16, Julien Grall wrote: >>> >>> Hi Luca, >>> >>> As this is an RFC, I will be mostly making gen

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

2023-01-13 Thread Luca Fancellu
diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c index 8ea3843ea8e8..27f38729302b 100644 --- a/xen/arch/arm/domain.c +++ b/xen/arch/arm/domain.c @@ -13,6 +13,7 @@ #include #include +#include #include #include #include >>

Re: [PATCH v4 09/14] xen/arm32: head: Remove restriction where to load Xen

2023-01-13 Thread Luca Fancellu
ove_temporary_mapping) > + The rest looks good to me, I’ve also built for arm64/32 and test this patch on fvp aarch32 mode, booting Dom0 and creating/running/destroying some guests. Reviewed-by: Luca Fancellu Tested-by: Luca Fancellu Cheers, Luca

Re: [PATCH v4 10/14] xen/arm32: head: Widen the use of the temporary mapping

2023-01-13 Thread Luca Fancellu
e to simplify the logic to identity map > Xen. > > Signed-off-by: Julien Grall > > Reviewed-by: Luca Fancellu I’ve also built for arm32 and test this patch on fvp aarch32 mode, booting Dom0 and creating/running/destroying some guests Tested-by: Luca Fancellu

Re: [PATCH v4 11/14] xen/arm64: Rework the memory layout

2023-01-13 Thread Luca Fancellu
annot be used as an > immediate. > > This reshuffle will make trivial to create a 1:1 mapping when Xen is > loaded below 2TB. > > Signed-off-by: Julien Grall > Reviewed-by: Luca Fancellu I’ve also built for arm64 and test this patch on fvp, booting Dom0 and creating/running/destroying some guests Tested-by: Luca Fancellu

Re: [PATCH v4 12/14] xen/arm64: mm: Introduce helpers to prepare/enable/disable the identity mapping

2023-01-13 Thread Luca Fancellu
remove the identity mapping > > Signed-off-by: Julien Grall > > Reviewed-by: Luca Fancellu I’ve also built for arm32/64 and test this patch on fvp, booting Dom0 and creating/running/destroying some guests Tested-by: Luca Fancellu

Re: [PATCH v4 13/14] xen/arm64: mm: Rework switch_ttbr()

2023-01-13 Thread Luca Fancellu
t past it. > > The arm32 code will use a different approach. So this issue is for now > only resolved on arm64. > > Signed-off-by: Julien Grall The sequence looks ok to me, also the reasoning about barriers and register dependencies discussed in the previous version. Reviewed-by: L

Re: [PATCH v4 14/14] xen/arm64: smpboot: Directly switch to the runtime page-tables

2023-01-13 Thread Luca Fancellu
t; - Remove arm32 code > --- Reviewed-by: Luca Fancellu I’ve also built for arm32/64 and test this patch (so this serie) on fvp, n1sdp, raspberry pi4, Juno, booting Dom0 and creating/running/destroying some guests, on a first shot everything works. Tested-by: Luca Fancellu I’ve left

Re: [PATCH v4 02/14] xen/arm64: flushtlb: Implement the TLBI repeat workaround for TLB flush by VA

2023-01-13 Thread Luca Fancellu
> On 13 Jan 2023, at 10:11, Julien Grall wrote: > > From: Julien Grall > > Looking at the Neoverse N1 errata document, it is not clear to me > why the TLBI repeat workaround is not applied for TLB flush by VA. > > The TBL flush by VA helpers are used in flush_xen_tlb_range_va_local() > and

Re: [PATCH v3 3/3] docs/doxygen: doxygen documentation for grant_table.h

2021-04-29 Thread Luca Fancellu
> On 29 Apr 2021, at 14:11, Jan Beulich wrote: > > On 29.04.2021 11:50, Luca Fancellu wrote: >>> On 29 Apr 2021, at 10:04, Jan Beulich wrote: >>> On 28.04.2021 16:59, Luca Fancellu wrote: >>>>> On 27 Apr 2021, at 14:57, Jan Beulich wrote: >

Re: [PATCH] public/gnttab: relax v2 recommendation

2021-04-30 Thread Luca Fancellu
ucture is maintained largely for > + * backwards compatibility. New guests are recommended to support using > + * version 2 to overcome version 1 limitations, but to be able to fall back > + * to version 1. > */ > #if __XEN_INTERFACE_VERSION__ < 0x0003020a > #define grant_entry_v1 grant_entry > Reviewed-by: Luca Fancellu Cheers, Luca

[PATCH v4 3/3] docs/doxygen: doxygen documentation for grant_table.h

2021-05-04 Thread Luca Fancellu
for grant table for Arm64 Signed-off-by: Luca Fancellu --- v4 changes: - Used @keepindent/@endkeepindent doxygen commands to keep text with spaces indentation. - drop changes to grant_entry_v1 comment, it will be changed and included in the docs in a future patch - Move docs .rst to "c

[PATCH v4 0/3] Use Doxygen and sphinx for html documentation

2021-05-04 Thread Luca Fancellu
OSS_COMPILE="aarch64-linux-gnu-" make -C docs XEN_TARGET_ARCH="arm64" sphinx-html now in docs/sphinx/html/ we have the generated docs starting from the index.html page. Luca Fancellu (3): docs: add doxygen support for html documentation docs: hypercalls sphinx skeleton for gener

[PATCH v4 2/3] docs: hypercalls sphinx skeleton for generated html

2021-05-04 Thread Luca Fancellu
Create a skeleton for the documentation about hypercalls Signed-off-by: Luca Fancellu --- .gitignore | 1 + docs/Makefile | 4 docs/hypercall-interfaces/arm32.rst| 4 docs/hypercall-interfaces/arm64.rst| 32

Re: [PATCH v4 3/3] docs/doxygen: doxygen documentation for grant_table.h

2021-05-04 Thread Luca Fancellu
> On 4 May 2021, at 12:48, Jan Beulich wrote: > > On 04.05.2021 11:46, Luca Fancellu wrote: >> @@ -451,11 +466,6 @@ DEFINE_XEN_GUEST_HANDLE(gnttab_transfer_t); >> * bytes to be copied. >> */ >> >> -#define _GNTCOPY_source_gref (0) &

[PATCH v5 2/3] docs: hypercalls sphinx skeleton for generated html

2021-05-04 Thread Luca Fancellu
Create a skeleton for the documentation about hypercalls Signed-off-by: Luca Fancellu --- .gitignore | 1 + docs/Makefile | 4 docs/hypercall-interfaces/arm32.rst| 4 docs/hypercall-interfaces/arm64.rst| 32

[PATCH v5 3/3] docs/doxygen: doxygen documentation for grant_table.h

2021-05-04 Thread Luca Fancellu
for grant table for Arm64 Signed-off-by: Luca Fancellu --- v5 changes: - Move GNTCOPY_* define next to the flags field v4 changes: - Used @keepindent/@endkeepindent doxygen commands to keep text with spaces indentation. - drop changes to grant_entry_v1 comment, it will be changed and included in

[PATCH v5 0/3] Use Doxygen and sphinx for html documentation

2021-05-04 Thread Luca Fancellu
OSS_COMPILE="aarch64-linux-gnu-" make -C docs XEN_TARGET_ARCH="arm64" sphinx-html now in docs/sphinx/html/ we have the generated docs starting from the index.html page. Luca Fancellu (3): docs: add doxygen support for html documentation docs: hypercalls sphinx skeleton for gener

Re: [PATCH v4 3/3] docs/doxygen: doxygen documentation for grant_table.h

2021-05-04 Thread Luca Fancellu
> On 4 May 2021, at 14:28, Jan Beulich wrote: > > On 04.05.2021 15:09, Luca Fancellu wrote: >>> On 4 May 2021, at 12:48, Jan Beulich wrote: >>> On 04.05.2021 11:46, Luca Fancellu wrote: >>>> @@ -451,11 +466,6 @@ DEFINE_XEN_GUEST_HANDLE(gnttab

Re: [PATCH v5 2/3] docs: hypercalls sphinx skeleton for generated html

2021-05-05 Thread Luca Fancellu
> On 4 May 2021, at 23:30, Stefano Stabellini wrote: > > On Tue, 4 May 2021, Luca Fancellu wrote: >> Create a skeleton for the documentation about hypercalls > > Why is there a difference between the arm32, arm64 and x86_64 skeletons? > Shouldn't just we have one

Re: [PATCH v5 3/3] docs/doxygen: doxygen documentation for grant_table.h

2021-05-06 Thread Luca Fancellu
> On 4 May 2021, at 23:27, Stefano Stabellini wrote: > > On Tue, 4 May 2021, 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 v5 3/3] docs/doxygen: doxygen documentation for grant_table.h

2021-05-06 Thread Luca Fancellu
> On 6 May 2021, at 10:58, Jan Beulich wrote: > > On 06.05.2021 10:48, Luca Fancellu wrote: >>> On 4 May 2021, at 23:27, Stefano Stabellini wrote: >>> On Tue, 4 May 2021, Luca Fancellu wrote: >>>> @@ -51,13 +55,10 @@ >>>> * know the real

Re: [PATCH] tools/xenstored: Prevent a buffer overflow in dump_state_node_perms()

2021-05-07 Thread Luca Fancellu
ad_state_global(const void *ctx, const void *state); > diff --git a/tools/xenstore/xenstored_domain.c > b/tools/xenstore/xenstored_domain.c > index 3d4d0649a243..580ed454a3f5 100644 > --- a/tools/xenstore/xenstored_domain.c > +++ b/tools/xenstore/xenstored_domain.c > @@ -1254,7 +12

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

2021-05-10 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 v6 3/9] docs: add doxygen templates

2021-05-10 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 v6 0/9] Use Doxygen and sphinx for html documentation

2021-05-10 Thread Luca Fancellu
OSS_COMPILE="aarch64-linux-gnu-" make -C docs XEN_TARGET_ARCH="arm64" sphinx-html now in docs/sphinx/html/ we have the generated docs starting from the index.html page. Luca Fancellu (9): docs: add doxygen configuration file docs: add Xen png logo for the doxygen documen

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

2021-05-10 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 --- m4/ax_python_module.m4 | 56 ++ m4

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

2021-05-10 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 v6 5/9] docs: add checks to configure for sphinx and doxygen

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

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

2021-05-10 Thread Luca Fancellu
be parsed by doxygen. The path sould be relative to the xen folder: E.g. xen/include/public/grant_table.h Signed-off-by: Luca Fancellu --- docs/xen-doxygen/doxy-preprocessor.py | 110 ++ docs/xen-doxygen/doxy_input.list | 0 docs/xen-doxygen/doxygen_include.h.in

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

2021-05-10 Thread Luca Fancellu
Create a skeleton for the documentation about hypercalls Signed-off-by: Luca Fancellu --- v6 changes: - Now every platform has the same sections in .rst files --- .gitignore | 1 + docs/Makefile | 4 docs/hypercall-interfaces/arm32.rst

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

2021-05-10 Thread Luca Fancellu
for grant table for Arm64 Signed-off-by: Luca Fancellu --- v6 changes: - Fix misaligned comment - Moved comments to make them display in the docs - Included more documentation in the docs (see output here: https://luca.fancellu.gitlab.io/xen-docs/hypercall-interfaces/common/grant_tables.html) v5

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

2021-05-10 Thread Luca Fancellu
for doxygen. Signed-off-by: Luca Fancellu --- .gitignore| 6 ++ docs/Makefile | 42 +++--- docs/conf.py | 48 +--- 3 files changed, 90 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore

Re: [PATCH v5 3/3] docs/doxygen: doxygen documentation for grant_table.h

2021-05-12 Thread Luca Fancellu
> On 11 May 2021, at 22:58, Stefano Stabellini wrote: > > On Thu, 6 May 2021, Jan Beulich wrote: >> An alternative to correcting the (as it seems) v2 related issues, it >> may be worth considering to extract only v1 documentation in this >> initial phase. > > FWIW I agree with Jan that "grant

Re: [PATCH v2 1/2] xen/char: console: Use const whenever we point to literal strings

2021-05-18 Thread Luca Fancellu
OGLVL_VAL_SZ, "%s/%s", lvl2opt[lower], lvl2opt[upper]); > } > > @@ -262,7 +263,7 @@ static int parse_guest_loglvl(const char *s) > return ret; > } > > -static char *loglvl_str(int lvl) > +static const char *loglvl_str(int lvl) > { > switch ( lvl ) > { > -- > 2.17.1 > Hi Julien, Seems good to me and very sensible. Reviewed-by: Luca Fancellu Cheers, Luca

Re: [PATCH] tools/xenstored: Remove unused parameter in check_domains()

2021-05-18 Thread Luca Fancellu
ls/xenstore/xenstored_domain.h > index dc9759171317..cc5147d7e747 100644 > --- a/tools/xenstore/xenstored_domain.h > +++ b/tools/xenstore/xenstored_domain.h > @@ -21,7 +21,7 @@ > > void handle_event(void); > > -void check_domains(bool restore); > +void check_domains(void); > > /* domid, mfn, eventchn, path */ > int do_introduce(struct connection *conn, struct buffered_data *in); > -- > 2.17.1 > > Reviewed-by: Luca Fancellu Cheers, Luca

Re: Deploy XEN Project

2021-05-19 Thread Luca Fancellu
> On 19 May 2021, at 06:59, Technologyrss Mail > wrote: > > Hi, > > I am new user for DEV XEN project on my Centos server. Please guide me how to > install & deploy XEN project on centos 7? > Hi, I think you might write to xen-users@, here the mailing lists for Xen https://xenproject.o

Re: [PATCH] x86/shadow: fix DO_UNSHADOW()

2021-05-19 Thread Luca Fancellu
eading indentation. Besides adding the missing braces, > also adjust the two oddly formatted if()-s in the macro. > > Fixes: 90629587e16e ("x86/shadow: replace stale literal numbers in > hash_{vcpu,domain}_foreach()") > Signed-off-by: Jan Beulich Reviewed-by: Luca Fancell

Re: [PATCH v6 0/9] Use Doxygen and sphinx for html documentation

2021-06-07 Thread Luca Fancellu
Hello Xen community, Can someone have a look on these patches? Some of them are acked but some others needs review. Many thanks! Cheers, Luca > On 10 May 2021, at 09:40, Luca Fancellu wrote: > > This serie introduce doxygen in the sphinx html docs generation. > One benefit is

Re: [PATCH 02/10] tools/xenstored: Introduce lu_get_connection() and use it

2021-06-21 Thread Luca Fancellu
t; > Signed-off-by: Julien Grall Reviewed-by: Luca Fancellu > --- > tools/xenstore/xenstored_control.c | 13 - > tools/xenstore/xenstored_control.h | 2 ++ > tools/xenstore/xenstored_core.c| 7 +++ > tools/xenstore/xenstored_core.h| 1 -

Re: [PATCH 03/10] tools/xenstore: Don't assume conn->in points to the LU request

2021-06-21 Thread Luca Fancellu
> On 16 Jun 2021, at 15:43, Julien Grall wrote: > > From: Julien Grall > > call_delayed() is currently assuming that conn->in is NULL when > handling delayed request. However, the connection is not paused. > Therefore new request can be processed and conn->in may be non-NULL > if we have onl

Re: [PATCH 04/10] tools/xenstored: Limit the number of requests a connection can delay

2021-06-21 Thread Luca Fancellu
gt; bypass the quota check. This would be useful when the function > is called from the restore code. > > Signed-off-by: Julien Grall Reviewed-by: Luca Fancellu > --- > tools/xenstore/xenstored_control.c | 2 +- > tools/xenstore/xenstored_core.c| 11 ++- > tools/x

Re: [PATCH 05/10] tools/xenstored: xenstored_core.h should include fcntl.h

2021-06-21 Thread Luca Fancellu
t; Fixes: cd831ee438 ("tools/xenstore: handle CLOEXEC flag for local files and > pipes") > Signed-off-by: Julien Grall Reviewed-by: Luca Fancellu > --- > tools/xenstore/xenstored_core.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tools/xenstore/xen

Re: [PATCH 06/10] tools/xenstored: Introduce a wrapper for conn->funcs->can_{read, write}

2021-06-21 Thread Luca Fancellu
ctions can now be static. Note that the implementations need > to be moved earlier in the file xenstored_domain.c to avoid > declaring the prototype. > > Signed-off-by: Julien Grall Reviewed-by: Luca Fancellu > --- > tools/xenstore/xenstored_core.c | 18 ++ >

Re: [PATCH 07/10] tools/xenstored: delay_request: don't assume conn->in == in

2021-06-21 Thread Luca Fancellu
ify any request. > > To prevent any future surprise, check if the request delayed is the > current one. > > Fixes: c5ca1404b4 ("tools/xenstore: add support for delaying execution of a > xenstore request") > Signed-off-by: Julien Grall Reviewed-by: Luca Fancellu &g

Re: [PATCH 08/10] tools/xenstored: Extend restore code to handle multiple input buffer

2021-06-21 Thread Luca Fancellu
want to bypass the quota check for delayed requests as > the new Xenstore may have a lower limit. > > Lastly, there is no need to change the specification as there was > no restriction on the number of in-flight requests preserved. > > Signed-off-by: Julien Grall Reviewed-by:

Re: [PATCH 09/10] tools/xenstored: Dump delayed requests

2021-06-21 Thread Luca Fancellu
-Update. > > Delayed requests are just complete "in" buffer. So the code is > refactored to allow sharing the code to dump "in" buffer. > > Signed-off-by: Julien Grall Reviewed-by: Luca Fancellu > --- > tools/xenstore/xenstored_core.c | 42 ++

Re: [PATCH 10/10] tools/xenstored: Delay new transaction while Live-Update is pending

2021-06-21 Thread Luca Fancellu
With this stop gap in place, domains with long running transactions will > still break when using -F, but other domains which starts a transaction > in the middle of Live-Update will continue to work. > > Signed-off-by: Julien Grall Reviewed-by: Luca Fancellu > --- > tools/xen

Re: [PATCH] tools/xenstored: Don't crash xenstored when Live-Update is cancelled

2021-06-21 Thread Luca Fancellu
ixes: af216a99fb ("tools/xenstore: add the basic framework for doing the > live update") > Signed-off-by: Julien Grall Reviewed-by: Luca Fancellu > > > > This is currently based on top of: > > https://lore.kernel.org/xen-devel/20210616144324.31652

Re: [PATCH 03/10] tools/xenstore: Don't assume conn->in points to the LU request

2021-06-24 Thread Luca Fancellu
> On 24 Jun 2021, at 08:34, Juergen Gross wrote: > > On 24.06.21 09:32, Juergen Gross wrote: >> On 16.06.21 16:43, Julien Grall wrote: >>> From: Julien Grall >>> >>> call_delayed() is currently assuming that conn->in is NULL when >>> handling delayed request. However, the connection is not p

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

2021-07-01 Thread Luca Fancellu
> On 23 Jun 2021, at 23:03, Stefano Stabellini wrote: > > On Mon, 10 May 2021, Luca Fancellu wrote: >> Add preprocessor called by doxygen before parsing headers, >> it will include in every header a doxygen_include.h file >> that provides missing defines and i

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

2021-07-01 Thread Luca Fancellu
> On 24 Jun 2021, at 00:33, Stefano Stabellini wrote: > > On Mon, 10 May 2021, Luca Fancellu wrote: >> Modify docs/Makefile to call doxygen and generate sphinx >> html documentation given the doxygen XML output. >> >> Modify docs/conf.py sphinx configura

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

2021-07-01 Thread Luca Fancellu
> On 24 Jun 2021, at 00:34, Stefano Stabellini wrote: > > On Mon, 10 May 2021, Luca Fancellu wrote: >> Create a skeleton for the documentation about hypercalls >> >> Signed-off-by: Luca Fancellu >> --- >> v6 changes: >> - Now every

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

2021-07-01 Thread Luca Fancellu
Hi Stefano, > On 24 Jun 2021, at 00:34, Stefano Stabellini wrote: > > On Mon, 10 May 2021, Luca Fancellu wrote: >> Modification to include/public/grant_table.h: >> >> 1) Add doxygen tags to: >> - Create Grant tables section >> - include variables i

Re: [PATCH for-4.19(?)] xen/arm: bootfdt: Fix device tree memory node probing

2024-06-26 Thread Luca Fancellu
he directmap > mappings". > > If this is too late for this patch to go in, we can backport it after the tree > re-opens. > --- It looks ok to me, Reviewed-by: Luca Fancellu I’ve also tested on FVP, I’ll put it through our CI and I’ll let you know. Tested-by: Luca Fancellu

Re: [PATCH for-4.20] xen/arm: dom0less: Add #redistributor-regions property to GICv3 node

2024-07-04 Thread Luca Fancellu
n/arm: if direct-map domain use native addresses for > GICv3") > Signed-off-by: Michal Orzel > --- Looks good to me! Reviewed-by: Luca Fancellu

Re: [PATCH 1/2] xen/kernel.h: Import __struct_group from Linux

2024-04-30 Thread Luca Fancellu
Hi Jan, > On 30 Apr 2024, at 12:43, Jan Beulich wrote: > > On 30.04.2024 13:09, Luca Fancellu wrote: >> --- a/xen/include/xen/kernel.h >> +++ b/xen/include/xen/kernel.h >> @@ -54,6 +54,27 @@ >> typeof_field(type, member) *__mptr = (ptr);

Re: [PATCH 2/2] xen/arm: Fix MISRA regression on R1.1, flexible array member not at the end

2024-04-30 Thread Luca Fancellu
Hi Jan, > On 30 Apr 2024, at 12:37, Jan Beulich wrote: > > On 30.04.2024 13:09, Luca Fancellu wrote: >> --- a/xen/arch/arm/include/asm/setup.h >> +++ b/xen/arch/arm/include/asm/setup.h >> @@ -64,18 +64,20 @@ struct membank { >> }; >> >> st

Re: [PATCH 1/2] xen/kernel.h: Import __struct_group from Linux

2024-05-01 Thread Luca Fancellu
> On 2 May 2024, at 07:09, Jan Beulich wrote: > > On 01.05.2024 08:54, Luca Fancellu wrote: >>> On 30 Apr 2024, at 12:43, Jan Beulich wrote: >>> On 30.04.2024 13:09, Luca Fancellu wrote: >>>> --- a/xen/include/xen/kernel.h >>>>

Re: [PATCH 2/2] xen/arm: Fix MISRA regression on R1.1, flexible array member not at the end

2024-05-01 Thread Luca Fancellu
> On 2 May 2024, at 07:14, Jan Beulich wrote: > > On 01.05.2024 08:57, Luca Fancellu wrote: >> Hi Jan, >> >>> On 30 Apr 2024, at 12:37, Jan Beulich wrote: >>> >>> On 30.04.2024 13:09, Luca Fancellu wrote: >>>> --- a/xen/arch

Re: [PATCH 2/2] xen/arm: Fix MISRA regression on R1.1, flexible array member not at the end

2024-05-02 Thread Luca Fancellu
> On 2 May 2024, at 07:43, Jan Beulich wrote: > > On 02.05.2024 08:33, Luca Fancellu wrote: >> >> >>> On 2 May 2024, at 07:14, Jan Beulich wrote: >>> >>> On 01.05.2024 08:57, Luca Fancellu wrote: >>>> Hi Jan, >>>&

Re: [PATCH 2/2] xen/arm: Fix MISRA regression on R1.1, flexible array member not at the end

2024-05-02 Thread Luca Fancellu
> >> In any case it would be used soon also for other architectures using >> bootinfo. > > Oh, would it? PPC people have plans on putting that interface in common: https://patchwork.kernel.org/project/xen-devel/patch/451705505ff7f80ec66c78cc2830196fa6e4090c.1712893887.git.sanasta...@raptoren

Re: [PATCH 2/2] xen/arm: Fix MISRA regression on R1.1, flexible array member not at the end

2024-05-02 Thread Luca Fancellu
> On 2 May 2024, at 11:30, Jan Beulich wrote: > > On 02.05.2024 12:12, Luca Fancellu wrote: >>>> In any case it would be used soon also for other architectures using >>>> bootinfo. >>> >>> Oh, would it? >> >> PPC people have

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

2024-05-07 Thread Luca Fancellu
Hi Julien, > On 7 May 2024, at 14:20, Julien Grall wrote: > > Hi Luca, > > On 23/04/2024 09:25, Luca Fancellu wrote: >> From: Penny Zheng >> We are doing foreign memory mapping for static shared memory, and >> there is a great possibility that it could be supe

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

2024-05-07 Thread Luca Fancellu
Hi Michal, Thanks for your review. > On 6 May 2024, at 14:24, Michal Orzel wrote: > > Hi Luca, > > On 23/04/2024 10:25, Luca Fancellu wrote: >> >> >> The current static shared memory code is using bootinfo banks when it >> needs to fin

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

2024-05-07 Thread Luca Fancellu
Hi Michal, >> >> +static int __init handle_shared_mem_bank(struct domain *d, paddr_t gbase, >> + bool owner_dom_io, >> + const char *role_str, >> + const struct membank *shm_ban

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

2024-05-07 Thread Luca Fancellu
Hi Michal, >> @@ -440,6 +431,26 @@ int __init process_shm_node(const void *fdt, int node, uint32_t address_cells, device_tree_get_reg(&cell, address_cells, address_cells, &paddr, &gaddr); size = dt_next_cell(size_cells, &cell); +if ( !IS_ALIGN

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

2024-05-07 Thread Luca Fancellu
Hi Michal, int __init process_shm(struct domain *d, struct kernel_info *kinfo, const struct dt_device_node *node) { @@ -249,32 +290,10 @@ int __init process_shm(struct domain *d, struct kernel_info *kinfo, if ( dt_property_read_str

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

2024-05-08 Thread Luca Fancellu
Hi Michal, > On 8 May 2024, at 13:09, Michal Orzel wrote: > > Hi Luca, > > On 23/04/2024 10:25, Luca Fancellu wrote: >> >> >> Handle the parsing of the 'xen,shared-mem' property when the host physical >> address is not provided, this commit

Re: [PATCH 2/2] xen/arm: Fix MISRA regression on R1.1, flexible array member not at the end

2024-05-08 Thread Luca Fancellu
> On 2 May 2024, at 19:35, Stefano Stabellini wrote: > > On Tue, 30 Apr 2024, Luca Fancellu wrote: >> Commit 2209c1e35b47 ("xen/arm: Introduce a generic way to access memory >> bank structures") introduced a MISRA regression for Rule 1.1 because a >> flexi

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

2024-05-09 Thread Luca Fancellu
Hi Michal, >> >>> +if ( shm_id_match ) >>>{ >>> -if ( strncmp(shm_id, shmem_extra[i].shm_id, >>> - MAX_SHM_ID_LENGTH) == 0 ) >>> +/* >>> + * Regions have same shm_id (cases): >>> + * 1) physical host address

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

2024-05-10 Thread Luca Fancellu
> On 10 May 2024, at 10:17, Michal Orzel wrote: > > Hi Luca, > > On 23/04/2024 10:25, Luca Fancellu wrote: >> >> >> This commit implements the logic to have the static shared memory banks >> from the Xen heap instead of having the host physical addre

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

2024-05-10 Thread Luca Fancellu
> On 10 May 2024, at 10:32, Michal Orzel wrote: > > Hi Luca, > > On 10/05/2024 11:25, Luca Fancellu wrote: >> >> >>> On 10 May 2024, at 10:17, Michal Orzel wrote: >>> >>> Hi Luca, >>> >>> On 23/04/2024 10:25, Luca F

Re: [RFC PATCH 1/2] xen/arm: Add DT reserve map regions to bootinfo.reserved_mem

2024-05-14 Thread Luca Fancellu
Hi Julien, Thanks for having a look on the patch, > On 13 May 2024, at 22:54, Julien Grall wrote: > > Hi Luca, > > On 25/04/2024 14:11, Luca Fancellu wrote: >> Currently the code is listing device tree reserve map regions >> as reserved memory for Xen,

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

2024-05-14 Thread Luca Fancellu
Hi Julien, > >> Note also that a foreign unmap resulting in a page free is also not >> the common case, as that should only happen when the foreign domain >> has been destroyed, or the page ballooned out, so to benchmark the >> worst case some effort will be needed in order to model this >> scena

Re: [RFC PATCH 1/2] xen/arm: Add DT reserve map regions to bootinfo.reserved_mem

2024-05-15 Thread Luca Fancellu
> On 14 May 2024, at 22:06, Julien Grall wrote: > > Hi, > > On 14/05/2024 08:53, Luca Fancellu wrote: >> Hi Julien, >> Thanks for having a look on the patch, >>> On 13 May 2024, at 22:54, Julien Grall wrote: >>> >>> Hi Luca, >>>

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

2024-05-15 Thread Luca Fancellu
hen the bank doesn't need to be allocated, however it will be convinient 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 --- v2 changes: - fix typo com

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

2024-05-15 Thread Luca Fancellu
, specifically for helping put extra references for foreign superpages. Modify relinquish_p2m_mapping as well to take into account preemption when type is foreign memory and order is above 9 (2MB). Signed-off-by: Penny Zheng Signed-off-by: Luca Fancellu --- v2: - Do not handle 1GB super page as there

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

2024-05-15 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 v2 5/7] xen/arm: Rework heap page allocation outside allocate_bank_memory

2024-05-15 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 --- v2: - Reduced scope of pg var in allocate_domheap_memory, removed not necessa

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

2024-05-15 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 --- v2 changes: -

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

2024-05-15 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 v2 4/7] xen/arm: Parse xen,shared-mem when host phys address is not provided

2024-05-15 Thread Luca Fancellu
nks that starts with INVALID_PADDR from any computation. The changes above holds because of this consideration. Signed-off-by: Luca Fancellu --- v2 changes: - fix comments, add parenthesis to some conditions, remove unneeded variables, remove else branch, increment counter in the for loop, skip

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

2024-05-15 Thread Luca Fancellu
om the heap and if it is, then assign_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 --- v2 changes: - add static inline get_shmem_heap

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

2024-05-16 Thread Luca Fancellu
Hi Michal, >> >> -/* >> - * "role" property is optional and if it is defined explicitly, >> - * then the owner domain is not the default "dom_io" domain. >> - */ >> -if ( dt_property_read_string(shm_node, "role", &role_str) == 0 ) >> -owner_dom_

Re: [PATCH v3 1/4] xen/arm/static-shmem: Static-shmem should be direct-mapped for direct-mapped domains

2024-05-20 Thread Luca Fancellu
> On 20 May 2024, at 12:24, Michal Orzel wrote: > > Hi Henry, > > +CC: Luca > > On 17/05/2024 05:21, Henry Wang wrote: >> >> >> Currently, users are allowed to map static shared memory in a >> non-direct-mapped way for direct-mapped domains. This can lead to >> clashing of guest memory spac

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

2024-05-20 Thread Luca Fancellu
Hi Michal, > On 20 May 2024, at 12:16, Michal Orzel wrote: > > Hi Luca, > > On 15/05/2024 16:26, Luca Fancellu wrote: >> >> >> This commit implements the logic to have the static shared memory banks >> from the Xen heap instead of having the host p

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

2024-05-20 Thread Luca Fancellu
>> >>> +struct shmem_membank_extra *bank_extra_info; +} alloc_heap_pages_cb_extra; + +static struct meminfo __initdata shm_heap_banks = { +.common.max_banks = NR_MEM_BANKS >>> Do we expect that many banks? >> >> Not really, but I was trying to don’t introduce ano

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

2024-05-22 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 v3 3/7] xen/p2m: put reference for level 2 superpage

2024-05-22 Thread Luca Fancellu
handle 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 --- v3: - Add reasoning why we don't support now 1GB superpage, remove level_

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

2024-05-22 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 v3 0/7] Static shared memory followup v2 - pt2

2024-05-22 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 v3 4/7] xen/arm: Parse xen,shared-mem when host phys address is not provided

2024-05-22 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 --- v3 changes: - fix typo in commit msg, add R-by Michal v2 changes: - fix comments, add parenthesis to some conditions, remove unneed

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

2024-05-22 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 v3 5/7] xen/arm: Rework heap page allocation outside allocate_bank_memory

2024-05-22 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 v3 6/7] xen/arm: Implement the logic for static shared memory from Xen heap

2024-05-22 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 --- v3 changes: - reworded commit msg section, swap r

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

2024-05-22 Thread Luca Fancellu
Hi Julien, > On 22 May 2024, at 14:25, Julien Grall wrote: > >> diff --git a/xen/arch/arm/mmu/p2m.c b/xen/arch/arm/mmu/p2m.c >> index 41fcca011cf4..b496266deef6 100644 >> --- a/xen/arch/arm/mmu/p2m.c >> +++ b/xen/arch/arm/mmu/p2m.c >> @@ -753,17 +753,9 @@ static int p2m_mem_access_radix_set(stru

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

2024-05-22 Thread Luca Fancellu
Hi Michal, >> for ( i = 0; i < mem->nr_banks; i++ ) >> { >> /* >> * Meet the following check: >> - * 1) The shm ID matches and the region exactly match >> - * 2) The shm ID doesn't match and the region doesn't overlap >> - * with an existing one >>

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

2024-05-24 Thread Luca Fancellu
handle 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 changes: - optimised the path to call put_page() on the foreign mapping as

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