Re: [PATCH v10 08/12] xen/page_alloc: introduce preserved page flags macro

2024-12-02 Thread Andrea Bastoni
Hi, On 29/11/2024 12:09, Jan Beulich wrote: > On 29.11.2024 10:32, Carlo Nonato wrote: >> Hi Jan, >> >> On Thu, Nov 28, 2024 at 12:05 PM Jan Beulich wrote: >>> >>> On 19.11.2024 15:13, Carlo Nonato wrote: PGC_static, PGC_extra and PGC_broken need to be preserved when assigning a page. D

[PATCH v4 2/5] ARM: pxa: Switch to new sys-off handler API

2024-12-02 Thread Andrew Davis
Kernel now supports chained power-off handlers. Use register_platform_power_off() that registers a platform level power-off handler. Legacy pm_power_off() will be removed once all drivers and archs are converted to the new sys-off API. Signed-off-by: Andrew Davis --- arch/arm/mach-pxa/spitz.c |

[PATCH v4 5/5] arm/xen: Switch to new sys-off handler API

2024-12-02 Thread Andrew Davis
Kernel now supports chained power-off handlers. Use register_platform_power_off() that registers a platform level power-off handler. Legacy pm_power_off() will be removed once all drivers and archs are converted to the new sys-off API. Signed-off-by: Andrew Davis --- arch/arm/xen/enlighten.c | 2

[PATCH v4 3/5] ARM: sa1100: Switch to new sys-off handler API

2024-12-02 Thread Andrew Davis
Kernel now supports chained power-off handlers. Use register_platform_power_off() that registers a platform level power-off handler. Legacy pm_power_off() will be removed once all drivers and archs are converted to the new sys-off API. Signed-off-by: Andrew Davis --- arch/arm/mach-sa1100/generic

[PATCH v4 0/5] Switch more ARM plats to sys-off handler API

2024-12-02 Thread Andrew Davis
Hello all, Continuing the quest to remove the legacy pm_power_off() global function handler. Remove uses from arch/arm/ using the helper register_platform_power_off(). Thanks, Andrew Changes for v4: - Drop already taken patches - Rebase on latest master Changes for v3: - Rebase on v6.12-rc1

[PATCH v4 4/5] ARM: vt8500: Switch to new sys-off handler API

2024-12-02 Thread Andrew Davis
Kernel now supports chained power-off handlers. Use register_platform_power_off() that registers a platform level power-off handler. Legacy pm_power_off() will be removed once all drivers and archs are converted to the new sys-off API. Signed-off-by: Andrew Davis --- arch/arm/mach-vt8500/vt8500.

[PATCH v4 1/5] ARM: highbank: Switch to new sys-off handler API

2024-12-02 Thread Andrew Davis
Kernel now supports chained power-off handlers. Use register_platform_power_off() that registers a platform level power-off handler. Legacy pm_power_off() will be removed once all drivers and archs are converted to the new sys-off API. Signed-off-by: Andrew Davis Reviewed-by: Andre Przywara ---

Re: [PATCH v7 10/10] tools/x86: Synthesise domain topologies

2024-12-02 Thread Jan Beulich
On 21.10.2024 17:46, Alejandro Vallejo wrote: > Expose sensible topologies in leaf 0xb. At the moment it synthesises > non-HT systems, in line with the previous code intent. > > Leaf 0xb in the host policy is no longer zapped and the guest {max,def} > policies have their topology leaves zapped ins

Re: [PATCH] xen: pcpu: remove unnecessary __ref annotation

2024-12-02 Thread Juergen Gross
On 02.12.24 09:59, Sergio Miguéns Iglesias wrote: The __ref annotation has been there since the beginning of time, but no calls to __init functions exist inside it, and the compilation of the Xen driver does not output any warnings when removed. The __ref annotation was added with commit 6c8474

Feature freeze date for Xen 4.20 is Fri Dec 20, 2024

2024-12-02 Thread oleksii . kurochko
Hello everyone, The feature freeze date for Xen 4.20 is December 20, 2024. Patches adding new features must be committed by this date. Straightforward bug fixes may continue to be accepted by maintainers beyond this point. If you would like your features included in this release, please ensure t

