RE: [PATCH v8 7/7] xen/sysctl: wrap around sysctl hypercall

2025-07-21 Thread Penny, Zheng
[Public] > -Original Message- > From: Jan Beulich > Sent: Tuesday, July 22, 2025 1:33 PM > To: Penny, Zheng > Cc: Huang, Ray ; Stefano Stabellini > ; Andrew Cooper ; Roger > Pau Monné ; Anthony PERARD > ; Orzel, Michal ; Julien > Grall ; Sergiy Kibrik ; xen- > de...@lists.xenproject.org;

Re: [PATCH v8 7/7] xen/sysctl: wrap around sysctl hypercall

2025-07-21 Thread Jan Beulich
On 22.07.2025 07:05, Penny, Zheng wrote: > [Public] > >> -Original Message- >> From: Jan Beulich >> Sent: Thursday, July 17, 2025 4:55 PM >> To: Penny, Zheng ; Stabellini, Stefano >> >> Cc: Huang, Ray ; Stefano Stabellini >> ; Andrew Cooper ; Roger >> Pau Monné ; Anthony PERARD >> ; Orze

RE: [PATCH v8 7/7] xen/sysctl: wrap around sysctl hypercall

2025-07-21 Thread Penny, Zheng
[Public] > -Original Message- > From: Jan Beulich > Sent: Thursday, July 17, 2025 4:55 PM > To: Penny, Zheng ; Stabellini, Stefano > > Cc: Huang, Ray ; Stefano Stabellini > ; Andrew Cooper ; Roger > Pau Monné ; Anthony PERARD > ; Orzel, Michal ; Julien > Grall ; Sergiy Kibrik ; xen- > de

[PATCH v1] xen: move getdomaininfo() to domain.c

2025-07-21 Thread Penny Zheng
Function getdomaininfo() is not only invoked by domctl-op, but also sysctl-op, so it shall better live in domain.c, rather than domctl.c. Which is also applied for arch_get_domain_info(). Style corrections shall be applied at the same time while moving these functions, such as converting u64 to uin

[PATCH v3 2/2] tools/manage: Expose domain capabilities

2025-07-21 Thread Jason Andryuk
Add an additional "caps" argument to the libxenmanage functions to obtain a domains capabilities - control, hardware, and xenstore. Update the xenstored callers at the same time. Signed-off-by: Jason Andryuk Reviewed-by: Juergen Gross --- v2: Add Juergen's R-b --- tools/include/xenmanage.h | 1

[PATCH v3 1/2] xen: Add capabilities to get_domain_state

2025-07-21 Thread Jason Andryuk
Expose a domain's capabilities - control, hardware or xenstore - through stable get domain state hypercall. The xenstore domain can use this information to assign appropriate permissions on connections. Repurpose the 16bit pad field for this purpose. Signed-off-by: Jason Andryuk Reviewed-by: Ju

[PATCH v3 0/2] Expose capabilities in get_domain_state

2025-07-21 Thread Jason Andryuk
This is the capabilities patches split out from the larger series. get_domain_state is new in 4.21. If they go in before the release, the library won't need to be changed in the future. v3 is used since they are iterations from the other series. Jason Andryuk (2): xen: Add capabilities to get_

Re: [PATCH v8 11/11] xen/dt: Allow CONFIG_DEVICE_TREE_PARSE to include device-tree/

2025-07-21 Thread Stefano Stabellini
On Tue, 22 Jul 2025, Alejandro Vallejo wrote: > This allows bootfdt.c and device-tree.c to be usable without > CONFIG_HAS_DEVICE_TREE_DISCOVERY. > > Gate everything else on CONFIG_HAS_DEVICE_TREE_DISCOVERY. > > Signed-off-by: Alejandro Vallejo Reviewed-by: Stefano Stabellini

[PATCH v8 11/11] xen/dt: Allow CONFIG_DEVICE_TREE_PARSE to include device-tree/

2025-07-21 Thread Alejandro Vallejo
This allows bootfdt.c and device-tree.c to be usable without CONFIG_HAS_DEVICE_TREE_DISCOVERY. Gate everything else on CONFIG_HAS_DEVICE_TREE_DISCOVERY. Signed-off-by: Alejandro Vallejo --- v8: * Remove duplicate obj-y introduced in v7 --- xen/common/Makefile | 2 +- xen/common/de

Re: [PATCH v8 01/11] x86: Replace arch-specific boot_module with common one

2025-07-21 Thread Daniel P. Smith
On 7/21/25 20:05, Alejandro Vallejo wrote: These types resemble each other very closely in layout and intent, and with "struct boot_module" already in common code it makes perfect sense to merge them. In order to do so, rename identical fields with conflicting names. While doing this, s/BOOTMOD_

[PATCH v8 10/11] xen/dt: ifdef out DEV_DT-related bits from device_tree.{c,h}

2025-07-21 Thread Alejandro Vallejo
Architectures that don't discover devices via DT may skip anything to do with device_t during the DT unflattening phase. Make device-tree.c stop requiring CONFIG_HAS_DEVICE_TREE_DISCOVERY so it may function with CONFIG_DEVICE_TREE_PARSE alone. This allows CONFIG_DEVICE_TREE_PARSE to unflatten a DT

