Re: [PATCH v2 15/15] kconfig: Allow x86 to pick CONFIG_DOM0LESS_BOOT

2025-06-06 Thread Stefano Stabellini
On Thu, 5 Jun 2025, Alejandro Vallejo wrote: > Without picking CONFIG_HAS_DEVICE_TREE. > > In order to do that. Allow CONFIG_DOM0LESS_BOOT to enable a subset > of the common/device-tree/ directory. x86 doesn't want dom0less-build.c, > as that's tightly integrated still to the ARM way of building d

Re: [PATCH v2 13/15] xen/dt: ifdef out DEV_DT-related bits from device_tree.{c,h}

2025-06-06 Thread Stefano Stabellini
On Thu, 5 Jun 2025, Alejandro Vallejo wrote: > ... which means, device-tree.c stops requiring strictly CONFIG_HAS_DEVICE_TREE > and may function without it. > > Not a functional change on architectures that currently use these files, > as they already select CONFIG_HAS_DEVICE_TREE. > > Signed-off

Re: [PATCH v2 14/15] xen/dt: Allow CONFIG_DOM0LESS_BOOT to include device-tree/

2025-06-06 Thread Stefano Stabellini
On Thu, 5 Jun 2025, Alejandro Vallejo wrote: > ... without CONFIG_HAS_DEVICE_TREE > > Signed-off-by: Alejandro Vallejo Reviewed-by: Stefano Stabellini

Re: [PATCH v2 11/15] xen/dt: Move bootinfo-independent helpers out of bootinfo-fdt.c

2025-06-06 Thread Stefano Stabellini
On Thu, 5 Jun 2025, Alejandro Vallejo wrote: > ... back into bootfdt.c > > These will be required by x86 later on to detect modules in the early scan of > the FDT. They are independent of bootinfo, so it's cleaner for them to exist > in > a separate file. > > Not a functional change. > > Signed

Re: [PATCH v2 09/15] xen/dt: Move bootinfo functions to a new bootinfo.h

2025-06-06 Thread Stefano Stabellini
On Thu, 5 Jun 2025, Alejandro Vallejo wrote: > Part of an unpicking process to extract bootfdt contents independent of > bootinfo to a separate file for x86 to take. > > With this, bootfdt.h can be cleanly included from x86. A later patch > extracts the definitions so the functions may be called t

Re: [PATCH v2 07/15] x86: Replace boot_domain with bootdomain

2025-06-06 Thread Stefano Stabellini
On Thu, 5 Jun 2025, Alejandro Vallejo wrote: > No functional change intended. > > Signed-off-by: Alejandro Vallejo > --- > v2: > * Replaces the previous patch in which kernel_info replaced boot_domain > --- > xen/arch/x86/dom0_build.c | 2 +- > xen/arch/x86/hvm/dom0_build.c

Re: [PATCH v1] xen/console: group pbuf under console field

2025-06-06 Thread dmkhn
On Fri, Jun 06, 2025 at 08:24:44PM +, Teddy Astie wrote: > Hello, > > Le 06/06/2025 à 21:51, dm...@proton.me a écrit : > > From: Denis Mukhin > > > > Group all pbuf-related data structures under domain's console field. > > > > No functional change. > > > > Signed-off-by: Denis Mukhin > > ---

[PATCH v4] automation/eclair: update configuration of D4.10

2025-06-06 Thread Stefano Stabellini
MISRA C Directive 4.10 states that "Precautions shall be taken in order to prevent the contents of a header file being included more than once". Add a SAF tag to the existing comment on top of cpufeatures.h. Add a header inclusion guard to compile.h. Update ECLAIR configuration to: - extend exist

Re: [PATCH v9 2/3] xen/domain: adjust domain ID allocation for Arm