Re: [PATCH v2 1/4] common: remove -fno-stack-protector from EMBEDDED_EXTRA_CFLAGS

2024-12-02 Thread Andrew Cooper
On 02/12/2024 8:06 am, Jan Beulich wrote: > On 30.11.2024 02:10, Volodymyr Babchuk wrote: >> This patch is preparation for making stack protector >> configurable. First step is to remove -fno-stack-protector flag from >> EMBEDDED_EXTRA_CFLAGS so separate projects (Hypervisor in this case) >> can en

Re: [PATCH 08/15] x86/hyperlaunch: locate dom0 kernel with hyperlaunch

2024-12-02 Thread Jan Beulich
On 23.11.2024 19:20, Daniel P. Smith wrote: > Look for a subnode of type `multiboot,kernel` within a domain node. If found, > process the reg property for the MB1 module index. If the bootargs property is > present and there was not an MB1 string, then use the command line from the > device tree de

Re: [PATCH v2 1/2] xl: Keep monitoring suspended domain

2024-12-02 Thread Jan Beulich
On 28.11.2024 17:45, Anthony PERARD wrote: > On Tue, Nov 26, 2024 at 12:19:40PM -0500, Jason Andryuk wrote: >> When a VM transitioned to LIBXL_SHUTDOWN_REASON_SUSPEND, the xl daemon >> was exiting as 0 = DOMAIN_RESTART_NONE "No domain restart". >> Later, when the VM actually shutdown, the missing x

Re: [PATCH v2 4/4] xen: riscv: enable stack protector feature

2024-12-02 Thread oleksii . kurochko
On Mon, 2024-12-02 at 09:12 +0100, Jan Beulich wrote: > On 30.11.2024 02:10, Volodymyr Babchuk wrote: > > Enable previously added CONFIG_STACK_PROTECTOR feature for RISC-V > > platform. Here we can call boot_stack_chk_guard_setup() in > > start_xen() > > function, because it never returns, so stack

Re: [PATCH v7 03/10] xen/x86: Add supporting code for uploading LAPIC contexts during domain create

2024-12-02 Thread Jan Beulich
On 21.10.2024 17:45, Alejandro Vallejo wrote: > A later patch will upload LAPIC contexts as part of domain creation. In > order for it not to encounter a problem where the architectural state > does not reflect the APIC ID in the hidden state, this patch ensures > updates to the hidden state trigge

Re: [PATCH v2 0/4] Move some boot code from assembly to C

2024-12-02 Thread Frediano Ziglio
ping On Fri, Nov 22, 2024 at 9:34 AM Frediano Ziglio wrote: > > As a continuation of this series start sorting out the issue of headers > not compatible with 32 bit. > Instead of having to change headers which are almost only used for 64 bit > allows to override headers or move reusable definitio

Re: [PATCH v2 1/2] xen/swiotlb: add alignment check for dma buffers

2024-12-02 Thread Jürgen Groß
On 29.11.24 18:36, Thierry Escande wrote: Hi, On 16/09/2024 08:47, Juergen Gross wrote: diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index 35155258a7e2..ddf5b1df632e 100644 --- a/drivers/xen/swiotlb-xen.c +++ b/drivers/xen/swiotlb-xen.c @@ -78,9 +78,15 @@ static inline int

Re: [PATCH v10 11/12] xen/arm: make consider_modules() available for xen relocation

2024-12-02 Thread Michal Orzel
On 19/11/2024 15:13, Carlo Nonato wrote: > > > 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 relat

Re: [PATCH 06/15] x86/hyperlaunch: introduce the domain builder

2024-12-02 Thread Jan Beulich
On 23.11.2024 19:20, Daniel P. Smith wrote: > Introduce the domain builder which is capable of consuming a device tree as > the > first boot module. If it finds a device tree as the first boot module, it will > set its type to BOOTMOD_FDT. This change only detects the boot module and > continues t

Re: [PATCH v2 1/4] common: remove -fno-stack-protector from EMBEDDED_EXTRA_CFLAGS