[PATCH v8 08/11] xen/dt: Extract helper to map nodes to module kinds

2025-07-21 Thread Alejandro Vallejo
This will be required later by x86 code in order to do early identification of boot modules when booting off a DTB. Not a functional change. Signed-off-by: Alejandro Vallejo Reviewed-by: Stefano Stabellini --- xen/common/device-tree/bootfdt.c | 18 ++ xen/common/device-tre

[PATCH v8 06/11] xen/dt: Rename bootfdt.c -> bootinfo-fdt.c

2025-07-21 Thread Alejandro Vallejo
bootinfo-fdt.c will eventually contain bootfdt helpers that make heavy use of bootinfo. To simplify git history do the rename here explicitly. A later patch extracts bootinfo-independent helpers into bootfdt.c. Doing so here would needlessly pollute the diffs. Not a functional change. Signed-off

[PATCH v8 01/11] x86: Replace arch-specific boot_module with common one

2025-07-21 Thread Alejandro Vallejo
These types resemble each other very closely in layout and intent, and with "struct boot_module" already in common code it makes perfect sense to merge them. In order to do so, rename identical fields with conflicting names. While doing this, s/BOOTMOD_XSM/BOOTMOD_XSM_POLICY/, as it was on x86. XS

[PATCH v8 09/11] xen: Split HAS_DEVICE_TREE in two

2025-07-21 Thread Alejandro Vallejo
Moving forward the idea is for there to be: 1. Basic DT support: used by dom0less/hyperlaunch. 2. Full DT support: used for device discovery and HW setup. Rename HAS_DEVICE_TREE to HAS_DEVICE_TREE_DISCOVERY to describe (2) and create a new DEVICE_TREE_PARSE to describe (1). Have DEVICE_TREE_

[PATCH v8 05/11] xen/dt: Move bootinfo functions to a new bootinfo.h

2025-07-21 Thread Alejandro Vallejo
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 too. Not a functional change. Signed-off-by: Alejandro

[PATCH v8 07/11] xen/dt: Extract bootinfo-independent functions to bootfdt.c

2025-07-21 Thread Alejandro Vallejo
Move all functions independent of "struct bootinfo" back to bootfdt.c Not a functional change. Signed-off-by: Alejandro Vallejo Reviewed-by: Michal Orzel --- xen/common/device-tree/Makefile | 1 + xen/common/device-tree/bootfdt.c | 99 +++ xen/common/device-

[PATCH v8 03/11] x86: Replace arch-specific boot_domain with the common one

2025-07-21 Thread Alejandro Vallejo
No functional change intended. Signed-off-by: Alejandro Vallejo Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich --- xen/arch/x86/hvm/dom0_build.c | 2 +- xen/arch/x86/include/asm/boot-domain.h | 33 -- xen/arch/x86/include/asm/bootinfo.h| 1 - xen/a

[PATCH v8 04/11] xen/dt: Move bootfdt functions to xen/bootfdt.h

2025-07-21 Thread Alejandro Vallejo
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 motion only. Not a functional change. Signed-off-by: Alejandro Vallej

[PATCH v8 00/11] Allow x86 to unflatten DTs

2025-07-21 Thread Alejandro Vallejo
Hi, Really minor changes wrt v7 1. s/BOOTMOD_XSM/BOOTMOD_XSM_POLICY/ 2. Remove stale obj-y statements in the last patch pipeline: https://gitlab.com/xen-project/people/agvallejo/xen/-/pipelines/1940366600 v7: https://lore.kernel.org/xen-devel/20250715161108.141126-1-alejandro.garciavall..

[PATCH v8 02/11] xen: Refactor kernel_info to have a header like boot_domain

2025-07-21 Thread Alejandro Vallejo
Create a struct field within kernel_info with the contents common to kernel_info and boot_domain, and define that field in common code. This enables x86 to use that field as-is and drop x86's boot_domain. Note that x86 mutates the module when releasing it, calculating headroom, etc. So they must b

Re: [PATCH v7 01/11] x86: Replace arch-specific boot_module with common one

2025-07-21 Thread Alejandro Vallejo
On Tue Jul 22, 2025 at 12:27 AM CEST, Daniel P. Smith wrote: > On 7/15/25 12:10, Alejandro Vallejo wrote: >> These types resemble each other very closely in layout and intent, >> and with "struct boot_module" already in common code it makes perfect >> sense to merge them. In order to do so, rename

Re: [PATCH v7 01/11] x86: Replace arch-specific boot_module with common one

2025-07-21 Thread Daniel P. Smith
On 7/15/25 12:10, Alejandro Vallejo wrote: These types resemble each other very closely in layout and intent, and with "struct boot_module" already in common code it makes perfect sense to merge them. In order to do so, rename identical fields with conflicting names. No functional change intende

Re: [PATCH v7 09/11] xen: Split HAS_DEVICE_TREE in two

