Re: [PATCH v8] Preserve the EFI System Resource Table for dom0

2022-07-06 Thread Luca Fancellu
> On 6 Jul 2022, at 11:59, Jan Beulich wrote: > > On 06.07.2022 12:58, Demi Marie Obenour wrote: >> On Wed, Jul 06, 2022 at 12:55:50PM +0200, Jan Beulich wrote: >>> On 06.07.2022 12:44, Andrew Cooper wrote: >>>> On 06/07/2022 11:32, Luca Fancellu wrote: &

Re: [PATCH v4 1/2] xen/arm: smccc: add support for SMCCCv1.2 extended input/output registers

2022-07-08 Thread Luca Fancellu
seems that you agreed with Julien to update the commit message with a reference to the spec but maybe you forgot about that: https://patchwork.kernel.org/comment/24897413/ With these addressed: Reviewed-by: Luca Fancellu

Re: [XEN PATCH v3 01/25] tools/console: have one Makefile per program/directory

2022-07-08 Thread Luca Fancellu
$(LDLIBS_xenconsoled), use $(LDLIBS) instead. >Remove the need for $(CONSOLE_CFLAGS-y) and use $(CFLAGS-y) > instead. > > client: >Remove the unused $(LDLIBS_xenconsole) > > Signed-off-by: Anthony PERARD Hi Antony, It looks good to me. Reviewed-by: Luca Fancellu

Re: [XEN PATCH v3 02/25] tools/debugger/gdbsx: Fix and cleanup makefiles

2022-07-08 Thread Luca Fancellu
List targets in $(TARGETS). > - Remove "build" target. > - Cleanup "clean" targets. > - remove comments about the choice of "ar" instead of "ld" > - Use "$(AR)" instead of plain "ar". > > Signed-off-by: Anthony PERARD Hi Antony, Reviewed-by: Luca Fancellu

Re: [XEN PATCH v3 03/25] tools/examples: cleanup Makefile

2022-07-08 Thread Luca Fancellu
s with > a single call to $(INSTALL_DATA). > > Remove XEN_CONFIGS-y which isn't used. > > Remove "build" target. > > Add an empty line after the first comment. The comment isn't about > $(XEN_READMES), it is about the makefile as a whole. > > Signed-off-by: Anthony PERARD Hi Antony, Reviewed-by: Luca Fancellu

Re: [XEN PATCH v3 04/25] tools/firmware/hvmloader: rework Makefile

2022-07-08 Thread Luca Fancellu
> On 24 Jun 2022, at 17:04, Anthony PERARD wrote: > > Setup proper dependencies with libacpi so we don't need to run "make > hvmloader" in the "all" target. ("build.o" new prerequisite isn't > exactly proper but a side effect of building the $(DSDT_FILES) is to > generate the "ssdt_*.h" needed

Re: [PATCH v9] Preserve the EFI System Resource Table for dom0

2022-07-11 Thread Luca Fancellu
64 and xen.efi.” should be added in a section like this under your S-o-b: --- Tested using qemu-system-x86_64 and xen.efi. --- > > Signed-off-by: Demi Marie Obenour I’ve tested UEFI boot on an arm64 machine and Xen+Dom0+ACPI boots fine. So if in v10 you don’t change anything apart from the style

Re: [XEN PATCH v3 05/25] tools/fuzz/libelf: rework makefile

2022-07-11 Thread Luca Fancellu
is > makefile to subdirmk. Instead, we create symlinks to the source files. > > Since we are creating a new .gitignore for the links, also move the > existing entry to it. > > Signed-off-by: Anthony PERARD > — Hi Antony, Reviewed-by: Luca Fancellu

Re: [XEN PATCH v3 06/25] tools/fuzz/x86_instruction_emulator: rework makefile

2022-07-11 Thread Luca Fancellu
ace "-I." by "-iquote .", so it applies to double-quote includes > only. > > Rather than checking if a symlink exist, always regenerate the > symlink. So if the source tree changed location, the symlink is > updated. > > Since we are creating a new .gitignore for

Re: [XEN PATCH v3 04/25] tools/firmware/hvmloader: rework Makefile

2022-07-11 Thread Luca Fancellu
> On 11 Jul 2022, at 14:38, Anthony PERARD wrote: > > On Fri, Jul 08, 2022 at 03:39:00PM +0000, Luca Fancellu wrote: >>> On 24 Jun 2022, at 17:04, Anthony PERARD wrote: > [...] >>> For "roms.inc" target, use "$(SHELL)" instead of plain &

Re: [PATCH v2 1/5] xen/arm: Remove most of the *_VIRT_END defines

2022-07-21 Thread Luca Fancellu
is not present. > > Take the opportunity to rename BOOT_FDT_SLOT_SIZE to BOOT_FDT_VIRT_SIZE > for better consistency and use _AT(vaddr_t, ). > > Also take the opportunity to fix the coding style of the comment touched > in mm.c. > > Signed-off-by: Julien Grall > Hi Jul