2024-12-02 Thread Jan Beulich
On 02.12.2024 09:06, Jan Beulich wrote: > On 30.11.2024 02:10, Volodymyr Babchuk wrote: >> This patch is preparation for making stack protector >> configurable. First step is to remove -fno-stack-protector flag from >> EMBEDDED_EXTRA_CFLAGS so separate projects (Hypervisor in this case) >> can enab

Re: [PATCH 07/15] x86/hyperlaunch: initial support for hyperlaunch device tree

2024-12-02 Thread Jan Beulich
On 23.11.2024 19:20, Daniel P. Smith wrote: > Add the ability to detect both a formal hyperlaunch device tree or a dom0less > device tree. If the hyperlaunch device tree is found, then count the number of > domain entries, reporting if more than one is found. "reporting" reads like informational l

Re: [PATCH 14/15] x86/hyperlaunch: add max vcpu parsing of hyperlaunch device tree

2024-12-02 Thread Jan Beulich
On 23.11.2024 19:20, Daniel P. Smith wrote: > --- a/xen/arch/x86/dom0_build.c > +++ b/xen/arch/x86/dom0_build.c > @@ -617,6 +617,9 @@ int __init construct_dom0(struct boot_domain *bd) > if ( !get_memsize(&dom0_max_size, LONG_MAX) && bd->max_pages ) > dom0_size.nr_pages = bd->max_pages

Re: [PATCH 15/15] x86/hyperlaunch: add capabilities to boot domain

2024-12-02 Thread Jan Beulich
On 23.11.2024 19:20, Daniel P. Smith wrote: > --- a/xen/arch/x86/domain_builder/fdt.c > +++ b/xen/arch/x86/domain_builder/fdt.c > @@ -209,6 +209,19 @@ static int __init process_domain_node( > bd->max_vcpus = val; > printk(" max vcpus: %d\n", bd->max_vcpus); > } >

[PATCH v11 11/12] xen/arm: make consider_modules() available for xen relocation

2024-12-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 v11 09/12] xen: add cache coloring allocator for domains

2024-12-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 i

Re: [PATCH v11 12/12] xen/arm: add cache coloring support for Xen image

2024-12-02 Thread Julien Grall
Hi Carlo, I appreciate this is v11. So I will try to keep the comments to only what I consider important to fix and some coding style issue. On 02/12/2024 16:59, Carlo Nonato wrote: --- xen/arch/arm/alternative.c| 30 +++- xen/arch/arm/arm64/mmu/head.S | 58

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

2024-12-02 Thread Carlo Nonato
Add the "llc-colors" Device Tree property to express DomUs and Dom0less color configurations. Based on original work from: Luca Miccio Signed-off-by: Carlo Nonato Signed-off-by: Marco Solieri Reviewed-by: Jan Beulich # non-Arm Reviewed-by: Michal Orzel --- v11: - made clear that llc-colors d

Re: [PATCH v3 2/5] arm/setup: Move MMU specific extern declarations to mmu/setup.h

2024-12-02 Thread Julien Grall
Hi Luca, On 29/11/2024 09:12, Luca Fancellu wrote: Move some extern declarations related to MMU structures and define from asm/setup.h to asm/mmu/setup.h, in order to increase encapsulation and allow the MPU part to build, since it has no clue about them. Signed-off-by: Luca Fancellu Acked-b

[PATCH v11 01/12] xen/common: add cache coloring common code

2024-12-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. LLC_COLORS_ORDER Kconfig option has a range maximum of 10 (2^10 = 1024) because that's the number of co

[PATCH v11 06/12] tools: add support for cache coloring configuration

2024-12-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 range

Re: [PATCH v2 1/2] xen/swiotlb: add alignment check for dma buffers

2024-12-02 Thread Thierry Escande
On 02/12/2024 09:27, Jürgen Groß wrote: > On 29.11.24 18:36, Thierry Escande wrote: >> Hi, >> >> On 16/09/2024 08:47, Juergen Gross wrote: >>> diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c >>> index 35155258a7e2..ddf5b1df632e 100644 >>> --- a/drivers/xen/swiotlb-xen.c >>> +++