2025-07-21 Thread Daniel P. Smith
On 7/15/25 12:11, Alejandro Vallejo wrote: Moving forward the idea is for there to be: 1. Basic DT support: used by dom0less/hyperlaunch. 2. Full DT support: used for device discovery and HW setup. Rename HAS_DEVICE_TREE to HAS_DEVICE_TREE_DISCOVERY to describe (2) and create a new DEVICE

Re: [PATCH v2 04/17] xen: Introduce XEN_DOMCTL_CDF_not_hypercall_target

2025-07-21 Thread Jason Andryuk
Hi Julien, Thanks for taking a look. On 2025-07-21 13:58, Julien Grall wrote: Hi Jason, On 16/07/2025 22:14, Jason Andryuk wrote: Add a new create domain flag  to indicate if a domain can be the target of hypercalls.  By default all domains can be targetted - subject to any other permission c

Re: [PATCH] xen/passthrough: add missing error-report include

2025-07-21 Thread Daniel P . Berrangé
On Fri, Jul 18, 2025 at 03:20:35PM +0200, Markus Armbruster wrote: > Daniel P. Berrangé writes: > > > On Fri, Jul 18, 2025 at 07:59:50AM +0200, Markus Armbruster wrote: > >> Markus Armbruster writes: > >> > >> > Adam Williamson writes: > >> > > >> >> In cfcacba an `error_report` was added to t

Re: [PATCH v2 04/17] xen: Introduce XEN_DOMCTL_CDF_not_hypercall_target

2025-07-21 Thread Julien Grall
Hi Jason, On 16/07/2025 22:14, Jason Andryuk wrote: Add a new create domain flag to indicate if a domain can be the target of hypercalls. By default all domains can be targetted - subject to any other permission checks. This property is useful in a safety environment to isolate domains for fr

RE: Discussion on the delayed start of major frame with ARINC653 scheduler

2025-07-21 Thread Weber (US), Matthew L
> -Original Message- > From: Nathan Studer > Sent: Thursday, July 17, 2025 12:25 PM > To: Weber (US), Matthew L ; Choi, Anderson > ; xen-devel@lists.xenproject.org > Cc: stew...@stew.dk; Whitehead (US), Joshua C > ; Jeff Kubascik > Subject: [EXTERNAL] RE: Discussion on the delayed st

Re: [PATCH] x86: don't have gcc over-align data

2025-07-21 Thread Roger Pau Monné
On Mon, Jul 21, 2025 at 06:05:22PM +0200, Jan Beulich wrote: > On 21.07.2025 16:48, Roger Pau Monné wrote: > > On Wed, Jun 25, 2025 at 11:04:14AM +0200, Jan Beulich wrote: > >> For (aiui) backwards compatibility reasons, gcc defaults to a mode that > >> was the exclusive one up to gcc4.8, establish

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

2025-07-21 Thread Roger Pau Monné
On Fri, Jul 04, 2025 at 03:08:03PM +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, it can't reach > vpci_deassign_device() to remov

Re: [PATCH v7 7/8] vpci/msi: Free MSI resources when init_msi() fails

2025-07-21 Thread Roger Pau Monné
On Fri, Jul 04, 2025 at 03:08:02PM +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 can't reach > vpci_deassign_device() to remove r

Re: [PATCH v7 6/8] vpci/rebar: Free Rebar resources when init_rebar() fails

2025-07-21 Thread Roger Pau Monné
On Fri, Jul 04, 2025 at 03:08:01PM +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, it can't reach > vpci_deassign_device() to re

Re: [PATCH] x86: don't have gcc over-align data

2025-07-21 Thread Jan Beulich
On 21.07.2025 16:48, Roger Pau Monné wrote: > On Wed, Jun 25, 2025 at 11:04:14AM +0200, Jan Beulich wrote: >> For (aiui) backwards compatibility reasons, gcc defaults to a mode that >> was the exclusive one up to gcc4.8, establishing 32-byte alignment for >> aggregates larger than a certain size. W

Re: [PATCH v7 4/8] vpci: Hide extended capability when it fails to initialize

2025-07-21 Thread Roger Pau Monné
On Fri, Jul 04, 2025 at 03:07:59PM +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 initialization > fails. And remove the failed

Re: [PATCH] xen/livepatch: fixup relocations to replaced symbols

2025-07-21 Thread Jan Beulich
On 21.07.2025 17:51, Ross Lagerwall wrote: > On Wed, Jul 16, 2025 at 5:00 PM Roger Pau Monne wrote: >> >> In a livepatch payload relocations will refer to included functions. If >> that function happens to be a replacement for an existing Xen function, the >> relocations on the livepatch payload

Re: [PATCH] xen/livepatch: fixup relocations to replaced symbols

2025-07-21 Thread Ross Lagerwall
On Wed, Jul 16, 2025 at 5:00 PM Roger Pau Monne wrote: > > In a livepatch payload relocations will refer to included functions. If > that function happens to be a replacement for an existing Xen function, the > relocations on the livepatch payload will use the newly introduced symbol, > rather th

Re: [PATCH v7 3/8] vpci: Hide legacy capability when it fails to initialize

