Re: [PATCH v13 3/4] SUPPORT.md: Document PSCI SYSTEM_SUSPEND support for guests

2025-09-12 Thread Julien Grall
Hi Mykola, On 02/09/2025 10:03, Mykola Kvach wrote: From: Mykola Kvach Add a new entry under the "Virtual Hardware, QEMU" section documenting support for the optional PSCI SYSTEM_SUSPEND function exposed to guests. AFAICT, this is added under "Virtual Hardware, Hypervisor". This function

[PATCH v4 0/8] CI: Add Debian Trixie

2025-09-12 Thread Andrew Cooper
Refresh the Trixie series. A few more bugfixes found by randconfig and log inspection. These containers are already built and deployed for people to test with. https://gitlab.com/xen-project/hardware/xen-staging/-/pipelines/2036687955 Andrew Cooper (8): CI: Use the Debian Trixie container for

Re: [PATCH v4 0/8] CI: Add Debian Trixie

2025-09-12 Thread Stefano Stabellini
On Fri, 12 Sep 2025, Andrew Cooper wrote: > Refresh the Trixie series. A few more bugfixes found by randconfig and log > inspection. > > These containers are already built and deployed for people to test with. > > https://gitlab.com/xen-project/hardware/xen-staging/-/pipelines/2036687955 Acked-

Re: [PATCH v6 02/13] xen/arm: gic-v2: Implement GIC suspend/resume functions

2025-09-12 Thread Julien Grall
Hi Mykola, On 01/09/2025 23:10, Mykola Kvach wrote: From: Mirela Simonovic System suspend may lead to a state where GIC would be powered down. Therefore, Xen should save/restore the context of GIC on suspend/resume. Note that the context consists of states of registers which are controlled by

Re: [PATCH v6 01/13] xen/arm: Add suspend and resume timer helpers

2025-09-12 Thread Julien Grall
Hi Mykola, On 01/09/2025 23:10, Mykola Kvach wrote: From: Mirela Simonovic Timer interrupts must be disabled while the system is suspended to prevent spurious wake-ups. Yet, you don't seem to disable the virtual interrupt. Can you explain why? Suspending the timers involves disabling both

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