2025-06-06 Thread Julien Grall
Hi Denis, On 05/06/2025 23:05, Julien Grall wrote: Hi Denis, On 28/05/2025 23:50, dm...@proton.me wrote: From: Denis Mukhin From: Denis Mukhin Remove the hardcoded domain ID 0 allocation for hardware domain and replace it with a call to get_initial_domain_id() (returns the value of hardw

[PATCH v2 3/3] xen/x86: add missing noreturn attributes

2025-06-06 Thread victorm.lira
From: Nicola Vetrini The marked functions never return to their caller, but lack the `noreturn' attribute. Functions that never return should be declared with a `noreturn' attribute. The lack of `noreturn' causes a violation of MISRA C Rule 17.11 (not currently accepted in Xen), and also Rule 2

[PATCH v2 1/3] xen/keyhandler: add missing noreturn attribute

2025-06-06 Thread victorm.lira
From: Nicola Vetrini Function `reboot_machine' does not return, but lacks the `noreturn' attribute. Functions that never return should be declared with a `noreturn' attribute. The lack of `noreturn' causes a violation of MISRA C Rule 17.11 (not currently accepted in Xen), and also Rule 2.1: "A

[PATCH v2 2/3] xen/arm: add missing noreturn attributes

2025-06-06 Thread victorm.lira
From: Nicola Vetrini The marked functions never return to their caller, but lack the `noreturn' attribute. Functions that never return should be declared with a `noreturn' attribute. The lack of `noreturn' causes a violation of MISRA C Rule 17.11 (not currently accepted in Xen), and also Rule 2

Re: [PATCH] x86: remove memcmp calls non-compliant with Rule 21.16.

2025-06-06 Thread Stefano Stabellini
On Fri, 6 Jun 2025, Nicola Vetrini wrote: > > > > Signed-off-by: Alessandro Zucchelli > > > > > > Missing your own S-o-b. > > > > > > Also (nit) may I ask that you drop the full stop from the patch subject? > > > > I'll add the S-o-B and fix the subject > > > > > > > > --- a/xen/arch/x86/dmi_

[PATCH v3] xen: add header guards to generated asm generic headers

2025-06-06 Thread Stefano Stabellini
MISRA D4.10 requires to have proper header guards in place in all header files. Add header guards for generated asm generic headers as well. Suggested-by: Jan Beulich Signed-off-by: Stefano Stabellini Acked-by: Jan Beulich --- Changes in v3: - switch from printf to echo --- xen/scripts/Makefil

Re: [PATCH v1] xen/console: group pbuf under console field

2025-06-06 Thread Teddy Astie
Hello, Le 06/06/2025 à 21:51, dm...@proton.me a écrit : > From: Denis Mukhin > > Group all pbuf-related data structures under domain's console field. > > No functional change. > > Signed-off-by: Denis Mukhin > --- > xen/arch/x86/hvm/hvm.c | 14 +++--- > xen/common/domain.c

Re: [PATCH 10/19] x86: Replace boot_module with bootmodule

2025-06-06 Thread Stefano Stabellini
On Fri, 6 Jun 2025, Jan Beulich wrote: > On 05.06.2025 19:40, Alejandro Vallejo wrote: > > On Thu Jun 5, 2025 at 7:28 PM CEST, Alejandro Vallejo wrote: > >> On Mon Jun 2, 2025 at 7:00 PM CEST, Andrew Cooper wrote: > >>> On 30/05/2025 1:02 pm, Alejandro Vallejo wrote: > These types resemble eac

[PATCH v3 1/2] xen/console: introduce CONSOLE_PREFIX

2025-06-06 Thread dmkhn
From: Denis Mukhin Add CONSOLE_PREFIX symbol to keep the prefix of the hypervisor's diagnostic messages. No functional change. Signed-off-by: Denis Mukhin --- Changes since v2: - n/a --- xen/drivers/char/console.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xen/

[PATCH v3 0/2] xen/console: updates to diagnostic messages prefixes

2025-06-06 Thread dmkhn
Patch 1 is purely cosmetic change, adds a symbol for hypervisor's messages. Patch 2 updates the logic how the domain prefix is formed for guest messages sent over emulated UART. [1] Link to v2: https://lore.kernel.org/xen-devel/20250605004601.1142090-1-dmuk...@ford.com/ [2] Link to CI: https://

[PATCH v3 2/2] xen/console: unify printout behavior for UART emulators

2025-06-06 Thread dmkhn
From: Denis Mukhin If virtual UART from domain X prints on the physical console, the behavior is updated to (see [1]): - console focus in domain X: do not prefix messages; - no console focus in domain X: prefix all messages with "(dX)". Use guest_printk() in all current in-hypervisor UART emulat

Re: [PATCH v2 08/15] xen/dt: Move bootfdt functions to xen/bootfdt.h

2025-06-06 Thread Stefano Stabellini
On Fri, 6 Jun 2025, Alejandro Vallejo wrote: > On Fri Jun 6, 2025 at 10:59 AM CEST, Michal Orzel wrote: > > > > > > On 05/06/2025 21:48, Alejandro Vallejo wrote: > >> Part of an unpicking process to extract bootfdt contents independent of > >> bootinfo > >> to a separate file for x86 to take. > >>

[PATCH v1] xen/console: group pbuf under console field

2025-06-06 Thread dmkhn
From: Denis Mukhin Group all pbuf-related data structures under domain's console field. No functional change. Signed-off-by: Denis Mukhin --- xen/arch/x86/hvm/hvm.c | 14 +++--- xen/common/domain.c| 8 xen/drivers/char/console.c | 19 +++ xen/incl

Re: [PATCH v2 2/2] xen/console: unify printout behavior for UART emulators

2025-06-06 Thread dmkhn
On Fri, Jun 06, 2025 at 09:12:06AM +0200, Jan Beulich wrote: > On 06.06.2025 09:06, dm...@proton.me wrote: > > On Thu, Jun 05, 2025 at 08:18:34AM +0200, Jan Beulich wrote: > >> On 05.06.2025 02:46, dm...@proton.me wrote: > >>> From: Denis Mukhin > >>> > >>> If virtual UART from domain X prints on

Re: [PATCH v1 0/3] Enable R52 support for the first chunk of MPU support

2025-06-06 Thread Ayan Kumar Halder
Hi, On 04/06/2025 18:43, Ayan Kumar Halder wrote: Hi all, This patch serie enables R52 support based on Luca's series. "[PATCH v6 0/6] First chunk for Arm R82 and MPU support". I have submitted a v2 "[PATCH v2 0/3] Enable R52 support for the first chunk of MPU support" with all the comments

[PATCH v2 2/3] arm/mpu: Provide and populate MPU C data structures

2025-06-06 Thread Ayan Kumar Halder
Modify Arm32 assembly boot code to reset any unused MPU region, initialise 'max_mpu_regions' with the number of supported MPU regions and set/clear the bitmap 'xen_mpumap_mask' used to track the enabled regions. Use the macro definition for "dcache_line_size" from linux. Signed-off-by: Ayan Kumar

[PATCH v2 1/3] arm/mpu: Introduce MPU memory region map structure

2025-06-06 Thread Ayan Kumar Halder
Introduce pr_t typedef which is a structure having the prbar and prlar members, each being structured as the registers of the AArch32 Armv8-R architecture. Also, define MPU_REGION_RES0 to 0 as there are no reserved 0 bits beyond the BASE or LIMIT bitfields in prbar or prlar respectively. Signed-o

[PATCH v2 3/3] arm/mpu: Provide access to the MPU region from the C code

2025-06-06 Thread Ayan Kumar Halder
Enable the helper functions defined in mpu/mm.c and asm/mpu.h for ARM32. Define the register definitions for HPRBAR{0..31} and HPRLAR{0..31}. One can directly access the first 32 MPU regions using the above registers without the use of PRSELR. Also fix the register definition for HPRLAR. Signed-o

[PATCH v2 0/3] Enable R52 support for the first chunk of MPU support

2025-06-06 Thread Ayan Kumar Halder
Hi all, This patch serie enables R52 support based on Luca's series. "[PATCH v6 0/6] First chunk for Arm R82 and MPU support". Ayan Kumar Halder (3): arm/mpu: Introduce MPU memory region map structure arm/mpu: Provide and populate MPU C data structures arm/mpu: Provide access to the MPU reg

Re: [PATCH v1 1/5] console: add relocation hook

2025-06-06 Thread Marek Marczykowski-Górecki
On Fri, Jun 06, 2025 at 08:26:33AM +0200, Jan Beulich wrote: > On 05.06.2025 18:08, Marek Marczykowski-Górecki wrote: > > On Thu, Jun 05, 2025 at 06:05:02PM +0200, Jan Beulich wrote: > >> On 05.06.2025 16:51, Marek Marczykowski-Górecki wrote: > >>> On Thu, Jun 05, 2025 at 04:42:53PM +0200, Jan Beul

Re: [PATCH 1/3] x86/EFI: Fix detection of buildid

2025-06-06 Thread Andrew Cooper
On 06/06/2025 8:22 am, Jan Beulich wrote: > On 05.06.2025 19:01, Andrew Cooper wrote: >> On 05/06/2025 2:24 pm, Jan Beulich wrote: >>> On 05.06.2025 14:14, Andrew Cooper wrote: On 05/06/2025 1:02 pm, Jan Beulich wrote: > On 05.06.2025 13:16, Andrew Cooper wrote: This really is a prope

Re: [PATCH v3] x86/hvmloader: select xenpci MMIO BAR UC or WB MTRR cache attribute

2025-06-06 Thread Roger Pau Monné
On Fri, Jun 06, 2025 at 01:00:19PM +, Tu Dinh wrote: > Hi Roger, > > On 05/06/2025 18:20, Roger Pau Monne wrote: > > The Xen PCI device (vendor ID 0x5853) exposed to x86 HVM guests doesn't > > have the functionality of a traditional PCI device. The exposed MMIO BAR > > is used by some guests

Re: [PATCH v3] x86/hvmloader: select xenpci MMIO BAR UC or WB MTRR cache attribute

2025-06-06 Thread Roger Pau Monné
On Thu, Jun 05, 2025 at 06:16:59PM +0200, Roger Pau Monne wrote: > The Xen PCI device (vendor ID 0x5853) exposed to x86 HVM guests doesn't > have the functionality of a traditional PCI device. The exposed MMIO BAR > is used by some guests (including Linux) as a safe place to map foreign > memory,

Re: [PATCH v3] x86/hvmloader: select xenpci MMIO BAR UC or WB MTRR cache attribute

2025-06-06 Thread Tu Dinh
On 06/06/2025 15:23, Roger Pau Monné wrote: [...] >> >> Since this is meant to be a workaround, I wonder if it makes more sense >> to flip the setting (`xenpci_bar_wb`) and make it 0 by default? > > I originally didn't want to go that route, because while it's true > that the default MTRR type is s

Re: [PATCH v5 3/6] x86: re-work memcpy()

2025-06-06 Thread Teddy Astie
Le 06/06/2025 à 11:13, Jan Beulich a écrit : > On 05.06.2025 19:06, Teddy Astie wrote: >> Le 05/06/2025 à 12:27, Jan Beulich a écrit : >>> Move the function to its own assembly file. Having it in C just for the >>> entire body to be an asm() isn't really helpful. Then have two flavors: >>> A "basic

Re: [PATCH v5 4/6] x86: control memset() and memcpy() inlining

2025-06-06 Thread Teddy Astie
Le 06/06/2025 à 11:21, Jan Beulich a écrit : > On 05.06.2025 19:34, Teddy Astie wrote: >> Le 05/06/2025 à 12:28, Jan Beulich a écrit : >>> Stop the compiler from inlining non-trivial memset() and memcpy() (for >>> memset() see e.g. map_vcpu_info() or kimage_load_segments() for >>> examples). This w

Re: [PATCH] x86: remove memcmp calls non-compliant with Rule 21.16.

2025-06-06 Thread Andrew Cooper
On 05/06/2025 12:35 am, Stefano Stabellini wrote: > From: Alessandro Zucchelli > > MISRA C Rule 21.16 states the following: "The pointer arguments to > the Standard Library function `memcmp' shall point to either a pointer > type, an essentially signed type, an essentially unsigned type, an > esse

Re: [PATCH v3] x86/hvmloader: select xenpci MMIO BAR UC or WB MTRR cache attribute

2025-06-06 Thread Tu Dinh
Hi Roger, On 05/06/2025 18:20, Roger Pau Monne wrote: > The Xen PCI device (vendor ID 0x5853) exposed to x86 HVM guests doesn't > have the functionality of a traditional PCI device. The exposed MMIO BAR > is used by some guests (including Linux) as a safe place to map foreign > memory, including

Re: [PATCH v1 1/3] arm/mpu: Introduce MPU memory region map structure

2025-06-06 Thread Ayan Kumar Halder
On 06/06/2025 13:43, Ayan Kumar Halder wrote: Hi Michal, On 06/06/2025 11:13, Orzel, Michal wrote: On 05/06/2025 15:39, Ayan Kumar Halder wrote: Hi Michal, On 05/06/2025 08:06, Orzel, Michal wrote: On 04/06/2025 19:43, Ayan Kumar Halder wrote: Introduce pr_t typedef which is a structure h

Re: [PATCH v1 1/3] arm/mpu: Introduce MPU memory region map structure

2025-06-06 Thread Ayan Kumar Halder
Hi Michal, On 06/06/2025 11:13, Orzel, Michal wrote: On 05/06/2025 15:39, Ayan Kumar Halder wrote: Hi Michal, On 05/06/2025 08:06, Orzel, Michal wrote: On 04/06/2025 19:43, Ayan Kumar Halder wrote: Introduce pr_t typedef which is a structure having the prbar and prlar members, each being st

Re: [PATCH v5 4/6] x86: control memset() and memcpy() inlining

2025-06-06 Thread Jan Beulich
On 05.06.2025 19:34, Teddy Astie wrote: > Le 05/06/2025 à 12:28, Jan Beulich a écrit : >> Stop the compiler from inlining non-trivial memset() and memcpy() (for >> memset() see e.g. map_vcpu_info() or kimage_load_segments() for >> examples). This way we even keep the compiler from using REP STOSQ /

Re: [PATCH v2 02/15] arm/gnttab: Break links between asm/grant_table.h and xen/grant_table.h

2025-06-06 Thread Jan Beulich
On 06.06.2025 12:30, Alejandro Vallejo wrote: > On Fri Jun 6, 2025 at 12:07 PM CEST, Jan Beulich wrote: >> On 06.06.2025 12:02, Alejandro Vallejo wrote: >>> On Fri Jun 6, 2025 at 8:52 AM CEST, Jan Beulich wrote: On 05.06.2025 21:47, Alejandro Vallejo wrote: > --- a/xen/common/grant_table.c

Re: [PATCH v3 1/2] xen/arm: exclude xen,reg from direct-map domU extended regions

2025-06-06 Thread Stewart Hildebrand
On 5/14/25 02:49, Jan Beulich wrote: > On 13.05.2025 21:54, Stewart Hildebrand wrote: >> --- a/xen/common/rangeset.c >> +++ b/xen/common/rangeset.c >> @@ -433,6 +433,20 @@ bool rangeset_is_empty( >> return ((r == NULL) || list_empty(&r->range_list)); >> } >> >> +int rangeset_count_ranges(co

Re: [PATCH v2 02/15] arm/gnttab: Break links between asm/grant_table.h and xen/grant_table.h

2025-06-06 Thread Alejandro Vallejo
On Fri Jun 6, 2025 at 12:07 PM CEST, Jan Beulich wrote: > On 06.06.2025 12:02, Alejandro Vallejo wrote: >> On Fri Jun 6, 2025 at 8:52 AM CEST, Jan Beulich wrote: >>> On 05.06.2025 21:47, Alejandro Vallejo wrote: --- a/xen/common/grant_table.c +++ b/xen/common/grant_table.c @@ -42,8 +

Re: [PATCH v2 01/15] xen: Clean up asm-generic/device.h

2025-06-06 Thread Alejandro Vallejo
On Fri Jun 6, 2025 at 12:03 PM CEST, Jan Beulich wrote: > On 06.06.2025 11:55, Alejandro Vallejo wrote: >> On Fri Jun 6, 2025 at 8:51 AM CEST, Jan Beulich wrote: >>> On 05.06.2025 21:47, Alejandro Vallejo wrote: --- a/xen/include/asm-generic/device.h +++ b/xen/include/asm-generic/device.h

Re: [PATCH 09/11] tools/xc: Add `node` argument to xc_domain_claim_pages()

2025-06-06 Thread Roger Pau Monné
On Fri, Mar 14, 2025 at 05:25:00PM +, Alejandro Vallejo wrote: > Add a node argument to make an exact-node claim. NUMA_NO_NODE means to > make a regular any-node claim. > > No functional change. > > Signed-off-by: Alejandro Vallejo > --- > tools/include/xenctrl.h | 1 + > tools/libs/

[PATCH v3 1/2] xen: Introduce system suspend config option

2025-06-06 Thread Mykola Kvach
From: Mykyta Poturai This option enables the system suspend support. This is the mechanism that allows the system to be suspended to RAM and later resumed. The patch introduces three options: - HAS_SYSTEM_SUSPEND: indicates suspend support is available on the platform. - SYSTEM_SUSPEND_ALWAYS_ON

Re: [PATCH v2 02/15] arm/gnttab: Break links between asm/grant_table.h and xen/grant_table.h

2025-06-06 Thread Jan Beulich
On 06.06.2025 12:02, Alejandro Vallejo wrote: > On Fri Jun 6, 2025 at 8:52 AM CEST, Jan Beulich wrote: >> On 05.06.2025 21:47, Alejandro Vallejo wrote: >>> --- a/xen/common/grant_table.c >>> +++ b/xen/common/grant_table.c >>> @@ -42,8 +42,10 @@ >>> #include >>> #include >>> #include >>> + >>>

Re: [PATCH v1 2/3] arm/mpu: Provide and populate MPU C data structures

2025-06-06 Thread Orzel, Michal
On 05/06/2025 16:27, Ayan Kumar Halder wrote: > Hi Michal/Julien, > > On 05/06/2025 08:44, Orzel, Michal wrote: >> >> On 04/06/2025 19:43, Ayan Kumar Halder wrote: >>> Do the arm32 equivalent initialization for commit id ca5df936c4. >> This is not a good commit msg. >> Also, we somewhat require

Re: [PATCH v1 1/3] arm/mpu: Introduce MPU memory region map structure

2025-06-06 Thread Orzel, Michal
On 05/06/2025 15:39, Ayan Kumar Halder wrote: > Hi Michal, > > On 05/06/2025 08:06, Orzel, Michal wrote: >> >> On 04/06/2025 19:43, Ayan Kumar Halder wrote: >>> Introduce pr_t typedef which is a structure having the prbar and prlar >>> members, >>> each being structured as the registers of the

[PATCH v3 0/2] Add CONFIG_SYSTEM_SUSPEND and SCIF UART suspend/resume handlers

2025-06-06 Thread Mykola Kvach
From: Mykola Kvach Hi all, This patch series introduces CONFIG_SYSTEM_SUSPEND to Xen and implements suspend/resume handlers for the SCIF UART driver. These changes address feedback and discussions on the Xen-devel mailing list: https://lists.xenproject.org/archives/html/xen-devel/2025-03/ms

[PATCH v3 2/2] xen/char: implement suspend/resume calls for SCIF driver

2025-06-06 Thread Mykola Kvach
From: Volodymyr Babchuk The changes have been tested only on the Renesas R-Car H3 Starter Kit board. Signed-off-by: Volodymyr Babchuk Signed-off-by: Oleksandr Andrushchenko Signed-off-by: Mykola Kvach --- In patch v2, I just added a CONFIG_SYSTEM_SUSPEND check around the suspend/resume functi

Re: [PATCH v2 08/15] xen/dt: Move bootfdt functions to xen/bootfdt.h

2025-06-06 Thread Alejandro Vallejo
On Fri Jun 6, 2025 at 10:59 AM CEST, Michal Orzel wrote: > > > On 05/06/2025 21:48, Alejandro Vallejo wrote: >> Part of an unpicking process to extract bootfdt contents independent of >> bootinfo >> to a separate file for x86 to take. >> >> Move functions required for early FDT parsing from devic

Re: [PATCH v2 01/15] xen: Clean up asm-generic/device.h

2025-06-06 Thread Jan Beulich
On 06.06.2025 11:55, Alejandro Vallejo wrote: > On Fri Jun 6, 2025 at 8:51 AM CEST, Jan Beulich wrote: >> On 05.06.2025 21:47, Alejandro Vallejo wrote: >>> --- a/xen/include/asm-generic/device.h >>> +++ b/xen/include/asm-generic/device.h >>> @@ -1,14 +1,20 @@ >>> /* SPDX-License-Identifier: GPL-2.

Re: [PATCH v2 02/15] arm/gnttab: Break links between asm/grant_table.h and xen/grant_table.h

2025-06-06 Thread Alejandro Vallejo
On Fri Jun 6, 2025 at 8:52 AM CEST, Jan Beulich wrote: > On 05.06.2025 21:47, Alejandro Vallejo wrote: >> --- a/xen/common/grant_table.c >> +++ b/xen/common/grant_table.c >> @@ -42,8 +42,10 @@ >> #include >> #include >> #include >> + >> #include >> #include >> +#include >> >> #ifdef C

Re: [PATCH v2 01/15] xen: Clean up asm-generic/device.h

2025-06-06 Thread Alejandro Vallejo
On Fri Jun 6, 2025 at 8:51 AM CEST, Jan Beulich wrote: > On 05.06.2025 21:47, Alejandro Vallejo wrote: >> --- a/xen/include/asm-generic/device.h >> +++ b/xen/include/asm-generic/device.h >> @@ -1,14 +1,20 @@ >> /* SPDX-License-Identifier: GPL-2.0-only */ >> +/* >> + * This header helps DTB-based a

Re: [PATCH v5 08/10] vpci/rebar: Free Rebar resources when init_rebar() fails

2025-06-06 Thread Roger Pau Monné
On Fri, Jun 06, 2025 at 08:32:35AM +, Chen, Jiqian wrote: > On 2025/6/5 23:14, Roger Pau Monné wrote: > > On Mon, May 26, 2025 at 05:45:57PM +0800, Jiqian Chen wrote: > >> When init_rebar() fails, current logic return fail and free Rebar-related > >> resources in vpci_deassign_device(). But the

Re: [PATCH v5 04/10] vpci: Refactor REGISTER_VPCI_INIT

2025-06-06 Thread Roger Pau Monné
On Fri, Jun 06, 2025 at 09:05:48AM +0200, Jan Beulich wrote: > On 06.06.2025 08:29, Chen, Jiqian wrote: > > On 2025/6/5 20:50, Roger Pau Monné wrote: > >> On Mon, May 26, 2025 at 05:45:53PM +0800, Jiqian Chen wrote: > >>> + }; \ > >>> + static vpci_capability_t *const finit##_entry \ > >>> +

Re: [PATCH v5 10/10] vpci/msix: Free MSIX resources when init_msix() fails

2025-06-06 Thread Roger Pau Monné
On Fri, Jun 06, 2025 at 08:44:02AM +, Chen, Jiqian wrote: > On 2025/6/5 23:34, Roger Pau Monné wrote: > > On Mon, May 26, 2025 at 05:45:59PM +0800, Jiqian Chen wrote: > >> When init_msix() fails, current logic return fail and free MSIX-related > >> resources in vpci_deassign_device(). But the p

Re: [PATCH v5 09/10] vpci/msi: Free MSI resources when init_msi() fails

2025-06-06 Thread Roger Pau Monné
On Fri, Jun 06, 2025 at 08:38:49AM +, Chen, Jiqian wrote: > On 2025/6/5 23:19, Roger Pau Monné wrote: > > On Mon, May 26, 2025 at 05:45:58PM +0800, Jiqian Chen wrote: > >> When init_msi() fails, current logic return fail and free MSI-related > >> resources in vpci_deassign_device(). But the pre

Re: [PATCH 11/11] docs/man: Document the new claim_on_node option

2025-06-06 Thread Roger Pau Monné
On Fri, Mar 14, 2025 at 05:25:02PM +, Alejandro Vallejo wrote: > ... and while at it, add missing relevant links to xl-numa-placement(7) > in xl.1.pod.in and xl.cfg.5.pod.in, which describes libxl's behaviour on > NUMA placement. Oh, here it is. This should be part of the previous patch. I s

Re: [PATCH v5 06/10] vpci: Hide extended capability when it fails to initialize

2025-06-06 Thread Roger Pau Monné
On Fri, Jun 06, 2025 at 08:30:42AM +, Chen, Jiqian wrote: > On 2025/6/5 22:47, Roger Pau Monné wrote: > > On Mon, May 26, 2025 at 05:45:55PM +0800, Jiqian Chen wrote: > >> @@ -209,11 +301,11 @@ static int vpci_init_capabilities(struct pci_dev > >> *pdev) > >> pdev->domain,

Re: [PATCH v5 2/6] x86: re-work memset()

2025-06-06 Thread Jan Beulich
On 05.06.2025 18:59, Teddy Astie wrote: > Le 05/06/2025 à 12:26, Jan Beulich a écrit : >> --- a/xen/arch/x86/alternative.c >> +++ b/xen/arch/x86/alternative.c >> @@ -346,6 +346,12 @@ static int init_or_livepatch _apply_alte >> /* 0xe8/0xe9 are relative branches; fix the offset. */ >>

Re: [PATCH 10/11] tools/xl: Expose a "claim_on_node" setting in xl.cfg

2025-06-06 Thread Roger Pau Monné
On Fri, Mar 14, 2025 at 05:25:01PM +, Alejandro Vallejo wrote: > Expose a setting to explicitly select a NUMA node for created domains > > If the hypervisor can't reserve enough memory in the relevant NUMA node > it fails the claim early. Also, disable automatic NUMA placement when > this new

Re: [PATCH v5 05/10] vpci: Hide legacy capability when it fails to initialize

2025-06-06 Thread Roger Pau Monné
On Fri, Jun 06, 2025 at 07:03:02AM +, Chen, Jiqian wrote: > On 2025/6/5 21:35, Roger Pau Monné wrote: > > On Mon, May 26, 2025 at 05:45:54PM +0800, Jiqian Chen wrote: > >> When vpci fails to initialize a legacy capability of device, it just > >> returns an error and vPCI gets disabled for the w

Re: [PATCH v5 3/6] x86: re-work memcpy()

2025-06-06 Thread Jan Beulich
On 05.06.2025 19:06, Teddy Astie wrote: > Le 05/06/2025 à 12:27, Jan Beulich a écrit : >> Move the function to its own assembly file. Having it in C just for the >> entire body to be an asm() isn't really helpful. Then have two flavors: >> A "basic" version using qword steps for the bulk of the ope

Re: [PATCH v2 08/15] xen/dt: Move bootfdt functions to xen/bootfdt.h

2025-06-06 Thread Orzel, Michal
On 05/06/2025 21:48, Alejandro Vallejo wrote: > Part of an unpicking process to extract bootfdt contents independent of > bootinfo > to a separate file for x86 to take. > > Move functions required for early FDT parsing from device_tree.h and arm's > setup.h onto bootfdt.h > > Declaration moti

Re: [PATCH v4][PART 1 2/4] xen/arm: Implement PSCI SYSTEM_SUSPEND call for guests

2025-06-06 Thread Mykola Kvach
On Fri, Jun 6, 2025 at 11:40 AM Julien Grall wrote: > > Hi Mykola, > > On 06/06/2025 09:26, Mykola Kvach wrote: > > On Fri, Jun 6, 2025 at 6:52 AM Mykola Kvach wrote: > >> > >> Hi, @Julien Grall > >> > >> On Wed, Jun 4, 2025 at 2:00 AM Julien Grall wrote: > >>> > >>> Hi Mykola, > >>> > >>> On 27

Re: [PATCH 08/11] xen/memory: Enable parsing NUMA node argument in XENMEM_claim_pages

2025-06-06 Thread Roger Pau Monné
On Fri, Mar 14, 2025 at 05:24:59PM +, Alejandro Vallejo wrote: > Extract a NUMA node from mem_flags. This _must_ be an exact node, and > has the semantics of making a claim on a specific node. > > Signed-off-by: Alejandro Vallejo > --- > xen/common/memory.c | 23 --- > 1

Re: [PATCH v5 09/10] vpci/msi: Free MSI resources when init_msi() fails

2025-06-06 Thread Chen, Jiqian
On 2025/6/5 23:19, Roger Pau Monné wrote: > On Mon, May 26, 2025 at 05:45:58PM +0800, Jiqian Chen wrote: >> When init_msi() fails, current logic return fail and free MSI-related >> resources in vpci_deassign_device(). But the previous new changes will >> hide MSI capability and return success, it c

Re: [PATCH v4][PART 1 2/4] xen/arm: Implement PSCI SYSTEM_SUSPEND call for guests

2025-06-06 Thread Julien Grall
Hi Mykola, On 06/06/2025 09:26, Mykola Kvach wrote: On Fri, Jun 6, 2025 at 6:52 AM Mykola Kvach wrote: Hi, @Julien Grall On Wed, Jun 4, 2025 at 2:00 AM Julien Grall wrote: Hi Mykola, On 27/05/2025 10:18, Mykola Kvach wrote: From: Mykola Kvach This patch adds support for the PSCI SYSTE

Re: [PATCH v2 03/15] xen/dt: Add BOOTMOD_MICROCODE

2025-06-06 Thread Orzel, Michal
On 05/06/2025 21:47, Alejandro Vallejo wrote: > In preparation for x86 to start using bootmodule instead of boot_module > > Signed-off-by: Alejandro Vallejo Reviewed-by: Michal Orzel ~Michal

Re: [PATCH v5 10/10] vpci/msix: Free MSIX resources when init_msix() fails

2025-06-06 Thread Chen, Jiqian
On 2025/6/5 23:34, Roger Pau Monné wrote: > On Mon, May 26, 2025 at 05:45:59PM +0800, Jiqian Chen wrote: >> When init_msix() fails, current logic return fail and free MSIX-related >> resources in vpci_deassign_device(). But the previous new changes will >> hide MSIX capability and return success, i

Re: [PATCH v3 1/5] x86/pmstat: Check size of PMSTAT_get_pxstat buffers

2025-06-06 Thread Ross Lagerwall
On Thu, Jun 5, 2025 at 11:10 AM Jan Beulich wrote: > > On 27.05.2025 17:26, Ross Lagerwall wrote: > > --- a/xen/include/public/sysctl.h > > +++ b/xen/include/public/sysctl.h > > @@ -215,11 +215,22 @@ typedef struct pm_px_val pm_px_val_t; > > DEFINE_XEN_GUEST_HANDLE(pm_px_val_t); > > > > struct p

[PATCH v2] xen/arm: Standardize R-Car platform Kconfig descriptions

2025-06-06 Thread Jahan Murudi
Change "RCar3/RCar4" to "R-Car Gen3/Gen4" to match official Renesas branding. Aligns with documentation and industry-standard terminology. Signed-off-by: Jahan Murudi --- xen/arch/arm/platforms/Kconfig | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/xen/arch/arm/pl

Re: [PATCH 05/11] xen: Create per-node outstanding claims

2025-06-06 Thread Roger Pau Monné
On Fri, Mar 14, 2025 at 05:24:56PM +, Alejandro Vallejo wrote: > Extends domain_set_outstanding_claims() to allow staking claims on an > exact node. Also creates global per-node claim counts analogous to > `outstanding_claims`. Note that the per-node counts can't replace the > global one if we

Re: [PATCH 07/11] xen/page_alloc: Set node affinity when claiming pages from an exact node

2025-06-06 Thread Roger Pau Monné
On Fri, Mar 14, 2025 at 05:24:58PM +, Alejandro Vallejo wrote: > Set the domain's node affinity to the claimed node if the claim > specified an exact node. Do it immediately before making any changes in > case setting the affinity fails (even though it shouldn't). > > This allows preferentiall

Re: [PATCH v5 08/10] vpci/rebar: Free Rebar resources when init_rebar() fails

2025-06-06 Thread Chen, Jiqian
On 2025/6/5 23:14, Roger Pau Monné wrote: > On Mon, May 26, 2025 at 05:45:57PM +0800, Jiqian Chen wrote: >> When init_rebar() fails, current logic return fail and free Rebar-related >> resources in vpci_deassign_device(). But the previous new changes will >> hide Rebar capability and return success

Re: [PATCH v2] xen/arm: Standardize R-Car platform Kconfig descriptions

2025-06-06 Thread Orzel, Michal
On 06/06/2025 10:27, Jahan Murudi wrote: > Change "RCar3/RCar4" to "R-Car Gen3/Gen4" to match official Renesas branding. > Aligns with documentation and industry-standard terminology. > > Signed-off-by: Jahan Murudi I already gave Rb in v1, so you should have picked it. Reviewed-by: Michal Or

Re: [PATCH v5 06/10] vpci: Hide extended capability when it fails to initialize

2025-06-06 Thread Chen, Jiqian
On 2025/6/5 22:47, Roger Pau Monné wrote: > On Mon, May 26, 2025 at 05:45:55PM +0800, Jiqian Chen wrote: >> When vpci fails to initialize a extended capability of device, it >> just returns an error and vPCI gets disabled for the whole device. >> >> So, add function to hide extended capability when

Re: [PATCH v4][PART 1 2/4] xen/arm: Implement PSCI SYSTEM_SUSPEND call for guests

2025-06-06 Thread Mykola Kvach
On Fri, Jun 6, 2025 at 6:52 AM Mykola Kvach wrote: > > Hi, @Julien Grall > > On Wed, Jun 4, 2025 at 2:00 AM Julien Grall wrote: > > > > Hi Mykola, > > > > On 27/05/2025 10:18, Mykola Kvach wrote: > > > From: Mykola Kvach > > > > > > This patch adds support for the PSCI SYSTEM_SUSPEND function in

Re: [PATCH 06/11] xen/page_alloc: Hook per-node claims to alloc_heap_pages()

2025-06-06 Thread Roger Pau Monné
On Fri, Mar 14, 2025 at 05:24:57PM +, Alejandro Vallejo wrote: > Extend the claim checks in alloc_heap_pages() to exact-node claims. The > logic is slightly more complicated, so the patch moves it all to an > auxiliary function. > > exact-node claims also follow global claims in order to ensur

Re: [PATCH 05/11] xen: Create per-node outstanding claims

2025-06-06 Thread Roger Pau Monné
On Fri, Mar 14, 2025 at 05:24:56PM +, Alejandro Vallejo wrote: > Extends domain_set_outstanding_claims() to allow staking claims on an > exact node. Also creates global per-node claim counts analogous to > `outstanding_claims`. Note that the per-node counts can't replace the > global one if we

Re: [PATCH xen/arm 1/1] xen/arm: Standardize R-Car platform Kconfig descriptions

2025-06-06 Thread Orzel, Michal
On 06/06/2025 09:05, Jahan Murudi wrote: > Changed "RCar3/RCar4" to "R-Car Gen3/Gen4" to match official Renesas branding I mentioned this in the previous review. Please use imperative mood: s/Changed/Change. Also, you're missing a dot at the end of sentence. > Aligns with documentation and indu

Re: [PATCH 04/11] xen: Add node argument to domain_{adjust_tot_pages,set_outstanding_pages}()

2025-06-06 Thread Roger Pau Monné
On Fri, Mar 14, 2025 at 05:24:55PM +, Alejandro Vallejo wrote: > domain_adjust_tot_pages() decreases the outstanding claims of a domain > as pages are allocated, so that'll need to take into account the node in > which an allocation is done. Deallocations just pass NUMA_NO_NODE. > > domain_set

Re: [PATCH v2 2/2] xen/console: unify printout behavior for UART emulators

2025-06-06 Thread Jan Beulich
On 06.06.2025 09:06, dm...@proton.me wrote: > On Thu, Jun 05, 2025 at 08:18:34AM +0200, Jan Beulich wrote: >> On 05.06.2025 02:46, dm...@proton.me wrote: >>> From: Denis Mukhin >>> >>> If virtual UART from domain X prints on the physical console, the behavior >>> is >>> updated to (see [1]): >>>

Re: [PATCH v5 1/2] xen/domain: introduce common hardware emulation flags

2025-06-06 Thread dmkhn
On Thu, Jun 05, 2025 at 08:44:30AM +0200, Jan Beulich wrote: > On 05.06.2025 03:17, dm...@proton.me wrote: > > On Wed, Jun 04, 2025 at 12:36:17PM +0200, Jan Beulich wrote: > >> On 02.06.2025 21:17, dm...@proton.me wrote: > >>> From: Denis Mukhin > >>> > >>> Add common emulation_flags for configuri

Re: [PATCH] x86: remove memcmp calls non-compliant with Rule 21.16.

2025-06-06 Thread Nicola Vetrini
On 2025-06-06 09:26, Jan Beulich wrote: On 06.06.2025 09:12, Nicola Vetrini wrote: On 2025-06-06 01:39, Stefano Stabellini wrote: On Thu, 5 Jun 2025, Jan Beulich wrote: On 05.06.2025 01:35, Stefano Stabellini wrote: From: Alessandro Zucchelli MISRA C Rule 21.16 states the following: "The po

Re: [PATCH] x86: remove memcmp calls non-compliant with Rule 21.16.

2025-06-06 Thread Nicola Vetrini
On 2025-06-06 01:39, Stefano Stabellini wrote: On Thu, 5 Jun 2025, Jan Beulich wrote: On 05.06.2025 01:35, Stefano Stabellini wrote: > From: Alessandro Zucchelli > > MISRA C Rule 21.16 states the following: "The pointer arguments to > the Standard Library function `memcmp' shall point to either

Re: [PATCH v2] xen: add header guards to generated asm generic headers

2025-06-06 Thread Jan Beulich
On 06.06.2025 02:08, Stefano Stabellini wrote: > MISRA D4.10 requires to have proper header guards in place in all header > files. Add header guards for generated asm generic headers as well. > > Suggested-by: Jan Beulich > Signed-off-by: Stefano Stabellini Acked-by: Jan Beulich albeit, as men

Re: [PATCH] x86: remove memcmp calls non-compliant with Rule 21.16.

2025-06-06 Thread Jan Beulich
On 06.06.2025 09:12, Nicola Vetrini wrote: > On 2025-06-06 01:39, Stefano Stabellini wrote: >> On Thu, 5 Jun 2025, Jan Beulich wrote: >>> On 05.06.2025 01:35, Stefano Stabellini wrote: From: Alessandro Zucchelli MISRA C Rule 21.16 states the following: "The pointer arguments to

Re: [PATCH 1/3] x86/EFI: Fix detection of buildid

2025-06-06 Thread Jan Beulich
On 06.06.2025 09:22, Jan Beulich wrote: > On 05.06.2025 19:01, Andrew Cooper wrote: >> On 05/06/2025 2:24 pm, Jan Beulich wrote: >>> On 05.06.2025 14:14, Andrew Cooper wrote: On 05/06/2025 1:02 pm, Jan Beulich wrote: > On 05.06.2025 13:16, Andrew Cooper wrote: This really is a propert

Re: [PATCH 1/3] x86/EFI: Fix detection of buildid

2025-06-06 Thread Jan Beulich
On 05.06.2025 19:01, Andrew Cooper wrote: > On 05/06/2025 2:24 pm, Jan Beulich wrote: >> On 05.06.2025 14:14, Andrew Cooper wrote: >>> On 05/06/2025 1:02 pm, Jan Beulich wrote: On 05.06.2025 13:16, Andrew Cooper wrote: >>> This really is a property of being a PE32+ binary, and nothing to do >>

Re: [PATCH v5 1/2] xen/domain: introduce common hardware emulation flags

2025-06-06 Thread dmkhn
On Thu, Jun 05, 2025 at 11:08:07AM +0200, Roger Pau Monné wrote: > On Mon, Jun 02, 2025 at 07:17:30PM +, dm...@proton.me wrote: > > From: Denis Mukhin > > > > Add common emulation_flags for configuring domain emulation features. > > > > Print d->emulation_flags from 'q' keyhandler for better t

Re: [PATCH v2 2/2] xen/console: unify printout behavior for UART emulators

2025-06-06 Thread dmkhn
On Thu, Jun 05, 2025 at 08:18:34AM +0200, Jan Beulich wrote: > On 05.06.2025 02:46, dm...@proton.me wrote: > > From: Denis Mukhin > > > > If virtual UART from domain X prints on the physical console, the behavior > > is > > updated to (see [1]): > > - console focus in domain X: do not prefix mess

Re: [PATCH v5 04/10] vpci: Refactor REGISTER_VPCI_INIT

2025-06-06 Thread Jan Beulich
On 06.06.2025 08:29, Chen, Jiqian wrote: > On 2025/6/5 20:50, Roger Pau Monné wrote: >> On Mon, May 26, 2025 at 05:45:53PM +0800, Jiqian Chen wrote: >>> + }; \ >>> + static vpci_capability_t *const finit##_entry \ >>> + __used_section(".data.vpci") = &finit##_t >> >> IMO this shou