2025-07-21 Thread Roger Pau Monné
On Fri, Jul 04, 2025 at 03:07:58PM +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 possibly causing issues > to Xen itself if guest

Re: [PATCH] x86: don't have gcc over-align data

2025-07-21 Thread Roger Pau Monné
On Wed, Jun 25, 2025 at 11:04:14AM +0200, Jan Beulich wrote: > For (aiui) backwards compatibility reasons, gcc defaults to a mode that > was the exclusive one up to gcc4.8, establishing 32-byte alignment for > aggregates larger than a certain size. We don't rely on such, and hence > we can do with

Re: [PATCH v7 2/8] vpci: Refactor REGISTER_VPCI_INIT

2025-07-21 Thread Roger Pau Monné
On Fri, Jul 04, 2025 at 03:07:57PM +0800, Jiqian Chen wrote: > Refactor REGISTER_VPCI_INIT to contain more capability specific > information, this will benefit further follow-on changes to hide > capability when initialization fails. > > What's more, change the definition of init_header() since it

Re: [PATCH v7 1/8] vpci/header: Emulate extended capability list for dom0

2025-07-21 Thread Roger Pau Monné
On Wed, Jul 09, 2025 at 05:34:28AM +, Chen, Jiqian wrote: > On 2025/7/9 13:32, Jan Beulich wrote: > > On 09.07.2025 07:29, Chen, Jiqian wrote: > >> On 2025/7/8 22:10, Jan Beulich wrote: > >>> On 04.07.2025 09:07, Jiqian Chen wrote: > --- a/xen/drivers/vpci/header.c > +++ b/xen/drivers

Re: [PATCH v2 17/17] xen/riscv: add support of page lookup by GFN

