[linux-linus test] 185902: regressions - FAIL

2024-05-02 Thread osstest service owner
flight 185902 linux-linus real [real] flight 185905 linux-linus real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/185902/ http://logs.test-lab.xenproject.org/osstest/logs/185905/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be

[ovmf test] 185904: all pass - PUSHED

2024-05-02 Thread osstest service owner
flight 185904 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/185904/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 248aa153f65866f46b5370ac2ef7dfaf3af72480 baseline version: ovmf

[linux-6.1 test] 185901: tolerable FAIL - PUSHED

2024-05-02 Thread osstest service owner
flight 185901 linux-6.1 real [real] flight 185903 linux-6.1 real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/185901/ http://logs.test-lab.xenproject.org/osstest/logs/185903/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking):

Re: [PATCH] tools/tests: don't let test-xenstore write nodes exceeding default size

2024-05-02 Thread Andrew Cooper
On 02/05/2024 2:25 pm, Andrew Cooper wrote: > On 02/05/2024 2:21 pm, Juergen Gross wrote: >> Today test-xenstore will write nodes with 3000 bytes node data. This >> size is exceeding the default quota for the allowed node size. While >> working in dom0 with C-xenstored, OCAML-xenstored does not

Re: [PATCH v4 15/17] xen: mapcache: Remove assumption of RAMBlock with 0 offset

2024-05-02 Thread Stefano Stabellini
On Thu, 2 May 2024, Edgar E. Iglesias wrote: > On Thu, May 2, 2024 at 8:53 PM Stefano Stabellini > wrote: > > > > +Xenia > > > > On Thu, 2 May 2024, Edgar E. Iglesias wrote: > > > On Wed, May 1, 2024 at 11:24 PM Stefano Stabellini > > > wrote: > > > > > > > > On Tue, 30 Apr 2024, Edgar E.

Re: [PATCH v4 16/17] xen: mapcache: Add support for grant mappings

2024-05-02 Thread Edgar E. Iglesias
On Thu, May 2, 2024 at 9:18 PM Stefano Stabellini wrote: > > On Tue, 30 Apr 2024, Edgar E. Iglesias wrote: > > From: "Edgar E. Iglesias" > > > > Add a second mapcache for grant mappings. The mapcache for > > grants needs to work with XC_PAGE_SIZE granularity since > > we can't map larger ranges

Re: [PATCH v4 15/17] xen: mapcache: Remove assumption of RAMBlock with 0 offset

2024-05-02 Thread Edgar E. Iglesias
On Thu, May 2, 2024 at 8:53 PM Stefano Stabellini wrote: > > +Xenia > > On Thu, 2 May 2024, Edgar E. Iglesias wrote: > > On Wed, May 1, 2024 at 11:24 PM Stefano Stabellini > > wrote: > > > > > > On Tue, 30 Apr 2024, Edgar E. Iglesias wrote: > > > > From: "Edgar E. Iglesias" > > > > > > > > The

Re: [PATCH v4 16/17] xen: mapcache: Add support for grant mappings

2024-05-02 Thread Stefano Stabellini
On Tue, 30 Apr 2024, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Add a second mapcache for grant mappings. The mapcache for > grants needs to work with XC_PAGE_SIZE granularity since > we can't map larger ranges than what has been granted to us. > > Like with foreign mappings

Re: [PATCH v4 15/17] xen: mapcache: Remove assumption of RAMBlock with 0 offset

2024-05-02 Thread Stefano Stabellini
+Xenia On Thu, 2 May 2024, Edgar E. Iglesias wrote: > On Wed, May 1, 2024 at 11:24 PM Stefano Stabellini > wrote: > > > > On Tue, 30 Apr 2024, Edgar E. Iglesias wrote: > > > From: "Edgar E. Iglesias" > > > > > > The current mapcache assumes that all memory is mapped > > > in a single RAM MR

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

2024-05-02 Thread Stefano Stabellini
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 > flexible array member is introduced in the middle of a struct, furthermore > this is using a GCC extension

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