Re: [PATCH v2 2/5] xen/arm32: mm: Consolidate the domheap mappings initialization

2022-07-21 Thread Luca Fancellu
Julien Grall > Hi Julien, With Bertrand's comment addressed: Reviewed-by: Luca Fancellu I’ve also tested with fvp using aarch32 configuration starting Dom0 and few guests and everything works. Tested-by: Luca Fancellu Cheers, Luca

Re: [XEN PATCH v3 07/25] tools/hotplug: cleanup Makefiles

2022-07-22 Thread Luca Fancellu
are we keeping them and the related code? Is it to keep a certain structure? However the changes works and looks good to me, so your choice if it needs to be addressed or not Reviewed-by: Luca Fancellu

Re: [XEN PATCH v3 08/25] tools/libfsimage: Cleanup makefiles

2022-07-22 Thread Luca Fancellu
k. > > iso9660/: >Remove the explicit dependency between fsys_iso9660.c and >iso9660.h, this is handled automaticaly by the .*.d dependency files, >and iso9660.h already exist. > > Signed-off-by: Anthony PERARD Hi Antony, Looks good to me Reviewed-by: Luca Fancellu

Re: [XEN PATCH v3 09/25] tools/xenpaging: Rework makefile

2022-07-22 Thread Luca Fancellu
y, Is it worth to mention also that POLICY now is now not recursively expanded? In any case the patch works as before: Reviewed-by: Luca Fancellu

Re: [XEN PATCH v3 10/25] tools/xentop: rework makefile

2022-07-22 Thread Luca Fancellu
o not > have to rely on them. > > Use $(TARGETS) with $(INSTALL_PROG), and thus install into the > directory rather than spelling the program name. > > In the "clean" rule, use $(RM) and remove all "*.o" instead of just > one object. > > Signed-off-by: Anthony PERARD > — Hi Antony, Nice, this does it with just one gcc invocation. Reviewed-by: Luca Fancellu

Re: [XEN PATCH v3 11/25] tools/xentrace: rework Makefile

2022-07-22 Thread Luca Fancellu
> On 24 Jun 2022, at 17:04, Anthony PERARD wrote: > > Remove "build" targets. > > Use "$(TARGETS)" to list binary to be built. > > Cleanup "clean" rule. > > Also drop conditional install of $(BIN) and $(LIBBIN) as those two > variables are now always populated. > > Signed-off-by: Anthony PE

Re: [XEN PATCH v3 21/25] tools/helper: Cleanup Makefile

2022-07-22 Thread Luca Fancellu
tools/helpers/Makefile > index 8d78ab1e90..7c9d671b32 100644 > --- a/tools/helpers/Makefile > +++ b/tools/helpers/Makefile > @@ -5,13 +5,13 @@ > XEN_ROOT = $(CURDIR)/../.. > include $(XEN_ROOT)/tools/Rules.mk > > -PROGS += xen-init-dom0 > +TARGETS += xen-init-dom0 Can th

Re: [XEN PATCH v3 22/25] tools/console: Use $(xenlibs-ldlibs,)

2022-07-22 Thread Luca Fancellu
> On 24 Jun 2022, at 17:04, Anthony PERARD wrote: > It wouldn’t hurt something as commit message :) > Signed-off-by: Anthony PERARD In any case the patch looks good: Reviewed-by: Luca Fancellu

Re: [XEN PATCH v3 24/25] tools: Add -Werror by default to all tools/

2022-07-22 Thread Luca Fancellu
PERARD Hi Antony, Looks good to me Reviewed-by: Luca Fancellu

[PATCH] common/memory: Fix ifdefs for ptdom_max_order

2022-07-25 Thread Luca Fancellu
In common/memory.c the ifdef code surrounding ptdom_max_order is using HAS_PASSTHROUGH instead of CONFIG_HAS_PASSTHROUGH, fix the problem using the correct macro. Fixes: e0d44c1f9461 ("build: convert HAS_PASSTHROUGH use to Kconfig") Signed-off-by: Luca Fancellu --- xen/common/me

[PATCH] arm/domain: fix comment for arch_set_info_guest

2022-07-25 Thread Luca Fancellu
The function arch_set_info_guest is not reached anymore through VCPUOP_initialise on arm, update the comment. Signed-off-by: Luca Fancellu --- xen/arch/arm/domain.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c index

Re: [PATCH] arm/vgic-v3: fix virq offset in the rank