[PATCH v11 08/12] xen/page_alloc: introduce preserved page flags macro

2024-12-02 Thread Carlo Nonato
PGC_static and PGC_extra need to be preserved when assigning a page. Define a new macro that groups those flags and use it instead of or'ing every time. Signed-off-by: Carlo Nonato --- v11: - removed PGC_broken from PGC_preserved - removed PGC preservation from mark_page_free() v10: - fixed commi

Re: [PATCH v2 1/2] xen/mpu: Map early uart when earlyprintk on

2024-12-02 Thread Julien Grall
Hi Ayan, On 27/11/2024 18:39, Ayan Kumar Halder wrote: CONFIG_EARLY_UART_SIZE is introduced to let user provide physical size of early UART. Unlike MMU where we map a page in the virtual address space, here we need to know the exact physical size to be mapped. As VA == PA in case of MPU, the mem

Re: [PATCH v2 2/2] xen/mmu: enable SMMU subsystem only in MMU

2024-12-02 Thread Julien Grall
Hi Ayan, On 27/11/2024 18:39, Ayan Kumar Halder wrote: From: Penny Zheng In Xen, SMMU subsystem is supported for MMU system only. The reason being SMMU driver uses the same page tables as MMU. Thus, we make it dependent on CONFIG_MMU. Signed-off-by: Penny Zheng Signed-off-by: Ayan Kumar Hald

[PATCH v11 03/12] xen/arm: permit non direct-mapped Dom0 construction

2024-12-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 const

Re: [PATCH 3/5] build: arm64: provide -target and -march if using clang

2024-12-02 Thread Julien Grall
Hi Jan, On 02/12/2024 07:52, Jan Beulich wrote: On 30.11.2024 18:15, Julien Grall wrote: On 29/11/2024 22:12, Volodymyr Babchuk wrote: Jan Beulich writes: On 29.11.2024 02:49, Volodymyr Babchuk wrote: --- a/config/arm64.mk +++ b/config/arm64.mk @@ -5,6 +5,10 @@ CONFIG_XEN_INSTALL_SUFFIX :=

Re: [PATCH v3 5/5] xen/arm: Move setup_frametable_mappings to arm/mmu

2024-12-02 Thread Julien Grall
Hi Luca, On 29/11/2024 09:12, Luca Fancellu wrote: diff --git a/xen/arch/arm/mmu/Makefile b/xen/arch/arm/mmu/Makefile index 2cb44b857dd2..1c89602947de 100644 --- a/xen/arch/arm/mmu/Makefile +++ b/xen/arch/arm/mmu/Makefile @@ -1,3 +1,4 @@ +obj-y += mm.o obj-y += p2m.o obj-y += pt.o obj-y +=

Re: [PATCH v6 1/3] xen/arm: mpu: Create boot-time MPU protection regions

2024-12-02 Thread Julien Grall
On 02/12/2024 15:36, Ayan Kumar Halder wrote: On 30/11/2024 17:45, Julien Grall wrote: Hi Ayan, Hi Julien, On 18/11/2024 12:12, Ayan Kumar Halder wrote: +/* + * Macro to prepare and set a EL2 MPU memory region. + * We will also create an according MPU memory region entry, which + * is a

Re: [PATCH 06/15] x86/hyperlaunch: introduce the domain builder

2024-12-02 Thread Jan Beulich
On 25.11.2024 18:52, Jason Andryuk wrote: > On 2024-11-23 13:20, Daniel P. Smith wrote: >> --- /dev/null >> +++ b/xen/arch/x86/domain_builder/fdt.c >> @@ -0,0 +1,38 @@ >> +/* SPDX-License-Identifier: GPL-2.0-only */ >> +/* >> + * Copyright (C) 2024, Apertus Solutions, LLC >> + */ >> +#include >> +

Re: [PATCH v2 4/4] xen: riscv: enable stack protector feature

2024-12-02 Thread oleksii . kurochko
On Mon, 2024-12-02 at 09:12 +0100, Jan Beulich wrote: > On 30.11.2024 02:10, Volodymyr Babchuk wrote: > > Enable previously added CONFIG_STACK_PROTECTOR feature for RISC-V > > platform. Here we can call boot_stack_chk_guard_setup() in > > start_xen() > > function, because it never returns, so stack