2024-05-02 Thread Stefano Stabellini
On Tue, 30 Apr 2024, Luca Fancellu wrote: > Import __struct_group from Linux, commit 50d7bd38c3aa > ("stddef: Introduce struct_group() helper macro"), in order to > allow the access through the anonymous structure to the members > without having to write also the name, e.g: > > struct foo { >

Re: [XEN PATCH v2] automation/eclair: add deviation of MISRA C:2012 Rule 14.4

2024-05-02 Thread Stefano Stabellini
On Thu, 2 May 2024, Federico Serafini wrote: > Update ECLAIR configuration to take into account the deviations > agreed during MISRA meetings. > > Amend an existing entry of Rule 14.4 in deviations-rst: > it is not a project-wide deviation. > > Tag Rule 14.4 as clean for arm. > > Signed-off-by:

Re: [PATCH] xen/Kconfig: Drop the final remnants of ---help---

2024-05-02 Thread Stefano Stabellini
On Thu, 2 May 2024, Andrew Cooper wrote: > We deprecated the use of ---help--- a while ago, but a lot of new content > copy bad examples. Convert the remaining instances, and update > Kconfig's parser to no longer recongise it. > > This now causes builds to fail with: > > Kconfig.debug:8:

Re: [PATCH v6 8/8] xen: allow up to 16383 cpus

2024-05-02 Thread Stefano Stabellini
On Mon, 29 Apr 2024, Julien Grall wrote: > Hi Juergen, > > On 29/04/2024 12:28, Jürgen Groß wrote: > > On 29.04.24 13:04, Julien Grall wrote: > > > Hi Juergen, > > > > > > Sorry for the late reply. > > > > > > On 29/04/2024 11:33, Juergen Gross wrote: > > > > On 08.04.24 09:10, Jan Beulich

Re: [PATCH v1.1] xen/commom/dt-overlay: Fix missing lock when remove the device

2024-05-02 Thread Stefano Stabellini
On Fri, 26 Apr 2024, Henry Wang wrote: > If CONFIG_DEBUG=y, below assertion will be triggered: > (XEN) Assertion 'rw_is_locked(_host_lock)' failed at > drivers/passthrough/device_tree.c:146 > (XEN) [ Xen-4.19-unstable  arm64  debug=y  Not tainted ] > (XEN) CPU:    0 > (XEN) PC:

[PATCH] xen/Kconfig: Drop the final remnants of ---help---

2024-05-02 Thread Andrew Cooper
We deprecated the use of ---help--- a while ago, but a lot of new content copy bad examples. Convert the remaining instances, and update Kconfig's parser to no longer recongise it. This now causes builds to fail with: Kconfig.debug:8: syntax error Kconfig.debug:7: unknown statement

Re: [PATCH 2/3] xen/arm, tools: Add a new HVM_PARAM_MAGIC_BASE_PFN key in HVMOP

2024-05-02 Thread Stefano Stabellini
On Fri, 26 Apr 2024, Henry Wang wrote: > For use cases such as Dom0less PV drivers, a mechanism to communicate > Dom0less DomU's static data with the runtime control plane (Dom0) is > needed. Since on Arm HVMOP is already the existing approach to address > such use cases (for example the

Re: [PATCH 07/15] xen/overlay: Enable device tree overlay assignment to running domains

2024-05-02 Thread Stefano Stabellini
On Tue, 30 Apr 2024, Henry Wang wrote: > Hi Julien, > > On 4/30/2024 1:34 AM, Julien Grall wrote: > > On 29/04/2024 04:36, Henry Wang wrote: > > > Hi Jan, Julien, Stefano, > > > > Hi Henry, > > > > > On 4/24/2024 2:05 PM, Jan Beulich wrote: > > > > On 24.04.2024 05:34, Henry Wang wrote: > > > >

[PATCH v3 5/9] xen/arm64: debug: Add missing code symbol annotations

2024-05-02 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Use the generic xen/linkage.h macros to annotate code symbols and add missing annotations. Signed-off-by: Edgar E. Iglesias --- xen/arch/arm/arm64/debug.S | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/arm64/debug.S

[PATCH v3 8/9] xen/arm64: cache: Use the generic xen/linkage.h macros

2024-05-02 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Use the generic xen/linkage.h macros to annotate code symbols. Signed-off-by: Edgar E. Iglesias --- xen/arch/arm/arm64/cache.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/arm64/cache.S b/xen/arch/arm/arm64/cache.S index

[PATCH v3 1/9] xen/arm64: entry: Add missing code symbol annotations

2024-05-02 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Use the generic xen/linkage.h macros to annotate code symbols and add missing annotations. Signed-off-by: Edgar E. Iglesias Reviewed-by: Stefano Stabellini --- xen/arch/arm/arm64/entry.S | 72 +- 1 file changed, 48 insertions(+),

[PATCH v3 6/9] xen/arm64: bpi: Add missing code symbol annotations

2024-05-02 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Use the generic xen/linkage.h macros to annotate code symbols and add missing annotations. Signed-off-by: Edgar E. Iglesias --- xen/arch/arm/arm64/bpi.S | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/xen/arch/arm/arm64/bpi.S

[PATCH v3 2/9] xen/arm64: smc: Add missing code symbol annotations

2024-05-02 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Use the generic xen/linkage.h macros to annotate code symbols and add missing annotations. Signed-off-by: Edgar E. Iglesias --- xen/arch/arm/arm64/smc.S | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/arm64/smc.S

[PATCH v3 7/9] xen/arm64: mmu/head: Add missing code symbol annotations

2024-05-02 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Use the generic xen/linkage.h macros to annotate code symbols and add missing annotations. Signed-off-by: Edgar E. Iglesias --- xen/arch/arm/arm64/mmu/head.S | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git

[PATCH v3 9/9] xen/arm64: lib: Use the generic xen/linkage.h macros

2024-05-02 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Use the generic xen/linkage.h macros to annotate code symbols. Signed-off-by: Edgar E. Iglesias --- xen/arch/arm/arm64/lib/memchr.S | 4 ++-- xen/arch/arm/arm64/lib/memcmp.S | 4 ++-- xen/arch/arm/arm64/lib/memcpy.S | 4 ++-- xen/arch/arm/arm64/lib/memmove.S | 4

[PATCH v3 3/9] xen/arm64: sve: Add missing code symbol annotations

2024-05-02 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Use the generic xen/linkage.h macros to annotate code symbols and add missing annotations. Signed-off-by: Edgar E. Iglesias --- xen/arch/arm/arm64/sve-asm.S | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/xen/arch/arm/arm64/sve-asm.S

[PATCH v3 4/9] xen/arm64: head: Add missing code symbol annotations

2024-05-02 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Use the generic xen/linkage.h macros to annotate code symbols and add missing annotations. Signed-off-by: Edgar E. Iglesias --- xen/arch/arm/arm64/head.S | 50 --- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git

[PATCH v3 0/9] xen/arm: arm64: Annotate code symbols

2024-05-02 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" On the way towards Xen safety certification we're evaluating the use of tools to collect code-coverage/profiling information from execution traces. Some tools rely on ELF symbols for code being declared with type FUNC and having a symbol size. We currently annotate

[PATCH v8 04/13] xen/arm: add Dom0 cache coloring support

2024-05-02 Thread Carlo Nonato
Add a command line parameter to allow the user to set the coloring configuration for Dom0. A common configuration syntax for cache colors is introduced and documented. Take the opportunity to also add: - default configuration notion. - function to check well-formed configurations. Direct

[PATCH v8 10/13] xen/arm: use domain memory to allocate p2m page tables

2024-05-02 Thread Carlo Nonato
Cache colored domains can benefit from having p2m page tables allocated with the same coloring schema so that isolation can be achieved also for those kind of memory accesses. In order to do that, the domain struct is passed to the allocator and the MEMF_no_owner flag is used. This will be useful

[PATCH v8 06/13] tools: add support for cache coloring configuration

2024-05-02 Thread Carlo Nonato
Add a new "llc_colors" parameter that defines the LLC color assignment for a domain. The user can specify one or more color ranges using the same syntax used everywhere else for color config described in the documentation. The parameter is defined as a list of strings that represent the color

[PATCH v8 07/13] xen/arm: add support for cache coloring configuration via device-tree

2024-05-02 Thread Carlo Nonato
Add the "llc-colors" Device Tree attribute to express DomUs and Dom0less color configurations. Based on original work from: Luca Miccio Signed-off-by: Carlo Nonato Signed-off-by: Marco Solieri --- v8: - fixed memory leak on error path of domain_set_llc_colors_from_str() - realloc colors array

[PATCH v8 12/13] xen/arm: make consider_modules() available for xen relocation

2024-05-02 Thread Carlo Nonato
Cache coloring must physically relocate Xen in order to color the hypervisor and consider_modules() is a key function that is needed to find a new available physical address. 672d67f339c0 ("xen/arm: Split MMU-specific setup_mm() and related code out") moved consider_modules() under arm32. Move it

[PATCH v8 01/13] xen/common: add cache coloring common code

2024-05-02 Thread Carlo Nonato
Last Level Cache (LLC) coloring allows to partition the cache in smaller chunks called cache colors. Since not all architectures can actually implement it, add a HAS_LLC_COLORING Kconfig option. MAX_LLC_COLORS_ORDER Kconfig option has a range maximum of 10 (2^10 = 1024) because that's the number

[PATCH v8 00/13] Arm cache coloring

2024-05-02 Thread Carlo Nonato
Shared caches in multi-core CPU architectures represent a problem for predictability of memory access latency. This jeopardizes applicability of many Arm platform in real-time critical and mixed-criticality scenarios. We introduce support for cache partitioning with page coloring, a transparent

[PATCH v8 09/13] xen: add cache coloring allocator for domains

2024-05-02 Thread Carlo Nonato
Add a new memory page allocator that implements the cache coloring mechanism. The allocation algorithm enforces equal frequency distribution of cache partitions, following the coloring configuration of a domain. This allows for an even utilization of cache sets for every domain. Pages are stored

[PATCH v8 13/13] xen/arm: add cache coloring support for Xen

2024-05-02 Thread Carlo Nonato
Add the cache coloring support for Xen physical space. Since Xen must be relocated to a new physical space, some relocation functionalities must be brought back: - the virtual address of the new space is taken from 0c18fb76323b ("xen/arm: Remove unused BOOT_RELOC_VIRT_START"). - relocate_xen()

[PATCH v8 11/13] xen/arm: add Xen cache colors command line parameter

2024-05-02 Thread Carlo Nonato
From: Luca Miccio Add a new command line parameter to configure Xen cache colors. These colors are dumped together with other coloring info. Benchmarking the VM interrupt response time provides an estimation of LLC usage by Xen's most latency-critical runtime task. Results on Arm Cortex-A53 on

[PATCH v8 03/13] xen/arm: permit non direct-mapped Dom0 construction

2024-05-02 Thread Carlo Nonato
Cache coloring requires Dom0 not to be direct-mapped because of its non contiguous mapping nature, so allocate_memory() is needed in this case. 8d2c3ab18cc1 ("arm/dom0less: put dom0less feature code in a separate module") moved allocate_memory() in dom0less_build.c. In order to use it in Dom0

[PATCH v8 02/13] xen/arm: add initial support for LLC coloring on arm64

2024-05-02 Thread Carlo Nonato
LLC coloring needs to know the last level cache layout in order to make the best use of it. This can be probed by inspecting the CLIDR_EL1 register, so the Last Level is defined as the last level visible by this register. Note that this excludes system caches in some platforms. Static memory

[PATCH v8 08/13] xen/page_alloc: introduce preserved page flags macro

2024-05-02 Thread Carlo Nonato
PGC_static and PGC_extra needs to be preserved when assigning a page. Define a new macro that groups those flags and use it instead of or'ing every time. To make preserved flags even more meaningful, they are kept also when switching state in mark_page_free(). Enforce the removal of PGC_extra

[PATCH v8 05/13] xen: extend domctl interface for cache coloring

2024-05-02 Thread Carlo Nonato
Add a new domctl hypercall to allow the user to set LLC coloring configurations. Colors can be set only once, just after domain creation, since recoloring isn't supported. Based on original work from: Luca Miccio Signed-off-by: Carlo Nonato Signed-off-by: Marco Solieri --- v8: - fixed memory

Re: [PATCH v2 1/1] xen/arm64: entry: Add missing code symbol annotations

2024-05-02 Thread Edgar E. Iglesias
On Fri, Apr 26, 2024 at 1:14 AM Stefano Stabellini wrote: > > On Tue, 16 Apr 2024, Edgar E. Iglesias wrote: > > From: "Edgar E. Iglesias" > > > > Use the generic xen/linkage.h macros when and add missing > ^ when what? > > > code symbol annotations. > > >

[linux-linus test] 185899: regressions - FAIL

2024-05-02 Thread osstest service owner
flight 185899 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/185899/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-examine 8 reboot fail REGR. vs. 185870 Tests which are

[XEN PATCH v4 4/5] xen/arm: allow dynamically assigned SGI handlers

2024-05-02 Thread Jens Wiklander
Updates so request_irq() can be used with a dynamically assigned SGI irq as input. This prepares for a later patch where an FF-A schedule receiver interrupt handler is installed for an SGI generated by the secure world. >From the Arm Base System Architecture v1.0C [1]: "The system shall implement

[XEN PATCH v4 2/5] xen/arm: ffa: use ACCESS_ONCE()

2024-05-02 Thread Jens Wiklander
Replace read_atomic() with ACCESS_ONCE() to match the intended use, that is, to prevent the compiler from (via optimization) reading shared memory more than once. Signed-off-by: Jens Wiklander Reviewed-by: Bertrand Marquis --- xen/arch/arm/tee/ffa_shm.c | 15 --- 1 file changed, 8

[XEN PATCH v4 0/5] FF-A notifications

2024-05-02 Thread Jens Wiklander
Hi, This patch set adds support for FF-A notifications. We only support global notifications, per vCPU notifications remain unsupported. The first three patches are further cleanup and can be merged before the rest if desired. A physical SGI is used to make Xen aware of pending FF-A

[XEN PATCH v4 5/5] xen/arm: ffa: support notification

2024-05-02 Thread Jens Wiklander
Add support for FF-A notifications, currently limited to an SP (Secure Partition) sending an asynchronous notification to a guest. Guests and Xen itself are made aware of pending notifications with an interrupt. The interrupt handler retrieves the notifications using the FF-A ABI and deliver them

[XEN PATCH v4 3/5] xen/arm: ffa: simplify ffa_handle_mem_share()

2024-05-02 Thread Jens Wiklander
Simplify ffa_handle_mem_share() by removing the start_page_idx and last_page_idx parameters from get_shm_pages() and check that the number of pages matches expectations at the end of get_shm_pages(). Signed-off-by: Jens Wiklander Reviewed-by: Bertrand Marquis --- xen/arch/arm/tee/ffa_shm.c |

[XEN PATCH v4 1/5] xen/arm: ffa: refactor ffa_handle_call()

2024-05-02 Thread Jens Wiklander
Refactors the large switch block in ffa_handle_call() to use common code for the simple case where it's either an error code or success with no further parameters. Signed-off-by: Jens Wiklander Reviewed-by: Bertrand Marquis --- xen/arch/arm/tee/ffa.c | 30 ++ 1 file

[ovmf test] 185900: all pass - PUSHED

2024-05-02 Thread osstest service owner
flight 185900 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/185900/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf fecf55a66a1cf908c2f906bedb79fe2e8362d50f baseline version: ovmf

Re: [PATCH 5/6] xen/x86: Derive topologically correct x2APIC IDs from the policy

2024-05-02 Thread Alejandro Vallejo
On 02/05/2024 07:57, Jan Beulich wrote: > On 02.05.2024 08:55, Jan Beulich wrote: >> On 01.05.2024 18:35, Alejandro Vallejo wrote: >>> Hi, >>> >>> On 26/03/2024 16:41, Jan Beulich wrote: On 09.01.2024 16:38, Alejandro Vallejo wrote: > --- a/xen/lib/x86/policy.c > +++

Re: [PATCH for-4.19 v2] tools/xen-cpuid: switch to use cpu-policy defined names

2024-05-02 Thread Roger Pau Monné
On Thu, May 02, 2024 at 03:16:54PM +0200, Jan Beulich wrote: > On 02.05.2024 13:49, Roger Pau Monne wrote: > > Like it was done recently for libxl, switch to using the auto-generated > > feature > > names by the processing of cpufeatureset.h, this allows removing the > > open-coded > > feature

Re: [PATCH v2 3/4] x86/cpu-policy: Simplify recalculate_xstate()

2024-05-02 Thread Jan Beulich
On 02.05.2024 15:24, Andrew Cooper wrote: > On 02/05/2024 1:39 pm, Jan Beulich wrote: >> On 29.04.2024 20:28, Andrew Cooper wrote: >>> Make use of the new xstate_uncompressed_size() helper rather than >>> maintaining >>> the running calculation while accumulating feature components. >>

Re: [PATCH v2 4/4] x86/cpuid: Fix handling of xsave dynamic leaves

2024-05-02 Thread Andrew Cooper
On 02/05/2024 2:04 pm, Jan Beulich wrote: > On 29.04.2024 20:28, Andrew Cooper wrote: >> If max leaf is greater than 0xd but xsave not available to the guest, then >> the >> current XSAVE size should not be filled in. This is a latent bug for now as >> the guest max leaf is 0xd, but will become

Re: [PATCH] tools/tests: don't let test-xenstore write nodes exceeding default size

2024-05-02 Thread Andrew Cooper
On 02/05/2024 2:21 pm, Juergen Gross wrote: > Today test-xenstore will write nodes with 3000 bytes node data. This > size is exceeding the default quota for the allowed node size. While > working in dom0 with C-xenstored, OCAML-xenstored does not like that. > > Use a size of 2000 instead, which is

Re: [PATCH v2 3/4] x86/cpu-policy: Simplify recalculate_xstate()

2024-05-02 Thread Andrew Cooper
On 02/05/2024 1:39 pm, Jan Beulich wrote: > On 29.04.2024 20:28, Andrew Cooper wrote: >> Make use of the new xstate_uncompressed_size() helper rather than maintaining >> the running calculation while accumulating feature components. > xstate_uncompressed_size() isn't really a new function, but the

[PATCH] tools/tests: don't let test-xenstore write nodes exceeding default size

2024-05-02 Thread Juergen Gross
Today test-xenstore will write nodes with 3000 bytes node data. This size is exceeding the default quota for the allowed node size. While working in dom0 with C-xenstored, OCAML-xenstored does not like that. Use a size of 2000 instead, which is lower than the allowed default node size of 2048.

Re: [PATCH for-4.19 v2] tools/xen-cpuid: switch to use cpu-policy defined names

2024-05-02 Thread Jan Beulich
On 02.05.2024 13:49, Roger Pau Monne wrote: > Like it was done recently for libxl, switch to using the auto-generated > feature > names by the processing of cpufeatureset.h, this allows removing the > open-coded > feature names, and unifies the feature naming with libxl and the hypervisor. > >

Re: [PATCH v2 2/4] x86/xstate: Rework xstate_ctxt_size() as xstate_uncompressed_size()

2024-05-02 Thread Andrew Cooper
On 02/05/2024 1:19 pm, Jan Beulich wrote: > On 29.04.2024 20:28, Andrew Cooper wrote: >> @@ -567,16 +567,51 @@ static unsigned int hw_uncompressed_size(uint64_t xcr0) >> return size; >> } >> >> -/* Fastpath for common xstate size requests, avoiding reloads of xcr0. */ >> -unsigned int