2022-07-26 Thread Luca Fancellu
Hi Julien, >> /* Get the index in the rank */ >> - offset &= virq & INTERRUPT_RANK_MASK; >> + offset = virq & INTERRUPT_RANK_MASK; > > AFAICT, vgic_fetch_irouter() has the same problem. Can you update it here as > well? I think that function is ok, because in there we have: /* There is exactl

Re: [PATCH] xen/xsm: dummy.h: Fix MISRA C 2012 Directive 4.10 violation

2022-07-28 Thread Luca Fancellu
> On 27 Jul 2022, at 16:19, Xenia Ragiadakou wrote: > > Protect header file from being included more than once by adding ifndef guard. > > Signed-off-by: Xenia Ragiadakou It makes sense! Reviewed-by: Luca Fancellu

Re: [PATCH] arm/domain: fix comment for arch_set_info_guest

2022-07-28 Thread Luca Fancellu
> On 28 Jul 2022, at 19:07, Julien Grall wrote: > > Hi Luca, > > On 25/07/2022 15:46, Luca Fancellu wrote: >> The function arch_set_info_guest is not reached anymore through >> VCPUOP_initialise on arm, update the comment. >> Signed-off-by: Luca Fancellu &g

[PATCH v3 1/3] xen/cppcheck: add a way to exclude files from the scan

2023-03-03 Thread Luca Fancellu
ernal file that are listed but for example not built for the current architecture. Add documentation for the file. Signed-off-by: Luca Fancellu --- Changes from v2: - enforce excluded folder path to end with '/*', so update docs and drop the code that handled (badly)

[PATCH v3 2/3] xen/misra: add entries to exclude-list.json

2023-03-03 Thread Luca Fancellu
Add entries to the exclude-list.json for those files that need to be excluded from the analysis scan. Signed-off-by: Luca Fancellu Signed-off-by: Michal Orzel Reviewed-by: Stefano Stabellini --- This list is originated from Michal's work here: https://patchwork.kernel.org/project/xen-

[PATCH v3 0/3] xen/misra: create exclusion file list

2023-03-03 Thread Luca Fancellu
can't do direct changes to it to fix/deviate from findings. So we declare the file(s) here and we leave the burden of the misra compliance to the final user. Luca Fancellu (3): xen/cppcheck: add a way to exclude files from the scan xen/misra: add entries to exclude-list.json xen/cppcheck

[PATCH v3 3/3] xen/cppcheck: globally suppress unusedStructMember

2023-03-03 Thread Luca Fancellu
unusedStructMember warnings from cppcheck are not reliable and are causing a lot of false positives, suppress the checker globally for now. Signed-off-by: Luca Fancellu --- Changes from v2: - New patch --- xen/scripts/xen_analysis/cppcheck_analysis.py | 3 +++ 1 file changed, 3 insertions

Re: [PATCH v3 3/3] xen/cppcheck: globally suppress unusedStructMember

2023-03-03 Thread Luca Fancellu
> On 3 Mar 2023, at 20:55, Stefano Stabellini wrote: > > On Fri, 3 Mar 2023, Luca Fancellu wrote: >> unusedStructMember warnings from cppcheck are not reliable and >> are causing a lot of false positives, suppress the checker >> globally for now. >>

[PATCH v2 04/10] xen/arm: add SVE exception class handling

2023-03-15 Thread Luca Fancellu
SVE has a new exception class with code 0x19, introduce the new code and handle the exception. Signed-off-by: Luca Fancellu --- Changes from v1: - No changes Changes from RFC: - No changes --- xen/arch/arm/include/asm/processor.h | 1 + xen/arch/arm/traps.c | 12

[PATCH v2 03/10] xen/arm: Expose SVE feature to the guest

2023-03-15 Thread Luca Fancellu
When a guest is allowed to use SVE, expose the SVE features through the identification registers. Signed-off-by: Luca Fancellu --- Changes from v1: - No changes Changes from RFC: - No changes --- xen/arch/arm/arm64/vsysreg.c | 39 ++-- 1 file changed, 37

[PATCH v2 01/10] xen/arm: enable SVE extension for Xen

2023-03-15 Thread Luca Fancellu
compilers that does not support SVE. Signed-off-by: Luca Fancellu --- Changes from v1: - Add assert to vl_to_zcr, it is never called with vl==0, but just to be sure it won't in the future. Changes from RFC: - Moved restoring of cptr before an existing barrier (Julien) - Marked the fe

[PATCH v2 02/10] xen/arm: add sve_vl_bits field to domain

2023-03-15 Thread Luca Fancellu
zero means the guest is not allowed to use the feature. Check that the requested vector length is lower or equal to the platform supported vector length, otherwise fail on domain creation. Signed-off-by: Luca Fancellu --- Changes from v1: - no changes Changes from RFC: - restore zcr_el2 in

[PATCH v2 06/10] xen/arm: enable Dom0 to use SVE feature

2023-03-15 Thread Luca Fancellu
Add a command line parameter to allow Dom0 the use of SVE resources, the command line parameter dom0_sve controls the feature on this domain and sets the maximum SVE vector length for Dom0. Signed-off-by: Luca Fancellu --- Changes from v1: - No changes Changes from RFC: - Changed docs to

[PATCH v2 00/10] SVE feature for arm guests

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

[PATCH v2 07/10] xen/physinfo: encode Arm SVE vector length in arch_capabilities

2023-03-15 Thread Luca Fancellu
When the arm platform supports SVE, advertise the feature in the field arch_capabilities in struct xen_sysctl_physinfo by encoding the SVE vector length in it. Signed-off-by: Luca Fancellu --- Changes from v1: - Use only arch_capabilities and some defines to encode SVE VL (Bertrand, Stefano

[PATCH v2 09/10] xen/tools: add sve parameter in XL configuration

2023-03-15 Thread Luca Fancellu
Add sve parameter in XL configuration to allow guests to use SVE feature. Signed-off-by: Luca Fancellu --- Changes from v1: - updated to use arch_capabilities field for vector length Changes from RFC: - changed libxl_types.idl sve field to uint16 - now toolstack uses info from physinfo to

[PATCH v2 10/10] xen/arm: add sve property for dom0less domUs

2023-03-15 Thread Luca Fancellu
Add a device tree property in the dom0less domU configuration to enable the guest to use SVE. Update documentation. Signed-off-by: Luca Fancellu --- Changes from v1: - No changes Changes from RFC: - Changed documentation --- docs/misc/arm/device-tree/booting.txt | 9 + xen/arch/arm

[PATCH v2 08/10] tools: add physinfo arch_capabilities handling for Arm

2023-03-15 Thread Luca Fancellu
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. Signed-off-by: Luca Fancellu --- Changes from v1: - now SVE VL is encoded in arch_capabilities on Arm Changes from RFC: - new patch

[PATCH v2 05/10] arm/sve: save/restore SVE context switch

2023-03-15 Thread Luca Fancellu
the requested vector length and restore it on context switch, save/restore ZCR_EL1 value as well. Remove headers from sve.c that are already included using xen/sched.h. Signed-off-by: Luca Fancellu --- Changes from v1: - No changes Changes from RFC: - Moved zcr_el2 field introduction in this

Re: [PATCH v2 00/10] SVE feature for arm guests

2023-03-15 Thread Luca Fancellu
> On 15 Mar 2023, at 09:20, Jan Beulich wrote: > > On 15.03.2023 10:05, 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 registe

Re: [PATCH v2 02/10] xen/arm: add sve_vl_bits field to domain

2023-03-15 Thread Luca Fancellu
> On 15 Mar 2023, at 09:27, Jan Beulich wrote: > > On 15.03.2023 10:05, Luca Fancellu wrote: >> --- a/xen/include/public/arch-arm.h >> +++ b/xen/include/public/arch-arm.h >> @@ -304,6 +304,9 @@ struct xen_arch_domainconfig { >> uint16_t tee_type; >&g

Re: [PATCH v2 08/10] tools: add physinfo arch_capabilities handling for Arm

2023-03-15 Thread Luca Fancellu
15 Mar 2023, at 09:05, Luca Fancellu wrote: >> >> type arch_physinfo_cap_flags = >> - | ARM of arm_physinfo_cap_flag list >> + | ARM of int >> | X86 of x86_physinfo_cap_flag list >> > > I notice that other capabilities are split into a list

Re: [PATCH v2 07/10] xen/physinfo: encode Arm SVE vector length in arch_capabilities

2023-03-15 Thread Luca Fancellu
> On 15 Mar 2023, at 09:41, Jan Beulich wrote: > > On 15.03.2023 10:05, Luca Fancellu wrote: >> --- a/xen/include/public/sysctl.h >> +++ b/xen/include/public/sysctl.h >> @@ -94,6 +94,9 @@ struct xen_sysctl_tbuf_op { >> /* Max XEN_SYSCTL_PHYSCAP_* constant. Use

[PATCH v3 02/10] xen/arm: add SVE vector length field to the domain

2023-03-17 Thread Luca Fancellu
, otherwise fail on domain creation. Signed-off-by: Luca Fancellu --- Changes from v2: - rename field in xen_arch_domainconfig from "sve_vl_bits" to "sve_vl" and use the implicit padding after gic_version to store it, now this field is the VL/128. (Jan) - Created domainconfig_

[PATCH v3 01/10] xen/arm: enable SVE extension for Xen

2023-03-17 Thread Luca Fancellu
compilers that does not support SVE. Signed-off-by: Luca Fancellu --- Changes from v2: - renamed sve_asm.S in sve-asm.S, new files should not contain underscore in the name (Jan) Changes from v1: - Add assert to vl_to_zcr, it is never called with vl==0, but just to be sure it won't i

[PATCH v3 03/10] xen/arm: Expose SVE feature to the guest

2023-03-17 Thread Luca Fancellu
When a guest is allowed to use SVE, expose the SVE features through the identification registers. Signed-off-by: Luca Fancellu --- Changes from v2: - no changes Changes from v1: - No changes Changes from RFC: - No changes --- xen/arch/arm/arm64/vsysreg.c | 39

[PATCH v3 07/10] xen/physinfo: encode Arm SVE vector length in arch_capabilities

2023-03-17 Thread Luca Fancellu
When the arm platform supports SVE, advertise the feature in the field arch_capabilities in struct xen_sysctl_physinfo by encoding the SVE vector length in it. Signed-off-by: Luca Fancellu --- Changes from v2: - Remove XEN_SYSCTL_PHYSCAP_ARM_SVE_SHFT, use MASK_INSR and protect with ifdef

[PATCH v3 04/10] xen/arm: add SVE exception class handling

2023-03-17 Thread Luca Fancellu
SVE has a new exception class with code 0x19, introduce the new code and handle the exception. Signed-off-by: Luca Fancellu --- Changes from v2: - No changes Changes from v1: - No changes Changes from RFC: - No changes --- xen/arch/arm/include/asm/processor.h | 1 + xen/arch/arm/traps.c

[PATCH v3 08/10] tools: add physinfo arch_capabilities handling for Arm

2023-03-17 Thread Luca Fancellu
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. Signed-off-by: Luca Fancellu --- Changes from v2: - rename arm_arch_capabilities.h in arm-arch-capabilities.h, use MASK_EXTR. - Now

[PATCH v3 00/10] SVE feature for arm guests

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

[PATCH v3 06/10] xen/arm: enable Dom0 to use SVE feature

2023-03-17 Thread Luca Fancellu
Add a command line parameter to allow Dom0 the use of SVE resources, the command line parameter dom0_sve controls the feature on this domain and sets the maximum SVE vector length for Dom0. Signed-off-by: Luca Fancellu --- Changes from v2: - xen_domctl_createdomain field has changed into sve_vl

[PATCH v3 10/10] xen/arm: add sve property for dom0less domUs

2023-03-17 Thread Luca Fancellu
Add a device tree property in the dom0less domU configuration to enable the guest to use SVE. Update documentation. Signed-off-by: Luca Fancellu --- Changes from v2: - xen_domctl_createdomain field name has changed into sve_vl and its value is the VL/128, use domainconfig_encode_vl to

[PATCH v3 09/10] xen/tools: add sve parameter in XL configuration

2023-03-17 Thread Luca Fancellu
Add sve parameter in XL configuration to allow guests to use SVE feature. Signed-off-by: Luca Fancellu Acked-by: George Dunlap --- Changes from v2: - domain configuration field name has changed to sve_vl, also its value now is VL/128. - Add Ack-by George for the Golang bits Changes from v1

[PATCH v3 05/10] arm/sve: save/restore SVE context switch

2023-03-17 Thread Luca Fancellu
the requested vector length and restore it on context switch, save/restore ZCR_EL1 value as well. Remove headers from sve.c that are already included using xen/sched.h. Signed-off-by: Luca Fancellu --- Changes from v2: - No changes Changes from v1: - No changes Changes from RFC: - Moved zcr_el2

Re: [PATCH v3 08/10] tools: add physinfo arch_capabilities handling for Arm

2023-03-22 Thread Luca Fancellu
> On 20 Mar 2023, at 11:01, Christian Lindig wrote: > > > >> On 17 Mar 2023, at 13:19, Luca Fancellu wrote: >> >> >> arch_cap_flags = caml_alloc_small(1, arch_cap_flags_tag); >> Store_field(arch_cap_flags, 0, arch_cap_list); >> Store_field(

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

2023-03-22 Thread Luca Fancellu
> On 20 Mar 2023, at 09:09, Jan Beulich wrote: > > On 17.03.2023 14:19, Luca Fancellu wrote: >> @@ -744,6 +773,9 @@ int arch_domain_create(struct domain *d, >> if ( (rc = domain_vpci_init(d)) != 0 ) >> goto fail; >> >> +/* Copy and deco

Re: [PATCH v3 06/10] xen/arm: enable Dom0 to use SVE feature

2023-03-22 Thread Luca Fancellu
> On 20 Mar 2023, at 09:13, Jan Beulich wrote: > > On 17.03.2023 14:19, Luca Fancellu wrote: >> --- a/docs/misc/xen-command-line.pandoc >> +++ b/docs/misc/xen-command-line.pandoc >> @@ -1005,6 +1005,19 @@ restrictions set up here. Note that the values to be >&g

Re: [PATCH 1/2] xen/arm: domain_build: Check return code of domain_vpl011_init

2023-03-22 Thread Luca Fancellu
r vPL011") > Signed-off-by: Michal Orzel Hi Michal, Looks good to me, Reviewed-by: Luca Fancellu

Re: [PATCH 2/2] xen/arm: vpl011: Fix domain_vpl011_init error path

2023-03-22 Thread Luca Fancellu
be done instead on an error path > from vgic_reserve_virq(). Also, take the opportunity to return -ENOMEM > instead of -EINVAL when memory allocation fails. > > Fixes: 1ee1e4b0d1ff ("xen/arm: Allow vpl011 to be used by DomU") > Signed-off-by: Michal Orzel Also this one looks good to me: Reviewed-by: Luca Fancellu

Re: [PATCH v2 2/2] xen/arm: vpl011: Fix domain_vpl011_init error path

2023-03-24 Thread Luca Fancellu
s. > > Fixes: 1ee1e4b0d1ff ("xen/arm: Allow vpl011 to be used by DomU") > Signed-off-by: Michal Orzel Reviewed-by: Luca Fancellu

[PATCH v4 00/12] SVE feature for arm guests

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

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

2023-03-27 Thread Luca Fancellu
-off-by: Luca Fancellu --- Changes from v3: - don't use fixed types when not needed, use encoded value also in arch_domain so rename sve_vl_bits in sve_vl. (Jan) - rename domainconfig_decode_vl to sve_decode_vl because it will now be used also to decode from arch_domain value - change s

[PATCH v4 03/12] xen/arm: Expose SVE feature to the guest

2023-03-27 Thread Luca Fancellu
When a guest is allowed to use SVE, expose the SVE features through the identification registers. Signed-off-by: Luca Fancellu --- Changes from v3: - no changes Changes from v2: - no changes Changes from v1: - No changes Changes from RFC: - No changes --- xen/arch/arm/arm64/vsysreg.c | 39

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

2023-03-27 Thread Luca Fancellu
compilers that does not support SVE. Signed-off-by: Luca Fancellu --- Changes from v3: - no changes Changes from v2: - renamed sve_asm.S in sve-asm.S, new files should not contain underscore in the name (Jan) Changes from v1: - Add assert to vl_to_zcr, it is never called with vl==0, but

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

2023-03-27 Thread Luca Fancellu
the requested vector length and restore it on context switch, save/restore ZCR_EL1 value as well. Remove headers from sve.c that are already included using xen/sched.h. Signed-off-by: Luca Fancellu --- Changes from v3: - don't use fixed len types when not needed (Jan) - now VL is an encoded

[PATCH v4 04/12] xen/arm: add SVE exception class handling

2023-03-27 Thread Luca Fancellu
SVE has a new exception class with code 0x19, introduce the new code and handle the exception. Signed-off-by: Luca Fancellu --- Changes from v3: - No changes Changes from v2: - No changes Changes from v1: - No changes Changes from RFC: - No changes --- xen/arch/arm/include/asm/processor.h

[PATCH v4 08/12] xen/physinfo: encode Arm SVE vector length in arch_capabilities

2023-03-27 Thread Luca Fancellu
When the arm platform supports SVE, advertise the feature in the field arch_capabilities in struct xen_sysctl_physinfo by encoding the SVE vector length in it. Signed-off-by: Luca Fancellu --- Changes from v3: - domainconfig_encode_vl is now named sve_encode_vl Changes from v2: - Remove

[PATCH v4 06/12] xen/common: add dom0 xen command line argument for Arm

2023-03-27 Thread Luca Fancellu
separated sub-options. No functional changes are intended. Signed-off-by: Luca Fancellu --- Changes from v3: - new patch --- xen/arch/arm/domain_build.c | 5 xen/arch/x86/dom0_build.c | 46 ++--- xen/common/domain.c | 23 +++ xen

[PATCH v4 07/12] xen: enable Dom0 to use SVE feature

2023-03-27 Thread Luca Fancellu
-off-by: Luca Fancellu --- Changes from v3: - Don't use fixed len types when not needed (Jan) - renamed domainconfig_encode_vl to sve_encode_vl - Use a sub argument of dom0= to enable the feature (Jan) - Add parse_integer() function Changes from v2: - xen_domctl_createdomain field has ch

[PATCH v4 11/12] xen/arm: add sve property for dom0less domUs

2023-03-27 Thread Luca Fancellu
Add a device tree property in the dom0less domU configuration to enable the guest to use SVE. Update documentation. Signed-off-by: Luca Fancellu --- Changes from v3: - Now domainconfig_encode_vl is named sve_encode_vl Changes from v2: - xen_domctl_createdomain field name has changed into

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

2023-03-27 Thread Luca Fancellu
-macros.h in python/xen/lowlevel/xc/xc.c because it is already included by the arm-arch-capabilities.h header. Signed-off-by: Luca Fancellu Acked-by: George Dunlap Acked-by: Christian Lindig --- Changes from v3: - add Ack-by for the Golang bits (George) - add Ack-by for the OCaml tools (Christian

[PATCH v4 10/12] xen/tools: add sve parameter in XL configuration

2023-03-27 Thread Luca Fancellu
Add sve parameter in XL configuration to allow guests to use SVE feature. Signed-off-by: Luca Fancellu Acked-by: George Dunlap --- Changes from v3: - no changes Changes from v2: - domain configuration field name has changed to sve_vl, also its value now is VL/128. - Add Ack-by George for

[PATCH v4 12/12] xen/changelog: Add SVE and "dom0" options to the changelog for Arm

2023-03-27 Thread Luca Fancellu
Arm now can use the "dom0=" Xen command line option and the support for guests running SVE instructions is added, put entries in the changelog. Signed-off-by: Luca Fancellu --- Change from v3: - new patch --- CHANGELOG.md | 5 + 1 file changed, 5 insertions(+) diff --git a/CHAN

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

2023-03-29 Thread Luca Fancellu
Hi Jan, Thank you for your review, very appreciated, > On 28 Mar 2023, at 10:36, Jan Beulich wrote: > > On 27.03.2023 12:59, Luca Fancellu wrote: >> @@ -43,8 +44,16 @@ register_t compute_max_zcr(void) >> } >> >> /* Takes a vector length in bits

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

2023-03-29 Thread Luca Fancellu
> On 29 Mar 2023, at 11:32, Jan Beulich wrote: > > On 29.03.2023 12:01, Luca Fancellu wrote: >>> On 28 Mar 2023, at 10:36, Jan Beulich wrote: >>> Yet another question is whether both range checks (against >>> SVE_VL_MAX_BITS and zcr_max_bits) are actually

Re: [PATCH v4 07/12] xen: enable Dom0 to use SVE feature

2023-03-29 Thread Luca Fancellu
> On 28 Mar 2023, at 11:08, Jan Beulich wrote: > > On 27.03.2023 12:59, Luca Fancellu wrote: >> @@ -838,6 +838,18 @@ Controls for how dom0 is constructed on x86 systems. >> >> If using this option is necessary to fix an issue, please report a bug. >> &g

Re: [PATCH v4 07/12] xen: enable Dom0 to use SVE feature

2023-03-29 Thread Luca Fancellu
> >> @@ -61,7 +62,12 @@ custom_param("dom0_mem", parse_dom0_mem); >> >> int __init parse_arch_dom0_param(const char *str_begin, const char *str_end) >> { >> -return -1; >> +int rc = 0; >> + >> +if ( sve_parse_dom0_param(str_begin, str_end) < 0 ) >> +rc = -EINVAL; > > ... can'

Re: [PATCH v4 07/12] xen: enable Dom0 to use SVE feature

2023-03-29 Thread Luca Fancellu
> On 29 Mar 2023, at 13:24, Jan Beulich wrote: > > On 29.03.2023 14:06, Luca Fancellu wrote: >>>> @@ -61,7 +62,12 @@ custom_param("dom0_mem", parse_dom0_mem); >>>> >>>> int __init parse_arch_dom0_param(const char *str_begin, const char &

Re: [PATCH v4 08/12] xen/physinfo: encode Arm SVE vector length in arch_capabilities

2023-03-30 Thread Luca Fancellu
> On 28 Mar 2023, at 11:14, Jan Beulich wrote: > > On 27.03.2023 12:59, Luca Fancellu wrote: >> --- a/xen/arch/arm/arm64/sve.c >> +++ b/xen/arch/arm/arm64/sve.c >> @@ -124,3 +124,15 @@ int __init sve_parse_dom0_param(const char *str_begin, >> const

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

2023-04-04 Thread Luca Fancellu
Hi Anthony, Thank you for your review > On 30 Mar 2023, at 17:49, Anthony PERARD wrote: > > On Mon, Mar 27, 2023 at 11:59:41AM +0100, Luca Fancellu wrote: >> --- >> tools/golang/xenlight/helpers.gen.go| 2 ++ >> tools/golang/xenlight/types.gen.go | 1

Re: [PATCH v4 10/12] xen/tools: add sve parameter in XL configuration

2023-04-04 Thread Luca Fancellu
Hi Anthony, Thanks for your review > On 31 Mar 2023, at 15:23, Anthony PERARD wrote: > > On Mon, Mar 27, 2023 at 11:59:42AM +0100, Luca Fancellu wrote: >> diff --git a/docs/man/xl.cfg.5.pod.in b/docs/man/xl.cfg.5.pod.in >> index 10f37990be57..adf48fe8ac1d 100644 >&

Re: [PATCH v4 10/12] xen/tools: add sve parameter in XL configuration

2023-04-05 Thread Luca Fancellu
Hi Anthony, >> >> Yes I can change it, a need to do it anyway because I think also here, the >> suggestion >> From Jan can apply and we could pass a negative value that means “max VL >> supported >> by the platform" > > Well, it's a config file, not a C ABI, so max allowed here doesn't have to

[PATCH v5 03/12] xen/arm: Expose SVE feature to the guest

2023-04-12 Thread Luca Fancellu
When a guest is allowed to use SVE, expose the SVE features through the identification registers. Signed-off-by: Luca Fancellu --- CHanges from v4: - no changes Changes from v3: - no changes Changes from v2: - no changes Changes from v1: - No changes Changes from RFC: - No changes --- xen

[PATCH v5 04/12] xen/arm: add SVE exception class handling

2023-04-12 Thread Luca Fancellu
SVE has a new exception class with code 0x19, introduce the new code and handle the exception. Signed-off-by: Luca Fancellu --- Changes from v4: - No changes Changes from v3: - No changes Changes from v2: - No changes Changes from v1: - No changes Changes from RFC: - No changes --- xen

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

2023-04-12 Thread Luca Fancellu
compilers that does not support SVE. Signed-off-by: Luca Fancellu --- Changes from v4: - don't use fixed types in vl_to_zcr, forgot to address that in v3, by mistake I changed that in patch 2, fixing now (Jan) Changes from v3: - no changes Changes from v2: - renamed sve_asm.S in sve-

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

2023-04-12 Thread Luca Fancellu
the requested vector length and restore it on context switch, save/restore ZCR_EL1 value as well. Remove headers from sve.c that are already included using xen/sched.h. Signed-off-by: Luca Fancellu --- Changes from v4: - No changes Changes from v3: - don't use fixed len types when not needed

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

2023-04-12 Thread Luca Fancellu
-off-by: Luca Fancellu --- Changes from v4: - Return 0 in get_sys_vl_len() if sve is not supported, code style fix, removed else if since the conditions can't fallthrough, removed not needed condition checking for VL bits validity because it's already covered, so delete i

[PATCH v5 00/12] SVE feature for arm guests

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

[PATCH v5 07/12] xen: enable Dom0 to use SVE feature

2023-04-12 Thread Luca Fancellu
. Signed-off-by: Luca Fancellu --- Changes from v4: - Negative values as user param means max supported HW VL (Jan) - update documentation, make use of no_config_param(), rename parse_integer into parse_signed_integer and take long long *, also put a comment on the -2 return condition

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

2023-04-12 Thread Luca Fancellu
-macros.h in python/xen/lowlevel/xc/xc.c because it is already included by the arm-arch-capabilities.h header. Signed-off-by: Luca Fancellu Acked-by: George Dunlap Acked-by: Christian Lindig --- Changes from v4: - Move arm-arch-capabilities.h into xen-tools/, add LIBXL_HAVE_, fixed python return

[PATCH v5 11/12] xen/arm: add sve property for dom0less domUs

2023-04-12 Thread Luca Fancellu
Add a device tree property in the dom0less domU configuration to enable the guest to use SVE. Update documentation. Signed-off-by: Luca Fancellu --- Changes from v4: - Now it is possible to specify the property "sve" for dom0less device tree node without any value, that means th

[PATCH v5 08/12] xen/physinfo: encode Arm SVE vector length in arch_capabilities

2023-04-12 Thread Luca Fancellu
When the arm platform supports SVE, advertise the feature in the field arch_capabilities in struct xen_sysctl_physinfo by encoding the SVE vector length in it. Signed-off-by: Luca Fancellu --- Changes from v4: - Write arch_capabilities from arch_do_physinfo instead of using stub functions

[PATCH v5 06/12] xen/common: add dom0 xen command line argument for Arm

2023-04-12 Thread Luca Fancellu
separated sub-options. No functional changes are intended. Signed-off-by: Luca Fancellu Reviewed-by: Jan Beulich --- Changes from v4: - return EINVAL in Arm implementation of parse_arch_dom0_param, shorten variable name in the funtion from str_begin, str_end to s, e. Removed variable rc from

[PATCH v5 10/12] xen/tools: add sve parameter in XL configuration

2023-04-12 Thread Luca Fancellu
Add sve parameter in XL configuration to allow guests to use SVE feature. Signed-off-by: Luca Fancellu --- Changes from v4: - Rename sve field to sve_vl (Anthony), changed type to libxl_sve_type - Sanity check of sve field in libxl instead of xl, update docs (Anthony) - drop Ack-by from

[PATCH v5 12/12] xen/changelog: Add SVE and "dom0" options to the changelog for Arm

2023-04-12 Thread Luca Fancellu
Arm now can use the "dom0=" Xen command line option and the support for guests running SVE instructions is added, put entries in the changelog. Signed-off-by: Luca Fancellu --- Changes from v4: - No changes Change from v3: - new patch --- CHANGELOG.md | 5 + 1 file changed, 5

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

2023-04-13 Thread Luca Fancellu
Hi Julien, >> @@ -594,6 +597,7 @@ int arch_sanitise_domain_config(struct >> xen_domctl_createdomain *config) >> unsigned int max_vcpus; >> unsigned int flags_required = (XEN_DOMCTL_CDF_hvm | XEN_DOMCTL_CDF_hap); >> unsigned int flags_optional = (XEN_DOMCTL_CDF_iommu | >> XEN_DOM

Re: [PATCH v5 04/12] xen/arm: add SVE exception class handling

2023-04-13 Thread Luca Fancellu
>> --- a/xen/arch/arm/traps.c >> +++ b/xen/arch/arm/traps.c >> @@ -2160,6 +2160,13 @@ void do_trap_guest_sync(struct cpu_user_regs *regs) >> perfc_incr(trap_sysreg); >> do_sysreg(regs, hsr); >> break; >> +case HSR_EC_SVE: >> +GUEST_BUG_ON(regs_mode_is_32bit(r

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

2023-04-13 Thread Luca Fancellu
> On 13 Apr 2023, at 14:30, Julien Grall wrote: > > > > On 13/04/2023 14:24, Luca Fancellu wrote: >> Hi Julien, > > Hi Luca, > >>>> @@ -594,6 +597,7 @@ int arch_sanitise_domain_config(struct >>>> xen_domctl_createdomain *config) &g

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