2025-09-12 Thread Julien Grall
Hi Mykola, On 02/09/2025 10:03, Mykola Kvach wrote: @@ -880,6 +883,40 @@ void arch_domain_creation_finished(struct domain *d) p2m_domain_creation_finished(d); } +int arch_domain_resume(struct domain *d) +{ +int rc; +typeof(d->arch.resume_ctx) *ctx = &d->arch.resume_ctx; I k

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

2025-09-12 Thread Julien Grall
Hi, On 02/09/2025 18:55, Mykola Kvach wrote: --- a/xen/include/xen/domain.h +++ b/xen/include/xen/domain.h @@ -8,6 +8,10 @@ #include +#if __has_include() +#include +#endif + struct guest_area { struct page_info *pg; void *map; @@ -109,6 +113,13 @@ int arch_domain_soft_reset(s

Re: [PATCH v4 5/8] x86/emul: Make condition coverage warning non-fatal

2025-09-12 Thread Andrew Cooper
On 12/09/2025 3:44 pm, Andrew Cooper wrote: > Randconfig with GCC-14 (Debian Trixie) found: > > In file included from arch/x86/x86_emulate/x86_emulate.c:11, >from arch/x86/x86_emulate.c:27: > arch/x86/x86_emulate/x86_emulate.c: In function 'x86_emulate': > arch/x86/x86_emu

Re: [PATCH] xen/arm: irq: Use appropriate priority for SGIs in setup_irq()

2025-09-12 Thread Julien Grall
Hi Mykola, On 03/09/2025 03:55, Mykola Kvach wrote: From: Mykola Kvach Use GIC_PRI_IPI priority for SGI interrupts instead of the generic GIC_PRI_IRQ priority in setup_irq(). This change ensures that SGIs get the correct priority level when being set up for Xen's use, maintaining proper inter

Re: [XEN][PATCH] xen/arm: restrict cpu_up_send_sgi() to arm32

2025-09-12 Thread Julien Grall
Hi Grygorii, On 11/09/2025 09:12, Grygorii Strashko wrote: From: Grygorii Strashko Restrict cpu_up_send_sgi() function to arm32 code as it's used by arm32 platforms only and unreachable on arm64 (Misra rule 2.1). Signed-off-by: Grygorii Strashko > ---> Logically cpu_up_send_sgi() should be

Re: [PATCH v3] tools/libs: Use superpages where possible on migrate/resume

2025-09-12 Thread Frediano Ziglio
On Fri, Sep 12, 2025 at 7:01 PM Andrew Cooper wrote: > > On 12/09/2025 10:57 am, Frediano Ziglio wrote: > > Try to allocate larger order pages. > > With some test memory program stressing TLB (many small random > > memory accesses) you can get 15% performance improves. Checker is suggesting "impr

Re: [PATCH v4 6/8] CI: Use pipefail in scripts/build

2025-09-12 Thread dmukhin
On Fri, Sep 12, 2025 at 03:44:25PM +0100, Andrew Cooper wrote: > Marek noticed that some builds were failing with: > > + cd dist/install > + find > + cpio -R 0:0 -o -H newc > ./automation/scripts/build: line 111: cpio: command not found > + gzip > > but succeeding overall, and producing

Re: [PATCH v3] tools/libs: Use superpages where possible on migrate/resume

2025-09-12 Thread Andrew Cooper
On 12/09/2025 10:57 am, Frediano Ziglio wrote: > Try to allocate larger order pages. > With some test memory program stressing TLB (many small random > memory accesses) you can get 15% performance improves. > On the first memory iteration the sender is currently sending > memory in 4mb aligned chun

Re: [PATCH v6 11/13] xen/arm: Add support for system suspend triggered by hardware domain

2025-09-12 Thread Mykola Kvach
Thanks for your detailed comments and suggestions — much appreciated. On Tue, Sep 9, 2025 at 12:14 PM Jan Beulich wrote: > > On 09.09.2025 10:14, Mykola Kvach wrote: > > On Tue, Sep 9, 2025 at 9:57 AM Jan Beulich wrote: > >> On 09.09.2025 08:29, Mykola Kvach wrote: > >>> Then, in domain_shutdown

[PATCH v4 5/8] x86/emul: Make condition coverage warning non-fatal

2025-09-12 Thread Andrew Cooper
Randconfig with GCC-14 (Debian Trixie) found: In file included from arch/x86/x86_emulate/x86_emulate.c:11, from arch/x86/x86_emulate.c:27: arch/x86/x86_emulate/x86_emulate.c: In function 'x86_emulate': arch/x86/x86_emulate/private.h:482:8: error: Too many conditions (found

[PATCH v4 7/8] CI: Update x86 to use Debian Trixie

2025-09-12 Thread Andrew Cooper
With the exception of the custom IBT job, copy all Debian 12 jobs making Debian 13 versions, then trim the Debian 12 ranconfig jobs. Update the test jobs using Debian 12 to use 13. Signed-off-by: Andrew Cooper Reviewed-by: Denis Mukhin --- CC: Anthony PERARD CC: Michal Orzel CC: Jan Beulich

[RFC PATCH] xen/arm: Introduce GICV3 Self Tests

2025-09-12 Thread Ayan Kumar Halder
Introduce CONFIG_GICV3_SELFTEST to enclose tests for GICv3 driver. Test that Xen is able to generate SGIs. Signed-off-by: Ayan Kumar Halder --- One of the aim of functional safety is to test hw/sw interface. This means that Xen is able to configure the hardware correctly for the desired functiona

[PATCH v4 2/8] CI: Update ppc64 to use Debian Trixie

2025-09-12 Thread Andrew Cooper
Everything works fine with Debian 13. Provide two new build jobs (for a total of 6), and update the test jobs. Signed-off-by: Andrew Cooper Reviewed-by: Denis Mukhin --- CC: Anthony PERARD CC: Michal Orzel CC: Jan Beulich CC: Julien Grall CC: Roger Pau Monné CC: Stefano Stabellini CC: Sha

Re: [PATCH v2 0/7] Nesting support for lazy MMU mode

2025-09-12 Thread Kevin Brodsky
On 09/09/2025 11:21, David Hildenbrand wrote: > On 09.09.25 04:16, Andrew Morton wrote: >> On Mon,  8 Sep 2025 08:39:24 +0100 Kevin Brodsky >> wrote: >> >>> The main change enabling nesting is patch 2, following the approach >>> suggested by Catalin Marinas [4]: have enter() return some state and

[PATCH v4 1/8] CI: Use the Debian Trixie container for RISC-V test jobs

2025-09-12 Thread Andrew Cooper
This was missed when introducing Trixie. Fixes: aad6ebf0596f ("CI: Update riscv64 to use Debian Trixie") Signed-off-by: Andrew Cooper Reviewed-by: Denis Mukhin --- CC: Anthony PERARD CC: Michal Orzel CC: Jan Beulich CC: Julien Grall CC: Roger Pau Monné CC: Stefano Stabellini CC: Shawn Anas

[PATCH v4 4/8] CI: Make qemu-smoke-x86-64-gcc-efi compatible with Debian Trixie

2025-09-12 Thread Andrew Cooper
The OVMF package in Debian Trixie has _4M suffixes on the files. Have scripts/include/xtf-x86-64-efi check for this before falling back to no suffix. Signed-off-by: Andrew Cooper Reviewed-by: Denis Mukhin --- CC: Anthony PERARD CC: Michal Orzel CC: Jan Beulich CC: Julien Grall CC: Roger Pau

Re: [PATCH v2 2/7] mm: introduce local state for lazy_mmu sections

2025-09-12 Thread David Hildenbrand
On 12.09.25 16:05, Alexander Gordeev wrote: On Fri, Sep 12, 2025 at 03:02:15PM +0200, David Hildenbrand wrote: How would that work with nesting? I feel like there is a fundamental problem with nesting with what you describe but I might be wrong. My picture is - flush on each lazy_mmu_disable()

Re: [PATCH v2 2/7] mm: introduce local state for lazy_mmu sections

2025-09-12 Thread Alexander Gordeev
On Fri, Sep 12, 2025 at 02:40:55PM +0200, David Hildenbrand wrote: > It would just be passing more context down to the architecture, right? Yes. Namely this one would be arch-defined and arch_enter_lazy_mmu_mode() by default. static inline void arch_enter_lazy_mmu_mode_pte(struct mm_struct *mm,

Re: [PATCH v2 2/7] mm: introduce local state for lazy_mmu sections

2025-09-12 Thread David Hildenbrand
On 12.09.25 14:56, Alexander Gordeev wrote: On Fri, Sep 12, 2025 at 02:40:55PM +0200, David Hildenbrand wrote: It would just be passing more context down to the architecture, right? Yes. Namely this one would be arch-defined and arch_enter_lazy_mmu_mode() by default. How would that work wit

Re: [PATCH v2 2/7] mm: introduce local state for lazy_mmu sections

2025-09-12 Thread David Hildenbrand
On 12.09.25 14:37, Alexander Gordeev wrote: On Fri, Sep 12, 2025 at 10:55:50AM +0200, David Hildenbrand wrote: Hi David, Kevin, Great, looking forward to seeing this all getting cleaned up and done properly for good. I am currently working on lazy mmu for s390 and this nesting initiative kin

Re: [PATCH v2 2/7] mm: introduce local state for lazy_mmu sections

2025-09-12 Thread Alexander Gordeev
On Fri, Sep 12, 2025 at 10:55:50AM +0200, David Hildenbrand wrote: Hi David, Kevin, > Great, looking forward to seeing this all getting cleaned up and done > properly for good. I am currently working on lazy mmu for s390 and this nesting initiative kind of interferres. Well, in fact it looks lik

Re: [PATCH v2 1/2] libacpi: Prevent CPU hotplug AML from corrupting memory

2025-09-12 Thread Jan Beulich
On 12.09.2025 11:32, Alejandro Vallejo wrote: > On Fri Sep 12, 2025 at 8:40 AM CEST, Jan Beulich wrote: >> On 11.09.2025 18:23, Alejandro Vallejo wrote: >>> CPU hotplug relies on the online CPU bitmap being provided on PIO 0xaf00 >>> by the device model. The GPE handler checks this and compares it

Re: [PATCH v3 3.5/5] CI: Make qemu-smoke-x86-64-gcc-efi compatible with Debian Trixie

2025-09-12 Thread Andrew Cooper
On 12/09/2025 3:39 am, [email protected] wrote: > On Fri, Sep 12, 2025 at 02:15:34AM +0100, Andrew Cooper wrote: >> The OVMF package in Debian Trixie has _4M suffixes on the files. Have >> scripts/include/xtf-x86-64-efi check for this before falling back to no >> suffix. >> >> Signed-off-by: Andrew

[XEN][PATCH] x86: hvm: hypercall: use define instead of const in hvm_hypercall()

2025-09-12 Thread Grygorii Strashko
From: Grygorii Strashko Use define X86_MODE_64BIT instead of constant in hvm_hypercall() for "mode" conditional check to improve code readability. Signed-off-by: Grygorii Strashko --- xen/arch/x86/hvm/hypercall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/

Re: [PATCH v2 2/7] mm: introduce local state for lazy_mmu sections

2025-09-12 Thread David Hildenbrand
I also wondered about that. I think the safest is to make them respectively arch_leave() and arch_enter() - the flushing entailed by arch_leave() might not be required, but it is safer. Additionally, powerpc/sparc disable preemption while in lazy_mmu, so it seems like a good idea to re-enable i

Re: [PATCH v2 2/7] mm: introduce local state for lazy_mmu sections

2025-09-12 Thread Kevin Brodsky
On 12/09/2025 10:04, David Hildenbrand wrote: >>> >>> struct lazy_mmu_state { >>>  uint8_t enabled_count; >>>  bool paused; >> >> Looking at the arm64 implementation, I'm thinking: instead of the paused >> member, how about a PF_LAZY_MMU task flag? It would be set when lazy_mmu >> is actual

[PATCH] CI: Switch the alpine containers to be non-root

2025-09-12 Thread Andrew Cooper
Testing on staging-4.19 is hitting a reliable failure, caused by alpine/3.18 being a root build container, but debian/12-x86_64 being a non-root test container. Specifically, the test container can't copy XEN_PAGING_DIR and XEN_DUMP_DIR (both 700) from the build root in order to construct the init

Re: [PATCH v9 0/4] xen/arm: scmi: introduce SCI SCMI SMC single-agent support

2025-09-12 Thread Oleksii Kurochko
Hello Oleksii, On 9/8/25 4:21 PM, Oleksii Moisieiev wrote: On 08/09/2025 17:11, Oleksii Kurochko wrote: Hello everyone, Based on the message from the previous version, the MISRA issues have been fixed, and aside from one remaining documentation patch ("docs: arm: add docs for SCMI over SMC cal

Re: [PATCH v2 24/26] xen/domctl: wrap arch-specific domctl-op with CONFIG_MGMT_HYPERCALLS

2025-09-12 Thread Jan Beulich
On 10.09.2025 09:38, Penny Zheng wrote: > Function arch_do_domctl() is responsible for arch-specific domctl-op, > and shall be wrapped with CONFIG_MGMT_HYPERCALLS > Tracking its calling chain and the following functions shall be wrapped with > CONFIG_MGMT_HYPERCALLS: > For x86: > - hvm_save_one > -

RE: [PATCH v2 04/26] xen: consolidate CONFIG_VM_EVENT

2025-09-12 Thread Penny, Zheng
[Public] > -Original Message- > From: Jan Beulich > Sent: Wednesday, September 10, 2025 10:57 PM > To: Penny, Zheng ; Tamas K Lengyel > > Cc: Huang, Ray ; Andrew Cooper > ; Roger Pau Monné ; > Alexandru Isaila ; Petre Pircalabu > ; Daniel P. Smith ; > [email protected] > Sub

Re: [PATCH v2 2/7] mm: introduce local state for lazy_mmu sections

2025-09-12 Thread David Hildenbrand
struct lazy_mmu_state { uint8_t enabled_count; bool paused; Looking at the arm64 implementation, I'm thinking: instead of the paused member, how about a PF_LAZY_MMU task flag? It would be set when lazy_mmu is actually enabled (i.e. inside an enter()/leave() section, and not inside a p

[ImageBuilder] Use LOAD_CMD by default if not specified in load_file()

2025-09-12 Thread Michal Orzel
Commit 061d6782756f modified load_file() to take load command as argument but did not change all the invocations (e.g. loading standalone Linux, bitstream, etc.) which broke the output script (load command empty). Fix it by defaulting to LOAD_CMD if not specified. Fixes: 061d6782756f ("Add config

Re: [PATCH v2 08/26] xen/domctl: wrap domain_soft_reset() with CONFIG_MGMT_HYPERCALLS

2025-09-12 Thread Jan Beulich
On 12.09.2025 09:18, Penny, Zheng wrote: > [Public] > >> -Original Message- >> From: Jan Beulich >> Sent: Wednesday, September 10, 2025 11:14 PM >> To: Penny, Zheng >> Cc: Huang, Ray ; Stefano Stabellini >> ; Julien Grall ; Bertrand Marquis >> ; Orzel, Michal ; >> Volodymyr Babchuk ; And

Re: [PATCH v2 2/7] mm: introduce local state for lazy_mmu sections

2025-09-12 Thread Kevin Brodsky
On 11/09/2025 20:14, David Hildenbrand wrote: On the other hand, with a pagefault_disabled-like approach, there is no way to instruct call {3} to fully exit lazy_mmu regardless of the nesting level. >>> >>> Sure there is, with a better API. See below. :) >> >> I meant while keep

Re: [PATCH v7 05/16] emul/ns16x50: implement SCR register

2025-09-12 Thread Mykola Kvach
Hi Denis, Thank you for the patch. On Tue, Sep 9, 2025 at 12:12 AM wrote: > > From: Denis Mukhin > > Add SCR register emulation to the I/O port handler. > Firmware (e.g. OVMF) may use SCR during the guest OS boot. > > Signed-off-by: Denis Mukhin > --- > Changes since v6: > - default handling o

RE: [PATCH v2 08/26] xen/domctl: wrap domain_soft_reset() with CONFIG_MGMT_HYPERCALLS

2025-09-12 Thread Penny, Zheng
[Public] > -Original Message- > From: Jan Beulich > Sent: Wednesday, September 10, 2025 11:14 PM > To: Penny, Zheng > Cc: Huang, Ray ; Stefano Stabellini > ; Julien Grall ; Bertrand Marquis > ; Orzel, Michal ; > Volodymyr Babchuk ; Andrew Cooper > ; Anthony PERARD ; > Roger Pau Monné ; C