[XEN PATCH v2] automation/eclair: add deviation of MISRA C:2012 Rule 14.4

2024-05-02 Thread Federico Serafini
Update ECLAIR configuration to take into account the deviations agreed during MISRA meetings. Amend an existing entry of Rule 14.4 in deviations-rst: it is not a project-wide deviation. Tag Rule 14.4 as clean for arm. Signed-off-by: Federico Serafini --- Changes in v2: - reordered deviations

Re: [PATCH v2 4/4] x86/cpuid: Fix handling of xsave dynamic leaves

2024-05-02 Thread Jan Beulich
On 29.04.2024 20:28, Andrew Cooper wrote: > If max leaf is greater than 0xd but xsave not available to the guest, then the > current XSAVE size should not be filled in. This is a latent bug for now as > the guest max leaf is 0xd, but will become problematic in the future. Why would this not be

Re: [PATCH v2 3/4] x86/cpu-policy: Simplify recalculate_xstate()

2024-05-02 Thread Jan Beulich
On 29.04.2024 20:28, Andrew Cooper wrote: > Make use of the new xstate_uncompressed_size() helper rather than maintaining > the running calculation while accumulating feature components. xstate_uncompressed_size() isn't really a new function, but the re-work of an earlier one. That, aiui, could

Re: [PATCH for-4.19] tools/xen-cpuid: switch to use cpu-policy defined names