2025-07-21 Thread Jan Beulich
On 21.07.2025 11:43, Oleksii Kurochko wrote: > On 7/2/25 1:44 PM, Jan Beulich wrote: >> On 10.06.2025 15:05, Oleksii Kurochko wrote: >>> --- a/xen/arch/riscv/p2m.c >>> +++ b/xen/arch/riscv/p2m.c >>> @@ -1055,3 +1055,134 @@ int guest_physmap_add_entry(struct domain *d, >>> { >>> return p2m_i

Re: [PATCH v2 16/17] xen/riscv: implement mfn_valid() and page reference, ownership handling helpers

2025-07-21 Thread Jan Beulich
On 18.07.2025 16:49, Oleksii Kurochko wrote: > On 7/2/25 12:09 PM, Jan Beulich wrote: >> On 10.06.2025 15:05, Oleksii Kurochko wrote: >>> Implement the mfn_valid() macro to verify whether a given MFN is valid by >>> checking that it falls within the range [start_page, max_page). >>> These bounds ar

Re: [PATCH v8] xen/console: introduce domain_console struct

2025-07-21 Thread Roger Pau Monné
On Fri, Jul 18, 2025 at 01:04:56PM +0200, Alejandro Vallejo wrote: > Hi, > > I like the new encapsulation, but I have a few questions. > > On Wed Jul 16, 2025 at 4:04 AM CEST, dmukhin wrote: > > From: Denis Mukhin > > > > Introduce domain_console for grouping data structures used for integratin

Re: [PATCH v2 16/17] xen/riscv: implement mfn_valid() and page reference, ownership handling helpers

2025-07-21 Thread Jan Beulich
On 18.07.2025 16:49, Oleksii Kurochko wrote: > On 7/2/25 12:09 PM, Jan Beulich wrote: >> On 10.06.2025 15:05, Oleksii Kurochko wrote: >>> Implement the mfn_valid() macro to verify whether a given MFN is valid by >>> checking that it falls within the range [start_page, max_page). >>> These bounds ar

Re: [PATCH v2 16/17] xen/riscv: implement mfn_valid() and page reference, ownership handling helpers

2025-07-21 Thread Jan Beulich
On 18.07.2025 16:37, Oleksii Kurochko wrote: > > On 7/2/25 12:28 PM, Jan Beulich wrote: >> On 02.07.2025 12:09, Jan Beulich wrote: >>> On 10.06.2025 15:05, Oleksii Kurochko wrote: @@ -613,3 +612,91 @@ void __iomem *ioremap(paddr_t pa, size_t len) { return ioremap_attr(pa, le

Re: [PATCH v2 15/17] xen/riscv: Implement superpage splitting for p2m mappings

2025-07-21 Thread Jan Beulich
On 17.07.2025 18:37, Oleksii Kurochko wrote: > On 7/2/25 11:25 AM, Jan Beulich wrote: >> On 10.06.2025 15:05, Oleksii Kurochko wrote: >>> Add support for down large memory mappings ("superpages") in the RISC-V >>> p2m mapping so that smaller, more precise mappings ("finer-grained entries") >>> can

Re: [PATCH v5 3/3] drivers: Make ioapic_sbdf and hpet_sbdf contain pci_sbdf_t

2025-07-21 Thread Andriy Sultanov
On 7/21/25 7:25 AM, Jan Beulich wrote: On 19.07.2025 00:03,dm...@proton.me wrote: On Thu, Jul 17, 2025 at 08:31:27AM +0100, Andrii Sultanov wrote: @@ -335,20 +336,19 @@ void cf_check amd_iommu_ioapic_update_ire( new_rte.raw = rte; /* get device id of ioapic devices */ -bdf = i

Re: [PATCH v2 14/17] xen/riscv: implement p2m_next_level()

2025-07-21 Thread Jan Beulich
On 18.07.2025 13:19, Oleksii Kurochko wrote: > On 7/17/25 12:37 PM, Jan Beulich wrote: >> On 17.07.2025 11:42, Oleksii Kurochko wrote: >>> On 7/16/25 6:12 PM, Jan Beulich wrote: On 16.07.2025 17:53, Oleksii Kurochko wrote: > In this case, the P2M PTE valid bit will be set to 0, but the P2M

Re: [PATCH 1/3] xen/efi: Reuse fdt_setprop_u32 and fdt_setprop_u64

2025-07-21 Thread Frediano Ziglio
On Mon, Jul 21, 2025 at 1:13 PM Orzel, Michal wrote: > > > > On 21/07/2025 11:07, Frediano Ziglio wrote: > > Signed-off-by: Frediano Ziglio > > --- > > xen/arch/arm/efi/efi-boot.h | 33 - > > 1 file changed, 12 insertions(+), 21 deletions(-) > > > > diff --git a/x

Re: [PATCH v2] xen/efi: Remove PrintMessage function

2025-07-21 Thread Orzel, Michal
On 18/07/2025 14:11, Frediano Ziglio wrote: > The function is similar to PrintStr with an implicit newline > added to the string. > In Xen this is not a common pattern and this is used in EFI > ARM code only making it not much coherent with X86 code > so use PrintStr directly to make the code mo

Re: [XEN][PATCH] xen/arm: remove unused dump_p2m_lookup()

2025-07-21 Thread Orzel, Michal
On 18/07/2025 12:15, Grygorii Strashko wrote: > From: Grygorii Strashko > > The dump_p2m_lookup() is not used, so remove it. > > Signed-off-by: Grygorii Strashko Acked-by: Michal Orzel ~Michal

Re: [PATCH v2 13/17] xen/riscv: Implement p2m_entry_from_mfn() and support PBMT configuration

2025-07-21 Thread Jan Beulich
On 18.07.2025 11:52, Oleksii Kurochko wrote: > > On 7/17/25 12:25 PM, Jan Beulich wrote: >> On 17.07.2025 10:56, Oleksii Kurochko wrote: >>> On 7/16/25 6:18 PM, Jan Beulich wrote: On 16.07.2025 18:07, Oleksii Kurochko wrote: > On 7/16/25 1:31 PM, Jan Beulich wrote: >> On 15.07.2025 16

Re: [PATCH 3/3] xen/efi: Do not pass dummy pointer for empty property

2025-07-21 Thread Orzel, Michal
On 21/07/2025 11:07, Frediano Ziglio wrote: > There's no need to pass a buffer, the property is empty. > > Signed-off-by: Frediano Ziglio Reviewed-by: Michal Orzel ~Michal

Re: [PATCH 1/3] xen/efi: Reuse fdt_setprop_u32 and fdt_setprop_u64

2025-07-21 Thread Orzel, Michal
On 21/07/2025 11:07, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- > xen/arch/arm/efi/efi-boot.h | 33 - > 1 file changed, 12 insertions(+), 21 deletions(-) > > diff --git a/xen/arch/arm/efi/efi-boot.h b/xen/arch/arm/efi/efi-boot.h > index 3dbee

Re: [PATCH 2/3] xen/efi: Fix indentation

2025-07-21 Thread Orzel, Michal
On 21/07/2025 11:07, Frediano Ziglio wrote: > Use 4 spaces instead of 3 spaces. > > Signed-off-by: Frediano Ziglio Reviewed-by: Michal Orzel ~Michal

Re: [PATCH v7 05/11] xen/dt: Move bootinfo functions to a new bootinfo.h

2025-07-21 Thread Oleksii Kurochko
On 7/15/25 6:11 PM, 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 too. No

Re: [PATCH 2/2] sched/core: Update vcpu_runstate_get() to return nonaffine time

2025-07-21 Thread Jürgen Groß
On 21.07.25 11:49, Bernhard Kaindl wrote: Update vcpu_runstate_get() to return a snapshot of the accumulated non-affine vCPU running time at the current time of this call. We cannot change the struct vcpu_runstate_info: It is part of the Guest shared memory area that is part of the frozen VM ABI

Re: [PATCH v7 09/11] xen: Split HAS_DEVICE_TREE in two

2025-07-21 Thread Oleksii Kurochko
On 7/15/25 6:11 PM, Alejandro Vallejo wrote: Moving forward the idea is for there to be: 1. Basic DT support: used by dom0less/hyperlaunch. 2. Full DT support: used for device discovery and HW setup. Rename HAS_DEVICE_TREE to HAS_DEVICE_TREE_DISCOVERY to describe (2) and create a new DEV

Re: [PATCH v8] xen/console: introduce domain_console struct

2025-07-21 Thread Alejandro Vallejo
On Sat Jul 19, 2025 at 1:45 AM CEST, dmkhn wrote: > On Fri, Jul 18, 2025 at 01:04:56PM +0200, Alejandro Vallejo wrote: >> Hi, >> >> I like the new encapsulation, but I have a few questions. >> >> On Wed Jul 16, 2025 at 4:04 AM CEST, dmukhin wrote: >> > From: Denis Mukhin >> > >> > Introduce doma

Re: [PATCH v7 04/11] xen/dt: Move bootfdt functions to xen/bootfdt.h

2025-07-21 Thread Oleksii Kurochko
On 7/15/25 6:10 PM, 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 motion only. Not a fun

Re: [PATCH 1/2] sched/core: For a new metric, add vcpu->nonaffine_time

2025-07-21 Thread Jürgen Groß
On 21.07.25 11:49, Bernhard Kaindl wrote: To monitor the effectiveness of vCPU soft-affinity on NUMA hosts, we'd like to create a vCPU metric that accumulates the amount of vCPU time running outside of the soft affinity mask of the sched-unit: - Add a new time counter, nonaffine_time to struct v

Re: [PATCH 2/2] sched/core: Update vcpu_runstate_get() to return nonaffine time

2025-07-21 Thread Jan Beulich
On 21.07.2025 11:49, Bernhard Kaindl wrote: > --- a/xen/include/public/vcpu.h > +++ b/xen/include/public/vcpu.h > @@ -79,8 +79,18 @@ struct vcpu_runstate_info { > uint64_t time[4]; > }; > typedef struct vcpu_runstate_info vcpu_runstate_info_t; > +/* vcpu_runstate_info_t is in the Guest share

Re: [PATCH] misra: add deviations of MISRA C Rule 5.5

2025-07-21 Thread Jan Beulich
On 21.07.2025 12:27, Dmytro Prokopchuk1 wrote: > On 7/16/25 21:08, Dmytro Prokopchuk wrote: >> MISRA C Rule 5.5 states that: "Identifiers shall >> be distinct from macro names". >> >> Update ECLAIR configuration to deviate: >> - clashes in 'xen/include/xen/bitops.h'; >> - clashes in 'xen/include/xe

Re: [PATCH] x86/pv: Rework TRY_LOAD_SEG() to use asm goto()

2025-07-21 Thread Nicola Vetrini
On 2025-07-21 11:25, Jan Beulich wrote: On 21.07.2025 10:16, Nicola Vetrini wrote: On 2025-07-21 08:41, Jan Beulich wrote: On 18.07.2025 22:25, Andrew Cooper wrote: This moves the exception path to being out-of-line within the function, rather than in the .fixup section, which improves backtra

Re: [PATCH] misra: add deviations of MISRA C Rule 5.5

2025-07-21 Thread Dmytro Prokopchuk1
On 7/16/25 21:08, Dmytro Prokopchuk wrote: > MISRA C Rule 5.5 states that: "Identifiers shall > be distinct from macro names". > > Update ECLAIR configuration to deviate: > - clashes in 'xen/include/xen/bitops.h'; > - clashes in 'xen/include/xen/irq.h'; > - clashes in 'xen/common/grant_table.c'.

Re: [PATCH v5 4/4] CHANGELOG: Document guest suspend/resume to RAM support on Arm

2025-07-21 Thread Oleksii Kurochko
On 6/27/25 12:51 PM, Mykola Kvach wrote: From: Mykola Kvach Mention the newly added support for guest suspend and resume to/from RAM via vPSCI on Arm platforms (ARM32 and ARM64). This support is limited to non-hardware domain guests. Signed-off-by: Mykola Kvach --- Changes in v5: - adjustments

Re: [PATCH] xen/netfront: Fix TX response spurious interrupts

2025-07-21 Thread Anthoine Bourgeois
On Fri, Jul 18, 2025 at 01:48:17PM -0700, Elliott Mitchell wrote: >On Wed, Jul 16, 2025 at 11:31:06AM -0700, Elliott Mitchell wrote: >> On Wed, Jul 16, 2025 at 07:47:48AM +, Anthoine Bourgeois wrote: >> > On Tue, Jul 15, 2025 at 12:19:34PM -0700, Elliott Mitchell wrote: >> > > >> > >I tend to f

[PATCH 2/2] sched/core: Update vcpu_runstate_get() to return nonaffine time

2025-07-21 Thread Bernhard Kaindl
Update vcpu_runstate_get() to return a snapshot of the accumulated non-affine vCPU running time at the current time of this call. We cannot change the struct vcpu_runstate_info: It is part of the Guest shared memory area that is part of the frozen VM ABI. Instead return the new value: This way we

[PATCH 1/2] sched/core: For a new metric, add vcpu->nonaffine_time

2025-07-21 Thread Bernhard Kaindl
To monitor the effectiveness of vCPU soft-affinity on NUMA hosts, we'd like to create a vCPU metric that accumulates the amount of vCPU time running outside of the soft affinity mask of the sched-unit: - Add a new time counter, nonaffine_time to struct vcpu. - Accumulate the nonaffine_time on vcp

Re: [PATCH v2 17/17] xen/riscv: add support of page lookup by GFN

2025-07-21 Thread Oleksii Kurochko
On 7/2/25 1:44 PM, Jan Beulich wrote: On 10.06.2025 15:05, Oleksii Kurochko wrote: Introduce helper functions for safely querying the P2M (physical-to-machine) mapping: - add p2m_read_lock(), p2m_read_unlock(), and p2m_is_locked() for managing P2M lock state. - Implement p2m_get_entry()

Re: [PATCH v4 4/6] arm/mpu: Destroy an existing entry in Xen MPU memory mapping table

2025-07-21 Thread Orzel, Michal
On 21/07/2025 11:31, Hari Limaye wrote: > Hi Michal, > >> NIT: In this patch you start adding mpu: prefix, even though other messages >> do >> not have it. I don't think it's needed. >> >> Otherwise: >> Reviewed-by: Michal Orzel >> >> ~Michal >> > > Would you like me to respin for this chang

[PATCH v3] xen/netfront: Fix TX response spurious interrupts

2025-07-21 Thread Anthoine Bourgeois
We found at Vates that there are lot of spurious interrupts when benchmarking the xen-net PV driver frontend. This issue appeared with a patch that addresses security issue XSA-391 (b27d47950e48 "xen/netfront: harden netfront against event channel storms"). On an iperf benchmark, spurious interrupt

Re: [XEN][PATCH] xen/arm: remove unused dump_p2m_lookup()

2025-07-21 Thread Hari Limaye
Hi Grygorii, > On Fri, Jul 18, 2025 at 10:15:36AM +, Grygorii Strashko wrote: > From: Grygorii Strashko > > The dump_p2m_lookup() is not used, so remove it. NIT: I think this would read better as 'The function dump_p2m_lookup()...' Otherwise LGTM! Reviewed-by: Hari Limaye Cheers, Hari

Re: [PATCH v4 4/6] arm/mpu: Destroy an existing entry in Xen MPU memory mapping table

2025-07-21 Thread Hari Limaye
Hi Michal, > NIT: In this patch you start adding mpu: prefix, even though other messages do > not have it. I don't think it's needed. > > Otherwise: > Reviewed-by: Michal Orzel > > ~Michal > Would you like me to respin for this change, or can it be addressed on commit? Many thanks, Hari

Re: [PATCH] x86/pv: Rework TRY_LOAD_SEG() to use asm goto()

2025-07-21 Thread Jan Beulich
On 21.07.2025 10:16, Nicola Vetrini wrote: > On 2025-07-21 08:41, Jan Beulich wrote: >> On 18.07.2025 22:25, Andrew Cooper wrote: >>> This moves the exception path to being out-of-line within the >>> function, rather >>> than in the .fixup section, which improves backtraces. >>> >>> Because the ma

Re: [PATCH v4 5/6] arm/mpu: Implement early_fdt_map support in MPU systems

2025-07-21 Thread Orzel, Michal
On 21/07/2025 10:31, Hari Limaye wrote: > From: Luca Fancellu > > Implement the function early_fdt_map(), which is responsible for mapping > the Device Tree Blob in the early stages of the boot process, for MPU > systems. > > We make use of the map_pages_to_xen() and destroy_xen_mappings() AP

Re: [PATCH v4 4/6] arm/mpu: Destroy an existing entry in Xen MPU memory mapping table

2025-07-21 Thread Orzel, Michal
On 21/07/2025 10:31, Hari Limaye wrote: > From: Penny Zheng > > This commit expands xen_mpumap_update/xen_mpumap_update_entry to include > destroying an existing entry. > > We define a new helper "disable_mpu_region_from_index" to disable the MPU > region based on index. If region is within [

[PATCH 0/3] Minor ARM EFI updates

2025-07-21 Thread Frediano Ziglio
Reuse some functions, fix some indentation. Frediano Ziglio (3): xen/efi: Reuse fdt_setprop_u32 and fdt_setprop_u64 xen/efi: Fix indentation xen/efi: Do not pass dummy pointer for empty property xen/arch/arm/efi/efi-boot.h | 51 +++-- 1 file changed, 20 inse

[PATCH 2/3] xen/efi: Fix indentation

2025-07-21 Thread Frediano Ziglio
Use 4 spaces instead of 3 spaces. Signed-off-by: Frediano Ziglio --- xen/arch/arm/efi/efi-boot.h | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/xen/arch/arm/efi/efi-boot.h b/xen/arch/arm/efi/efi-boot.h index a2aede21d5..6323db547b 100644 --- a/xen/arch/arm/efi

[PATCH 1/3] xen/efi: Reuse fdt_setprop_u32 and fdt_setprop_u64

2025-07-21 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- xen/arch/arm/efi/efi-boot.h | 33 - 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/xen/arch/arm/efi/efi-boot.h b/xen/arch/arm/efi/efi-boot.h index 3dbeed3f89..a2aede21d5 100644 --- a/xen/arch/arm/efi/efi-boot.h ++

[PATCH 3/3] xen/efi: Do not pass dummy pointer for empty property

2025-07-21 Thread Frediano Ziglio
There's no need to pass a buffer, the property is empty. Signed-off-by: Frediano Ziglio --- xen/arch/arm/efi/efi-boot.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/xen/arch/arm/efi/efi-boot.h b/xen/arch/arm/efi/efi-boot.h index 6323db547b..f61fb24f0f 100644 --- a/xen/a

Re: [PATCH 0/9] Enable Xenstore-stubdom Live Update

2025-07-21 Thread Juergen Gross
Anthony, could you please have a look at patches 3, 4 and 7? They are lacking a tools maintainer's comment. Juergen On 02.07.25 10:12, Juergen Gross wrote: With this series applied I was able to perform Live Update of Xenstore running in a PVH stubdom. This series is based on a related Mini-

[PATCH] xen/efi: Reduce variable scope to void compiler warning

2025-07-21 Thread Frediano Ziglio
This change removes some pieve of code working around with some compiler warnings. No functional change. Signed-off-by: Frediano Ziglio --- xen/common/efi/boot.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c ind

[PATCH v4 6/6] arm/mpu: Implement remove_early_mappings for MPU systems

2025-07-21 Thread Hari Limaye
From: Luca Fancellu Implement remove_early_mappings for MPU systems. Signed-off-by: Luca Fancellu Signed-off-by: Hari Limaye Reviewed-by: Michal Orzel --- Changes from v1: - Add Ayan's R-b Changes from v2: - Remove full stop - Remove sanity check for `mapped_fdt_paddr == INVALID_PADDR` Chan

[PATCH v4 4/6] arm/mpu: Destroy an existing entry in Xen MPU memory mapping table

2025-07-21 Thread Hari Limaye
From: Penny Zheng This commit expands xen_mpumap_update/xen_mpumap_update_entry to include destroying an existing entry. We define a new helper "disable_mpu_region_from_index" to disable the MPU region based on index. If region is within [0, 31], we could quickly disable the MPU region through P

[PATCH v4 5/6] arm/mpu: Implement early_fdt_map support in MPU systems

2025-07-21 Thread Hari Limaye
From: Luca Fancellu Implement the function early_fdt_map(), which is responsible for mapping the Device Tree Blob in the early stages of the boot process, for MPU systems. We make use of the map_pages_to_xen() and destroy_xen_mappings() APIs. In particular the latter function is necessary in the

[PATCH v4 2/6] xen/arm: Introduce flags_has_rwx helper

2025-07-21 Thread Hari Limaye
From: Luca Fancellu Introduce flags_has_rwx() function that will check if a mapping is both writable and executable when modifying or updating the mapping. This check was already present in pt.c but since it will be used also for MPU systems, it's wrapped into a function now. Signed-off-by: Luc

[PATCH v4 0/6] Second series for R82 MPU Support

2025-07-21 Thread Hari Limaye
Hi all, This series is the second set of patches in the ongoing work to introduce support for MPU systems and Cortex R82 in Xen. The patches in this series implement the necessary logic to map and unmap the Device Tree Blob in the early stages of the boot process. Changes from v3: - Changes ment

[PATCH v4 3/6] arm/mpu: Populate a new region in Xen MPU mapping table

2025-07-21 Thread Hari Limaye
From: Penny Zheng Introduce map_pages_to_xen() that is implemented using a new helper, xen_mpumap_update(), which is responsible for updating Xen MPU memory mapping table(xen_mpumap), including creating a new entry, updating or destroying an existing one, it is equivalent to xen_pt_update in MMU.

[PATCH v4 1/6] arm/mpu: Find MPU region by range

2025-07-21 Thread Hari Limaye
From: Luca Fancellu Implement a function to find the index of a MPU region in the xen_mpumap MPU region array. This function will be used in future commits to implement creating and destroying MPU regions. Signed-off-by: Luca Fancellu Signed-off-by: Hari Limaye Reviewed-by: Michal Orzel --- C

Re: [PATCH] x86/pv: Rework TRY_LOAD_SEG() to use asm goto()

2025-07-21 Thread Nicola Vetrini
On 2025-07-21 08:41, Jan Beulich wrote: On 18.07.2025 22:25, Andrew Cooper wrote: This moves the exception path to being out-of-line within the function, rather than in the .fixup section, which improves backtraces. Because the macro is used multiple times, the fault label needs declaring as

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

2025-07-21 Thread Jürgen Groß
On 28.06.25 20:17, Julien Grall wrote: Hi Mykola, On 27/06/2025 11:51, Mykola Kvach wrote: diff --git a/xen/arch/arm/include/asm/perfc_defn.h b/xen/arch/arm/include/asm/ perfc_defn.h index effd25b69e..8dfcac7e3b 100644 --- a/xen/arch/arm/include/asm/perfc_defn.h +++ b/xen/arch/arm/include/asm/