[PATCH xen/arm 1/1] xen/arm: Standardize R-Car platform Kconfig descriptions

2025-06-06 Thread Jahan Murudi
Changed "RCar3/RCar4" to "R-Car Gen3/Gen4" to match official Renesas branding Aligns with documentation and industry-standard terminology Signed-off-by: Jahan Murudi --- xen/arch/arm/platforms/Kconfig | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/xen/arch/arm/pla

Re: [PATCH v9 1/3] xen/domain: unify domain ID allocation

2025-06-06 Thread Jan Beulich
On 29.05.2025 00:50, dm...@proton.me wrote: > @@ -1079,7 +1082,7 @@ static struct domain *__init create_dom0(struct > boot_info *bi) > > bd->d = d; > if ( construct_dom0(bd) != 0 ) > -panic("Could not construct domain 0\n"); > +panic("Could not construct domain %pd\n",

Re: [PATCH v5 05/10] vpci: Hide legacy capability when it fails to initialize

2025-06-06 Thread Chen, Jiqian
On 2025/6/5 21:35, Roger Pau Monné wrote: > On Mon, May 26, 2025 at 05:45:54PM +0800, Jiqian Chen wrote: >> When vpci fails to initialize a legacy capability of device, it just >> returns an error and vPCI gets disabled for the whole device. That >> most likely renders the device unusable, plus po

Re: [PATCH v5 3/4] xen/console: remove max_init_domid dependency

2025-06-06 Thread dmkhn
On Wed, Jun 04, 2025 at 02:55:40PM +0200, Jan Beulich wrote: > On 31.05.2025 01:19, dm...@proton.me wrote: > > --- a/xen/common/domain.c > > +++ b/xen/common/domain.c > > @@ -2461,6 +2461,39 @@ void domid_free(domid_t domid) > > spin_unlock(&domid_lock); > > } > > > > +/* > > + * Find the ID