2024-05-02 Thread Jan Beulich
On 02.05.2024 14:14, Andrew Cooper wrote: > On 30/04/2024 1:54 pm, Roger Pau Monné wrote: >> On Tue, Apr 30, 2024 at 02:06:38PM +0200, Jan Beulich wrote: >>> On 30.04.2024 13:25, Roger Pau Monné wrote: On Tue, Apr 30, 2024 at 12:37:44PM +0200, Jan Beulich wrote: > On 30.04.2024 10:29,

Re: [PATCH v2 2/4] x86/xstate: Rework xstate_ctxt_size() as xstate_uncompressed_size()

2024-05-02 Thread Jan Beulich
On 29.04.2024 20:28, Andrew Cooper wrote: > @@ -567,16 +567,51 @@ static unsigned int hw_uncompressed_size(uint64_t xcr0) > return size; > } > > -/* Fastpath for common xstate size requests, avoiding reloads of xcr0. */ > -unsigned int xstate_ctxt_size(u64 xcr0) > +unsigned int

Re: [PATCH for-4.19] tools/xen-cpuid: switch to use cpu-policy defined names

2024-05-02 Thread Andrew Cooper
On 30/04/2024 1:54 pm, Roger Pau Monné wrote: > On Tue, Apr 30, 2024 at 02:06:38PM +0200, Jan Beulich wrote: >> On 30.04.2024 13:25, Roger Pau Monné wrote: >>> On Tue, Apr 30, 2024 at 12:37:44PM +0200, Jan Beulich wrote: On 30.04.2024 10:29, Roger Pau Monne wrote: > @@ -301,21 +52,32 @@