Re: [PATCH 01/15] x86/boot: introduce boot domain

2024-12-02 Thread Jan Beulich
On 23.11.2024 19:20, Daniel P. Smith wrote: > To begin moving toward allowing the hypervisor to construct more than one > domain at boot, a container is needed for a domain's build information. > Introduce a new header, , that contains the initial > struct boot_domain that encapsulate the build inf

Re: [PATCH v7 04/10] tools/hvmloader: Retrieve (x2)APIC IDs from the APs themselves

2024-12-02 Thread Jan Beulich
On 21.10.2024 17:45, Alejandro Vallejo wrote: > --- a/tools/firmware/hvmloader/hvmloader.c > +++ b/tools/firmware/hvmloader/hvmloader.c > @@ -224,7 +224,7 @@ static void apic_setup(void) > > /* 8259A ExtInts are delivered through IOAPIC pin 0 (Virtual Wire Mode). > */ > ioapic_write(0x

Re: [PATCH v7 05/10] tools/libacpi: Use LUT of APIC IDs rather than function pointer

2024-12-02 Thread Jan Beulich
On 21.10.2024 17:45, Alejandro Vallejo wrote: > Refactors libacpi so that a single LUT is the authoritative source of > truth for the CPU to APIC ID mappings. This has a know-on effect in > reducing complexity on future patches, as the same LUT can be used for > configuring the APICs and configurin

[XEN PATCH v2] x86/hvm: Use constants for x86 modes

2024-12-02 Thread Teddy Astie
In many places of x86 HVM code, constants integer are used to indicate in what mode is running the CPU (real, vm86, 16-bits, 32-bits, 64-bits). However, these constants are are written directly as integer which hides the actual meaning of these modes. This patch introduces X86_MODE_* macros and

Re: [PATCH 03/15] x86/boot: add cmdline to struct boot_domain

2024-12-02 Thread Jan Beulich
On 23.11.2024 19:20, Daniel P. Smith wrote: > --- a/xen/arch/x86/hvm/dom0_build.c > +++ b/xen/arch/x86/hvm/dom0_build.c > @@ -644,9 +644,11 @@ static bool __init check_and_adjust_load_address( > } > > static int __init pvh_load_kernel( > -struct domain *d, struct boot_module *image, struct

Re: [PATCH 11/15] x86/hyperlaunch: add domain id parsing to domain config

2024-12-02 Thread Jan Beulich
On 26.11.2024 00:45, Jason Andryuk wrote: > On 2024-11-23 13:20, Daniel P. Smith wrote: >> @@ -186,6 +209,12 @@ static int __init process_domain_node( >> return -EFAULT; >> } >> >> +if ( bd->domid == DOMID_INVALID ) >> +bd->domid = get_initial_domain_id(); >> +els

Re: [PATCH 12/15] x86/hyperlaunch: specify dom0 mode with device tree

2024-12-02 Thread Jan Beulich
On 23.11.2024 19:20, Daniel P. Smith wrote: > --- a/xen/arch/x86/domain_builder/fdt.c > +++ b/xen/arch/x86/domain_builder/fdt.c > @@ -141,6 +141,25 @@ static int __init process_domain_node( > bd->domid = (domid_t)val; > printk(" domid: %d\n", bd->domid); > } > +

Re: [PATCH 11/15] x86/hyperlaunch: add domain id parsing to domain config

2024-12-02 Thread Jan Beulich
On 23.11.2024 19:20, Daniel P. Smith wrote: > --- a/xen/arch/x86/domain_builder/fdt.h > +++ b/xen/arch/x86/domain_builder/fdt.h > @@ -27,6 +27,24 @@ static inline int __init fdt_cell_as_u64(const fdt32_t > *cell, uint64_t *val) > return 0; > } > > +static inline int __init fdt_prop_as_u32(

Re: [PATCH 12/15] x86/hyperlaunch: specify dom0 mode with device tree

2024-12-02 Thread Jan Beulich
On 23.11.2024 19:20, Daniel P. Smith wrote: > --- a/xen/arch/x86/domain_builder/fdt.c > +++ b/xen/arch/x86/domain_builder/fdt.c > @@ -141,6 +141,25 @@ static int __init process_domain_node( > bd->domid = (domid_t)val; > printk(" domid: %d\n", bd->domid); > } > +

Re: [PATCH 13/15] x86/hyperlaunch: add memory parsing to domain config

2024-12-02 Thread Jan Beulich
On 23.11.2024 19:20, Daniel P. Smith wrote: > @@ -160,6 +161,42 @@ static int __init process_domain_node( > else > printk("PV\n"); > } > +if ( match_fdt_property(fdt, prop, "memory" ) ) > +{ > +uint64_t kb; > +if ( fdt_p

[PATCH v11 10/12] xen/arm: add Xen cache colors command line parameter

2024-12-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 X

[PATCH v11 12/12] xen/arm: add cache coloring support for Xen image

2024-12-02 Thread Carlo Nonato
Xen image is relocated to a new colored 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() and get_xen_paddr() are taken from f60658c6ae47 ("xe

[PATCH v11 04/12] xen/arm: add Dom0 cache coloring support

2024-12-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 mapping

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

2024-12-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 alloc

Re: [PATCH v11 08/12] xen/page_alloc: introduce preserved page flags macro

2024-12-02 Thread Carlo Nonato
Hi all, On Mon, Dec 2, 2024 at 5:59 PM Carlo Nonato wrote: > > PGC_static and PGC_extra need to be preserved when assigning a page. > Define a new macro that groups those flags and use it instead of or'ing > every time. > > Signed-off-by: Carlo Nonato > --- > v11: > - removed PGC_broken from PGC

Re: [PATCH] xen/arm32: Get rid of __memzero()

2024-12-02 Thread Julien Grall
Hi Jan, On 27/11/2024 11:09, Jan Beulich wrote: On 27.11.2024 11:55, Julien Grall wrote: From: Julien Grall All the code in arch/arm32/lib/ where copied from Linux 3.16 and never re-synced since then. A few years ago, Linux got rid of __memzero() because the implementation is very similar to

Re: stable-4.18: reliably crash network driver domain by squeezing free_memory

2024-12-02 Thread Marek Marczykowski-Górecki
On Mon, Dec 02, 2024 at 03:54:23PM +, James Dingwall wrote: > So there is some undefined range for (free_memory - m) to (free_memory - n) > where it is possible to crash the driver domain depending on the guest > startup ordering. My (perhaps naive) reasoning would be that > free_memory is the

Re: [PATCH 06/15] x86/hyperlaunch: introduce the domain builder

2024-12-02 Thread Jason Andryuk
On 2024-12-02 04:55, Jan Beulich wrote: On 25.11.2024 18:52, Jason Andryuk wrote: On 2024-11-23 13:20, Daniel P. Smith wrote: --- /dev/null +++ b/xen/arch/x86/domain_builder/fdt.c @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (C) 2024, Apertus Solutions, LLC +

Re: [PATCH v6 1/3] xen/arm: mpu: Create boot-time MPU protection regions

2024-12-02 Thread Ayan Kumar Halder
On 30/11/2024 17:45, Julien Grall wrote: Hi Ayan, Hi Julien, On 18/11/2024 12:12, Ayan Kumar Halder wrote: +/* + * Macro to prepare and set a EL2 MPU memory region. + * We will also create an according MPU memory region entry, which + * is a structure of pr_t,  in table \prmap. + * + * sel:

Re: [PATCH v10 08/12] xen/page_alloc: introduce preserved page flags macro

2024-12-02 Thread Jan Beulich
On 02.12.2024 13:51, Andrea Bastoni wrote: > The proposal would be to go back to v9, which reduces (for the PGC) > the management to colored only: > >> diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c > ... >> @@ -2382,7 +2556,7 @@ int assign_pages( >> >> for ( i = 0; i < nr

[PATCH v11 00/12] Arm cache coloring

2024-12-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 sof

[PATCH v11 05/12] xen: extend domctl interface for cache coloring

2024-12-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 Reviewed-by: Jan Beulich

Re: [PATCH v2 2/2] tools/xl: add suspend and resume subcommands

2024-12-02 Thread Jason Andryuk
On 2024-11-28 12:19, Anthony PERARD wrote: On Tue, Nov 26, 2024 at 12:19:41PM -0500, Jason Andryuk wrote: diff --git a/tools/xl/xl_vmcontrol.c b/tools/xl/xl_vmcontrol.c index c45d497c28..3160966972 100644 --- a/tools/xl/xl_vmcontrol.c +++ b/tools/xl/xl_vmcontrol.c @@ -42,6 +42,16 @@ static void

Re: [PATCH v2 1/2] xl: Keep monitoring suspended domain

2024-12-02 Thread Jason Andryuk
On 2024-12-02 03:53, Jan Beulich wrote: On 28.11.2024 17:45, Anthony PERARD wrote: On Tue, Nov 26, 2024 at 12:19:40PM -0500, Jason Andryuk wrote: When a VM transitioned to LIBXL_SHUTDOWN_REASON_SUSPEND, the xl daemon was exiting as 0 = DOMAIN_RESTART_NONE "No domain restart". Later, when the VM

New Xen Project Website

2024-12-02 Thread Kelly Choi
Hello Xen Community, For the past 12 months, I have been working with our web developer and UX designer on creating and refreshing our project website. I'm excited to share that this is now live! The URL remains the same and you can view this at *https://xenproject.org/ *

[PATCH] libs/guest: Fix migration compatibility with a security-patched Xen 4.13

2024-12-02 Thread Andrew Cooper
xc_cpuid_apply_policy() provides compatibility for migration of a pre-4.14 VM where no CPUID data was provided in the stream. It guesses the various max-leaf limits, based on what was true at the time of writing, but this was not correctly adapted when speculative security issues forced the advert

Re: [PATCH v2 1/4] common: remove -fno-stack-protector from EMBEDDED_EXTRA_CFLAGS

2024-12-02 Thread Jan Beulich
On 30.11.2024 02:10, Volodymyr Babchuk wrote: > This patch is preparation for making stack protector > configurable. First step is to remove -fno-stack-protector flag from > EMBEDDED_EXTRA_CFLAGS so separate projects (Hypervisor in this case) > can enable/disable this feature by themselves. s/proj

Re: [PATCH v2 4/4] xen: riscv: enable stack protector feature

2024-12-02 Thread Jan Beulich
On 30.11.2024 02:10, Volodymyr Babchuk wrote: > Enable previously added CONFIG_STACK_PROTECTOR feature for RISC-V > platform. Here we can call boot_stack_chk_guard_setup() in start_xen() > function, because it never returns, so stack protector code will not > be triggered because of changed canary.

Re: [PATCH v2 2/4] xen: common: add ability to enable stack protector

2024-12-02 Thread Jan Beulich
On 30.11.2024 02:10, Volodymyr Babchuk wrote: > --- /dev/null > +++ b/xen/common/stack-protector.c > @@ -0,0 +1,10 @@ > +// SPDX-License-Identifier: GPL-2.0-only > +#include > +#include > + > +unsigned long __ro_after_init __stack_chk_guard; > + > +void __stack_chk_fail(void) > +{ > +panic("D

[RFC PATCH 0/2] KVM: SEV: Prefer WBNOINVD over WBINVD for cache maintenance efficiency

2024-12-02 Thread Kevin Loughlin
AMD CPUs currently execute WBINVD in the host when unregistering SEV guest memory or when deactivating SEV guests. Such cache maintenance is performed to prevent data corruption, wherein the encrypted (C=1) version of a dirty cache line might otherwise only be written back after the memory is writt

RE: [PATCH, RESEND] x86/mtrr: Rename mtrr_overwrite_state() to guest_force_mtrr_state()

2024-12-02 Thread Michael Kelley
From: Kirill A. Shutemov Sent: Sunday, December 1, 2024 11:32 PM > > Rename the helper to better reflect its function. > > Signed-off-by: Kirill A. Shutemov > Suggested-by: Dave Hansen > Acked-by: Dave Hansen FWIW, I previously gave my "Reviewed-by" on this patch [1]. I didn't call it out e

Re: [RFC PATCH 1/2] x86, lib, xenpv: Add WBNOINVD helper functions

2024-12-02 Thread Juergen Gross
On 03.12.24 05:09, Xin Li wrote: On 12/2/2024 5:44 PM, Kevin Loughlin wrote: On Mon, Dec 2, 2024 at 5:28 PM Andrew Cooper wrote: On 03/12/2024 12:59 am, Kevin Loughlin wrote: diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h index d4eb9e1d61b8..c040af2d8eff 10064

Re: [PATCH v2 09/21] drm/etnaviv: Convert timeouts to secs_to_jiffies()

2024-12-02 Thread Christian Gmeiner
> > Changes made with the following Coccinelle rules: > > @@ constant C; @@ > > - msecs_to_jiffies(C * 1000) > + secs_to_jiffies(C) > > @@ constant C; @@ > > - msecs_to_jiffies(C * MSEC_PER_SEC) > + secs_to_jiffies(C) > > Signed-off-by: Easwar Hariharan Reviewed-by: Christian Gmeiner > --- > d

[RFC PATCH 2/2] KVM: SEV: Prefer WBNOINVD over WBINVD for cache maintenance efficiency

2024-12-02 Thread Kevin Loughlin
AMD CPUs currently execute WBINVD in the host when unregistering SEV guest memory or when deactivating SEV guests. Such cache maintenance is performed to prevent data corruption, wherein the encrypted (C=1) version of a dirty cache line might otherwise only be written back after the memory is writt

[RFC PATCH 1/2] x86, lib, xenpv: Add WBNOINVD helper functions

2024-12-02 Thread Kevin Loughlin
In line with WBINVD usage, add WBONINVD helper functions, accounting for kernels built with and without CONFIG_PARAVIRT_XXL. Signed-off-by: Kevin Loughlin --- arch/x86/include/asm/paravirt.h | 7 +++ arch/x86/include/asm/paravirt_types.h | 1 + arch/x86/include/asm/smp.h|

Re: [RFC PATCH 1/2] x86, lib, xenpv: Add WBNOINVD helper functions

2024-12-02 Thread Kevin Loughlin
On Mon, Dec 2, 2024 at 5:28 PM Andrew Cooper wrote: > > On 03/12/2024 12:59 am, Kevin Loughlin wrote: > > diff --git a/arch/x86/include/asm/paravirt.h > > b/arch/x86/include/asm/paravirt.h > > index d4eb9e1d61b8..c040af2d8eff 100644 > > --- a/arch/x86/include/asm/paravirt.h > > +++ b/arch/x86/inc

Re: [RFC PATCH 1/2] x86, lib, xenpv: Add WBNOINVD helper functions

2024-12-02 Thread Andrew Cooper
On 03/12/2024 12:59 am, Kevin Loughlin wrote: > diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h > index d4eb9e1d61b8..c040af2d8eff 100644 > --- a/arch/x86/include/asm/paravirt.h > +++ b/arch/x86/include/asm/paravirt.h > @@ -187,6 +187,13 @@ static __always_inline void

[PATCH] x86/paravirt: remove the wbinvd hook

2024-12-02 Thread Juergen Gross
The wbinvd paravirt hook is a leftover of lguest times. Today it is no longer needed, as all users use the native wbinvd implementation. Remove the hook and rename native_wbinvd() to wbinvd(). Signed-off-by: Juergen Gross --- arch/x86/include/asm/paravirt.h | 7 --- arch/x86/inclu

Re: [RFC PATCH 1/2] x86, lib, xenpv: Add WBNOINVD helper functions

2024-12-02 Thread Xin Li
On 12/2/2024 5:44 PM, Kevin Loughlin wrote: On Mon, Dec 2, 2024 at 5:28 PM Andrew Cooper wrote: On 03/12/2024 12:59 am, Kevin Loughlin wrote: diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h index d4eb9e1d61b8..c040af2d8eff 100644 --- a/arch/x86/include/asm/parav