Re: [PATCH v2 1/4] x86/hvm: Defer the size calculation in hvm_save_cpu_xsave_states()

2024-05-02 Thread Jan Beulich
On 29.04.2024 20:28, Andrew Cooper wrote: > HVM_CPU_XSAVE_SIZE() may rewrite %xcr0 twice. Defer the caluclation it until > after we've decided to write out an XSAVE record. > > Note in hvm_load_cpu_xsave_states() that there were versions of Xen which > wrote out a useless XSAVE record. This

Re: [PATCH v2 7/7] x86/hap: Increase the number of initial mempool_size to 1024 pages

2024-05-02 Thread Petr Beneš
On Thu, May 2, 2024 at 8:36 AM Jan Beulich wrote: > > On 30.04.2024 17:40, Petr Beneš wrote: > > On Tue, Apr 30, 2024 at 4:47 PM Jan Beulich wrote: > >> > >> On 28.04.2024 18:52, Petr Beneš wrote: > >>> From: Petr Beneš > >>> > >>> This change anticipates scenarios where `max_altp2m` is set to

[PATCH for-4.19 v2] tools/xen-cpuid: switch to use cpu-policy defined names

2024-05-02 Thread Roger Pau Monne
Like it was done recently for libxl, switch to using the auto-generated feature names by the processing of cpufeatureset.h, this allows removing the open-coded feature names, and unifies the feature naming with libxl and the hypervisor. Introduce a newly auto-generated array that contains the

[xen-unstable test] 185897: tolerable FAIL - PUSHED

2024-05-02 Thread osstest service owner
flight 185897 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/185897/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemut-win7-amd64 19 guest-stopfail like 185890

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 plans on putting that interface in common: > > I'm aware, but

Re: [PATCH for-4.19] ppc/riscv: fix arch_acquire_resource_check()

2024-05-02 Thread Roger Pau Monné
On Thu, May 02, 2024 at 10:46:12AM +0200, Oleksii wrote: > On Tue, 2024-04-30 at 17:34 +0200, Roger Pau Monne wrote: > > None of the implementations support set_foreign_p2m_entry() yet, > > neither they > > have a p2m walk in domain_relinquish_resources() in order to remove > > the foreign > >

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

2024-05-02 Thread Jan Beulich
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 plans on putting that interface in common: I'm aware, but ... >

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:

Re: [PATCH v1] xen/riscv: improve check-extension() macro

2024-05-02 Thread Oleksii
On Mon, 2024-04-29 at 15:30 +0200, Jan Beulich wrote: > On 26.04.2024 17:23, Oleksii Kurochko wrote: > > Now, the check-extension() macro has 1 argument instead of 2. > > This change helps to reduce redundancy around usage of extensions > > name (in the case of the zbb extension, the name was used

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

2024-05-02 Thread Jan Beulich
On 02.05.2024 10:13, Luca Fancellu wrote: > > >> 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, > >> On 30 Apr 2024,

Re: [PATCH] tools/tests: let test-xenstore exit with non-0 status in case of error

2024-05-02 Thread Andrew Cooper
On 02/05/2024 10:22 am, Juergen Gross wrote: > In case a test is failing in test-xenstore, let the tool exit with an > exit status other than 0. > > Fix a typo in an error message. > > Reported-by: Andrew Cooper > Fixes: 3afc5e4a5b75 ("tools/tests: add xenstore testing framework") >

[PATCH] tools/tests: let test-xenstore exit with non-0 status in case of error

2024-05-02 Thread Juergen Gross
In case a test is failing in test-xenstore, let the tool exit with an exit status other than 0. Fix a typo in an error message. Reported-by: Andrew Cooper Fixes: 3afc5e4a5b75 ("tools/tests: add xenstore testing framework") Signed-off-by: Juergen Gross --- tools/tests/xenstore/test-xenstore.c

[XEN PATCH v2 5/5] x86/MCE: optional build of AMD/Intel MCE code

2024-05-02 Thread Sergiy Kibrik
Separate Intel/AMD-specific MCE code using CONFIG_{INTEL,AMD} config options. Now we can avoid build of mcheck code if support for specific platform is intentionally disabled by configuration. Add default return value to init_nonfatal_mce_checker() routine -- in case of a build with both AMD and

[linux-linus test] 185896: regressions - FAIL

2024-05-02 Thread osstest service owner
flight 185896 linux-linus real [real] flight 185898 linux-linus real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/185896/ http://logs.test-lab.xenproject.org/osstest/logs/185898/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be

[XEN PATCH v2 4/5] x86/MCE: guard {intel/amd}_mcheck_init() calls

2024-05-02 Thread Sergiy Kibrik
Guard calls to CPU-specific mcheck init routines in common MCE code using new INTEL/AMD config options. The purpose is not to build platform-specific mcheck code and calls to it, if this platform is disabled in config. Signed-off-by: Sergiy Kibrik Reviewed-by: Stefano Stabellini CC: Jan

[XEN PATCH v2 3/5] x86/MCE: guard access to Intel/AMD-specific MCA MSRs

2024-05-02 Thread Sergiy Kibrik
Add build-time checks for newly introduced INTEL/AMD config options when calling vmce_{intel/amd}_{rdmsr/wrmsr}() routines. This way a platform-specific code can be omitted in vmce code, if this platform is disabled in config. Signed-off-by: Sergiy Kibrik Reviewed-by: Stefano Stabellini CC: Jan

[XEN PATCH v2 2/5] x86/intel: move vmce_has_lmce() routine to header

2024-05-02 Thread Sergiy Kibrik
Moving this function out of mce_intel.c would make it possible to disable build of Intel MCE code later on, because the function gets called from common x86 code. Add internal check for CONFIG_INTEL option, as MCG_LMCE_P bit is currently specific to Intel CPUs only. Also replace boilerplate code

[XEN PATCH v2 1/5] x86/vpmu: separate amd/intel vPMU code

2024-05-02 Thread Sergiy Kibrik
Build AMD vPMU when CONFIG_AMD is on, and Intel vPMU when CONFIG_INTEL is on respectively, allowing for a plaftorm-specific build. No functional change intended. Signed-off-by: Sergiy Kibrik Reviewed-by: Stefano Stabellini CC: Andrew Cooper CC: Jan Beulich --- changes in v2: - drop static

[XEN PATCH v2 0/5] x86: make Intel/AMD vPMU & MCE support configurable

2024-05-02 Thread Sergiy Kibrik
Here's a second attempt to separate support of Intel & AMD CPUs in Xen build. The code to drive both platforms used to be built unconditionally, until recent introduction of CONFIG_{AMD,INTEL} Kconfig options. This series extends coverage of these options on vpmu and mcheck subsystems, which

Re: [XEN PATCH v1 7/7] x86/MCE: optional build of AMD/Intel MCE code

2024-05-02 Thread Sergiy Kibrik
29.04.24 18:54, Jan Beulich: On 27.04.2024 01:16, Stefano Stabellini wrote: On Tue, 23 Apr 2024, Sergiy Kibrik wrote: --- a/xen/arch/x86/cpu/mcheck/Makefile +++ b/xen/arch/x86/cpu/mcheck/Makefile @@ -1,12 +1,10 @@ -obj-y += amd_nonfatal.o -obj-y += mce_amd.o obj-y += mcaction.o obj-y +=

Re: [XEN PATCH v1 4/7] x86/MCE: guard lmce_support/cmci_support

2024-05-02 Thread Sergiy Kibrik
29.04.24 18:42, Jan Beulich: On 23.04.2024 10:54, Sergiy Kibrik wrote: Guard access to Intel-specific lmce_support & cmci_support variables in common MCE/VMCE code. These are set in Intel-specific parts of mcheck code and can potentially be skipped if building for non-intel platform by

Re: [PATCH for-4.19] tools/xen-cpuid: switch to use cpu-policy defined names

2024-05-02 Thread Oleksii
On Tue, 2024-04-30 at 13:25 +0200, Roger Pau Monné wrote: > On Tue, Apr 30, 2024 at 12:37:44PM +0200, Jan Beulich wrote: > > On 30.04.2024 10:29, Roger Pau Monne wrote: > > > Like it was done recently for libxl, switch to using the auto- > > > generated feature > > > names by the processing of

Re: [PATCH for-4.19? 0/2] xen/x86: support foreign mappings for HVM

2024-05-02 Thread Oleksii
Hi Roger, On Tue, 2024-04-30 at 18:58 +0200, Roger Pau Monne wrote: > Hello, > > The following series attempts to solve a shortcoming of HVM/PVH > guests > with the lack of support for foreign mappings.  Such lack of support > prevents using PVH based guests as stubdomains for example. > > Add

Re: [PATCH for-4.19] ppc/riscv: fix arch_acquire_resource_check()

2024-05-02 Thread Oleksii
On Tue, 2024-04-30 at 17:34 +0200, Roger Pau Monne wrote: > None of the implementations support set_foreign_p2m_entry() yet, > neither they > have a p2m walk in domain_relinquish_resources() in order to remove > the foreign > mappings from the p2m and thus drop the extra refcounts. > > Adjust the

Re: [PATCH v8 08/17] xen/riscv: introduce atomic.h

2024-05-02 Thread Oleksii
On Mon, 2024-04-29 at 15:45 +0200, Jan Beulich wrote: > On 17.04.2024 12:04, Oleksii Kurochko wrote: > > --- /dev/null > > +++ b/xen/arch/riscv/include/asm/atomic.h > > @@ -0,0 +1,281 @@ > > +/* SPDX-License-Identifier: GPL-2.0-only */ > > +/* > > + * Taken and modified from Linux. > > + * > > + *

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, > On 30 Apr 2024, at 12:37, Jan Beulich wrote: > > On

Re: [PATCH for-4.19] ppc/riscv: fix arch_acquire_resource_check()

2024-05-02 Thread Roger Pau Monné
On Thu, May 02, 2024 at 09:23:30AM +0200, Jan Beulich wrote: > On 30.04.2024 17:34, Roger Pau Monne wrote: > > None of the implementations support set_foreign_p2m_entry() yet, neither > > they > > have a p2m walk in domain_relinquish_resources() in order to remove the > > foreign > > mappings

Re: [PATCH v4 12/17] xen: mapcache: Unmap first entries in buckets

2024-05-02 Thread Edgar E. Iglesias
On Tue, Apr 30, 2024 at 6:50 PM Edgar E. Iglesias wrote: > > From: "Edgar E. Iglesias" > > When invalidating memory ranges, if we happen to hit the first > entry in a bucket we were never unmapping it. This was harmless > for foreign mappings but now that we're looking to reuse the > mapcache

Re: [PATCH v4 13/17] softmmu: Pass RAM MemoryRegion and is_write xen_map_cache()

2024-05-02 Thread Edgar E. Iglesias
On Thu, May 2, 2024 at 9:24 AM David Hildenbrand wrote: > > On 30.04.24 18:49, Edgar E. Iglesias wrote: > > From: "Edgar E. Iglesias" > > > > Propagate MR and is_write to xen_map_cache(). > > I'm pretty sure the patch subject is missing a "to" :) Thanks David! I'll fix it in v5! Cheers, Edgar

Re: [PATCH v4 14/17] xen: Add xen_mr_is_memory()

2024-05-02 Thread David Hildenbrand
On 30.04.24 18:49, Edgar E. Iglesias wrote: From: "Edgar E. Iglesias" Add xen_mr_is_memory() to abstract away tests for the xen_memory MR. Signed-off-by: Edgar E. Iglesias --- [...] #endif diff --git a/system/physmem.c b/system/physmem.c index ad7a8c7d95..1a5ffcba2a 100644 ---

Re: [PATCH v4 13/17] softmmu: Pass RAM MemoryRegion and is_write xen_map_cache()

2024-05-02 Thread David Hildenbrand
On 30.04.24 18:49, Edgar E. Iglesias wrote: From: "Edgar E. Iglesias" Propagate MR and is_write to xen_map_cache(). I'm pretty sure the patch subject is missing a "to" :) This is in preparation for adding support for grant mappings. No functional change. Reviewed-by: David Hildenbrand

Re: [PATCH for-4.19] ppc/riscv: fix arch_acquire_resource_check()

2024-05-02 Thread Jan Beulich
On 30.04.2024 17:34, Roger Pau Monne wrote: > None of the implementations support set_foreign_p2m_entry() yet, neither they > have a p2m walk in domain_relinquish_resources() in order to remove the > foreign > mappings from the p2m and thus drop the extra refcounts. While I don't mind the cod

Re: [PATCH v4 15/17] xen: mapcache: Remove assumption of RAMBlock with 0 offset

2024-05-02 Thread Edgar E. Iglesias
On Wed, May 1, 2024 at 11:24 PM Stefano Stabellini wrote: > > On Tue, 30 Apr 2024, Edgar E. Iglesias wrote: > > From: "Edgar E. Iglesias" > > > > The current mapcache assumes that all memory is mapped > > in a single RAM MR (the first one with offset 0). Remove > > this assumption and propagate

Re: [PATCH 6/6] xen/x86: Add topology generator

2024-05-02 Thread Jan Beulich
On 01.05.2024 19:06, Alejandro Vallejo wrote: > On 26/03/2024 17:02, Jan Beulich wrote: >> On 09.01.2024 16:38, Alejandro Vallejo wrote: >>> --- a/tools/include/xenguest.h >>> +++ b/tools/include/xenguest.h >>> @@ -843,5 +843,20 @@ enum xc_static_cpu_featuremask { >>>

  1   2   >