Re: [PATCH v6 04/15] emul/ns16x50: implement DLL/DLM registers

2025-09-07 Thread dmukhin
On Sun, Sep 07, 2025 at 12:12:08AM +0300, Mykola Kvach wrote: > Hi Denis, > > On Sat, Sep 6, 2025 at 3:11 AM wrote: > > > > From: Denis Mukhin > > > > Add DLL/DLM registers emulation. > > > > DLL/DLM registers report hardcoded 115200 baud rate to the guest OS. > > > > Add stub for ns16x50_dlab_g

Re: [PATCH] x86/apic: Avoid infinite loop in io_apic_level_ack_pending()

2025-09-07 Thread Jan Beulich
On 05.09.2025 22:34, Jason Andryuk wrote: > On 2025-09-05 03:39, Jan Beulich wrote: >> On 04.09.2025 23:51, Jason Andryuk wrote: >>> io_apic_level_ack_pending() will end up in an infinite loop if >>> entry->pin == -1. entry does not change, so it will keep reading -1. >>> >>> Switched to breaking

Re: [PATCH v6 10/15] emul/ns16x50: implement THR register

2025-09-07 Thread dmukhin
On Sun, Sep 07, 2025 at 07:50:34PM -0700, dmuk...@xen.org wrote: > On Fri, Sep 05, 2025 at 06:59:30PM -0700, Stefano Stabellini wrote: > > On Fri, 5 Sep 2025, dmuk...@xen.org wrote: > > > From: Denis Mukhin > [..] > > > @@ -439,6 +523,16 @@ static int ns16x50_io_read8( > > > > > > case

Re: [PATCH v6 05/15] emul/ns16x50: implement SCR register

2025-09-07 Thread dmukhin
On Sun, Sep 07, 2025 at 12:24:24AM +0300, Mykola Kvach wrote: > Hi Denis, > > On Sat, Sep 6, 2025 at 2:27 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 M

Re: [PATCH v6 10/15] emul/ns16x50: implement THR register

2025-09-07 Thread dmukhin
On Fri, Sep 05, 2025 at 06:59:30PM -0700, Stefano Stabellini wrote: > On Fri, 5 Sep 2025, dmuk...@xen.org wrote: > > From: Denis Mukhin [..] > > @@ -439,6 +523,16 @@ static int ns16x50_io_read8( > > > > case UART_IIR: /* RO */ > > val = ns16x50_iir_get(vdev); > > + > > +

Re: [PATCH v6 06/15] emul/ns16x50: implement IER/IIR registers

2025-09-07 Thread dmukhin
On Fri, Sep 05, 2025 at 06:42:13PM -0700, Stefano Stabellini wrote: > On Fri, 5 Sep 2025, dmuk...@xen.org wrote: [..] > > +static void ns16x50_irq_assert(const struct vuart_ns16x50 *vdev) > > +{ > > +struct domain *d = vdev->owner; > > +const struct vuart_info *info = vdev->info; > > +i

Re: [PATCH v6 08/15] emul/ns16x50: implement MCR/MSR registers

2025-09-07 Thread dmukhin
On Fri, Sep 05, 2025 at 06:42:23PM -0700, Stefano Stabellini wrote: > On Fri, 5 Sep 2025, dmuk...@xen.org wrote: > > From: Denis Mukhin [..] > > +/* Calculate changes in modem status */ > > +if ( (msr_curr & UART_MSR_CTS) ^ (msr_next & UART_MSR_CTS) ) > > +

Re: [PATCH v7 00/12] Introduce eSPI support

2025-09-07 Thread Leonid Komarianskyi
Hello Stefano, Thank you for your comments and for providing the Eclair reports. On 06.09.25 03:17, Stefano Stabellini wrote: > Hi Leonid, > > I was about to commit this but unfortunately it is introducing MISRA > regressions. See: > https://gitlab.com/xen-project/people/sstabellini/xen/-/tree/pp

Re: [PATCH v7 05/12] xen/arm: gicv3: implement handling of GICv3.1 eSPI

2025-09-07 Thread Julien Grall
Hi Leonid, On 05/09/2025 11:27, Leonid Komarianskyi wrote: On 05.09.25 10:22, Julien Grall wrote: Hi Leonid, On 04/09/2025 21:01, Leonid Komarianskyi wrote: +#ifdef CONFIG_GICV3_ESPI +unsigned int gic_number_espis(void) +{ +    return gic_hw_ops->info->nr_espi; +} + +static void __init gicv3_

Re: [PATCH] symbols: discard stray file symbols

2025-09-07 Thread Jason Andryuk
On 2025-04-16 05:00, Jan Beulich wrote: By observation GNU ld 2.25 may emit file symbols for .data.read_mostly when linking xen.efi. Due to the nature of file symbols in COFF symbol tables (see the code comment) the symbols_offsets[] entries for such symbols would cause assembler warnings regardi

Re: [PATCH v6 04/15] emul/ns16x50: implement DLL/DLM registers

2025-09-07 Thread Mykola Kvach
Hi Denis, On Sat, Sep 6, 2025 at 3:11 AM wrote: > > From: Denis Mukhin > > Add DLL/DLM registers emulation. > > DLL/DLM registers report hardcoded 115200 baud rate to the guest OS. > > Add stub for ns16x50_dlab_get() helper. > > Signed-off-by: Denis Mukhin > --- > Changes since v5: > - dropped

Re: [PATCH v9 7/8] xen/cpufreq: Adapt SET/GET_CPUFREQ_CPPC xen_sysctl_pm_op for amd-cppc driver

2025-09-07 Thread Jan Beulich
On 04.09.2025 08:35, Penny Zheng wrote: > Introduce helper set_amd_cppc_para() and get_amd_cppc_para() to > SET/GET CPPC-related para for amd-cppc/amd-cppc-epp driver. > > In get_cpufreq_cppc()/set_cpufreq_cppc(), we include > "processor_pminfo[cpuid]->init & XEN_CPPC_INIT" condition check to deal

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

2025-09-07 Thread Alexander Gordeev
On Thu, Sep 04, 2025 at 01:57:29PM +0100, Kevin Brodsky wrote: Hi Kevin, > When the lazy MMU mode was introduced eons ago, it wasn't made clear > whether such a sequence was legal: > > arch_enter_lazy_mmu_mode() > ... > arch_enter_lazy_mmu_mode() > ... >

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

2025-09-07 Thread Oleksii Moisieiev
Hi Stefano, I fixed MISRA rules violation and now Pipeline passes with no regressions: https://gitlab.com/xen-project/people/dimaprkp4k/xen/-/pipelines/2022022013 I will send V9 with updates. BR, Oleksii On 04/09/2025 00:24, Stefano Stabellini wrote: > Hi Oleksii, > > It is still not passing the

[PATCH v3 6/7] xen/page_alloc: Protect claimed memory against other allocations

2025-09-07 Thread Bernhard Kaindl
Extend get_free_buddy() to only allocate from nodes with enough unclaimed memory left, unless the allocation is made by a domain with sufficient claims on this node to cover the allocation. Signed-off-by: Marcus Granado Signed-off-by: Alejandro Vallejo Signed-off-by: Bernhard Kaindl --- Change

[PATCH v3 5/7] xen/page_alloc: Pass node to adjust_tot_pages and check it

2025-09-07 Thread Bernhard Kaindl
domain_adjust_tot_pages() consumes remaining claims as pages are allocated, now also from the claimed node. Update it to skip consuming the outstanding claims when the page was allocated from a different NUMA node. This in itself would not be critically needed as the page should only be allocated

[PATCH v3 7/7] xen: New hypercall to claim memory using XEN_DOMCTL_claim_memory

2025-09-07 Thread Bernhard Kaindl
Add the new hypercall requested during the review of the v1 series do not require changing the API for multi-node claims. The hypercall receives a number of claims, intented to be one claim per NUMA node, and limited to one claim for now. The changes to update the NUMA claims management to handle

[PATCH v3 4/7] xen/page_alloc: Add staking a NUMA node claim for a domain

2025-09-07 Thread Bernhard Kaindl
Update domain_set_outstanding_pages() to domain_claim_pages() for staking claims for domains on NUMA nodes: domain_claim_pages() is a handler for claiming pages, where its former name suggested that it just sets the domain's outstanding claims. Actually, three different code locations do perform

[PATCH v3 1/7] xen/numa: Add per_node() variables paralleling per_cpu() variables

2025-09-07 Thread Bernhard Kaindl
During the review of the 3rd commit of the NUMA claims v1 series, it was found to be concerning (performance-wise) add add another array like this that randomly written from all nodes: +/* Per-node counts of free pages */ +static unsigned long pernode_avail_pages[MAX_NUMNODES]; As solution, it wa

[PATCH v3 3/7] xen/page_alloc: Add and track per_node(avail_pages)

2025-09-07 Thread Bernhard Kaindl
From: Alejandro Vallejo The static per-NUMA-node count of free pages is the sum of free memory in all zones of a node. It's an optimisation to avoid doing that operation frequently in the following patches that introduce per-NUMA-node claims. Signed-off-by: Alejandro Vallejo Signed-off-by: Bern

[PATCH v3 0/7] NUMA: Add per-node domain-memory claims

2025-09-07 Thread Bernhard Kaindl
XEN_DOMCTL_claim_memory - New Hypercall to claim memory for a domain to improve NUMA awareness when allocating its system memory. In tests with AMD Genoa, we achived 22% higer VM density compared to spreading memory across all NUMA nodes for the same Speedometer web application benchmark score, so

[PATCH v3 2/7] xen/page_alloc: Simplify domain_adjust_tot_pages() further

2025-09-07 Thread Bernhard Kaindl
When domain memory is allocated, domain_adjust_tot_pages(), also reduces the outstanding claim. Replace the checks to not over-reduce the claim beyond 0 by using min() which prevents the claim to become negative (and also not be over-conumed for the node and globally) Cc: Jan Beulich Signed-off-

[PATCH] xen/manage: Fix suspend error path

2025-09-07 Thread Lukas Wunner
The device power management API has the following asymmetry: * dpm_suspend_start() does not clean up on failure (it requires a call to dpm_resume_end()) * dpm_suspend_end() does clean up on failure (it does not require a call to dpm_resume_start()) The asymmetry was introduced by commit d8f3de

Re: [PATCH] x86/mcheck: allow varying bank counts per CPU

2025-09-07 Thread Jason Andryuk
On 2025-09-05 12:52, Soham Dandapat wrote: In mca_cap_init function,the mcabanks_alloc allocates and initializes an mca_banks structure for managing MCA banks, setting up a bank map and storing the specified or default number of banks. After this we will call mcabanks_set(i, mca_allbanks); Th

Re: [PATCH v3 2/2] efi: Support using Shim's LoadImage protocol

2025-09-07 Thread Marek Marczykowski-Górecki
On Fri, Sep 05, 2025 at 10:05:32AM +, Gerald Elder-Vass wrote: > The existing Verify functionality of the Shim lock protocol is > deprecated and will be removed, the alternative it to use the LoadImage > interface to perform the verification. > > When the loading is successful we won't be usin

Re: [PATCH v6 04/12] xen/arm/irq: add handling for IRQs in the eSPI range

2025-09-07 Thread Leonid Komarianskyi
Hi Volodymyr, Thank you for your close review and for your time while reviewing so many versions. On 03.09.25 23:56, Volodymyr Babchuk wrote: > Hi Leonid, > > Leonid Komarianskyi writes: > >> Currently, Xen does not support eSPI interrupts, leading >> to a data abort when such interrupts are

Re: [misra] Re: [PATCH v3 1/2] efi: Add a function to check if Secure Boot mode is enabled

2025-09-07 Thread Andrew Cooper
On 05/09/2025 11:44 am, Jan Beulich wrote: > On 05.09.2025 12:36, Andrew Cooper wrote: >> On 05/09/2025 11:05 am, Gerald Elder-Vass wrote: >>> diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c >>> index e12fa1a7ec04..e7e3dffa7ddc 100644 >>> --- a/xen/common/efi/boot.c >>> +++ b/xen/common/

Re: [PATCH v7 05/12] xen/arm: gicv3: implement handling of GICv3.1 eSPI

2025-09-07 Thread Julien Grall
Hi Leonid, On 04/09/2025 21:01, Leonid Komarianskyi wrote: +#ifdef CONFIG_GICV3_ESPI +unsigned int gic_number_espis(void) +{ +return gic_hw_ops->info->nr_espi; +} + +static void __init gicv3_dist_espi_common_init(uint32_t type) +{ +unsigned int espi_nr, i; + +espi_nr = min(1024U, GIC

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

2025-09-07 Thread Kevin Brodsky
On 05/09/2025 13:37, Lorenzo Stoakes wrote: > On Fri, Sep 05, 2025 at 12:21:40PM +0100, Lorenzo Stoakes wrote: >> You should really base on mm-new. >> >> You need to account for everything that is potentially going to go >> upstream. mm-stable is generally not actually populated all too well until

[PATCH v7 10/12] xen/arm: vgic-v3: add emulation of GICv3.1 eSPI registers

2025-09-07 Thread Leonid Komarianskyi
Implemented support for GICv3.1 extended SPI registers for vGICv3, allowing the emulation of eSPI-specific behavior for guest domains. The implementation includes read and write emulation for eSPI-related registers (e.g., GICD_ISENABLERnE, GICD_IROUTERnE, and others), following a similar approach t

Re: [RFC PATCH v1] imagebuilder: Add a script to check the sanity of device tree

2025-09-07 Thread Ayan Kumar Halder
Hi, On 01/09/2025 14:51, Ayan Kumar Halder wrote: Hi Michal, On 01/09/2025 14:17, Orzel, Michal wrote: On 01/09/2025 14:31, Ayan Kumar Halder wrote: Xen gives a panic if certain nodes are not present in the device tree. In order to prevent this panic, scripts/dt_sanity.py is written so that

Re: [PATCH v2] Strip build path directories in tools and hypervisor

2025-09-07 Thread Jan Beulich
On 04.09.2025 16:27, Marek Marczykowski-Górecki wrote: > On Thu, Sep 04, 2025 at 02:58:20PM +0200, Jan Beulich wrote: >> On 04.09.2025 13:41, Marek Marczykowski-Górecki wrote: >>> Use -fdebug-prefix-map in preference to -ffile-prefix-map, as it's >>> available in earlier toolchain versions. But use

Re: [PATCH v6 11/15] emul/ns16x50: implement FCR register (write-only)

2025-09-07 Thread Stefano Stabellini
On Fri, 5 Sep 2025, dmuk...@xen.org wrote: > From: Denis Mukhin > > Add emulation logic for FCR register. > > Note, that does not hook FIFO interrupt moderation to the FIFO management > code for simplicity. > > Signed-off-by: Denis Mukhin Reviewed-by: Stefano Stabellini

[PATCH v9 7/8] xen/cpufreq: Adapt SET/GET_CPUFREQ_CPPC xen_sysctl_pm_op for amd-cppc driver

2025-09-07 Thread Penny Zheng
Introduce helper set_amd_cppc_para() and get_amd_cppc_para() to SET/GET CPPC-related para for amd-cppc/amd-cppc-epp driver. In get_cpufreq_cppc()/set_cpufreq_cppc(), we include "processor_pminfo[cpuid]->init & XEN_CPPC_INIT" condition check to deal with cpufreq driver in amd-cppc. We borrow govern

Re: [PATCH v4 00/16] dma-mapping: migrate to physical address-based API

2025-09-07 Thread Takashi Sakamoto
Hi, I'm a present maintainer of Linux FireWire subsystem, and recent years have been working to modernize the subsystem. On Fri, Sep 05, 2025 at 14:43:24PM -0300, Jason Gunthorpe wrote: > There is only one user I found of alloc_pages: > > drivers/firewire/ohci.c:ctx->pages[i] = dm

Re: [PATCH v6 02/15] xen/8250-uart: update definitions

2025-09-07 Thread Stefano Stabellini
On Fri, 5 Sep 2025, dmuk...@xen.org wrote: > From: Denis Mukhin > > Added missing definitions needed for NS16550 UART emulator. > > Newly introduced MSR definitions re-used in the existing ns16550 driver. > > Also, corrected FCR DMA definition bit#3 (0x08) as per: > https://www.ti.com/lit/ds

[PATCH v9 2/8] xen/cpufreq: implement amd-cppc driver for CPPC in passive mode

2025-09-07 Thread Penny Zheng
amd-cppc is the AMD CPU performance scaling driver that introduces a new CPU frequency control mechanism. The new mechanism is based on Collaborative Processor Performance Control (CPPC) which is a finer grain frequency management than legacy ACPI hardware P-States. Current AMD CPU platforms are us

Re: [PATCH v5 07/16] dma-mapping: convert dma_direct_*map_page to be phys_addr_t based

2025-09-07 Thread Leon Romanovsky
On Fri, Sep 05, 2025 at 06:21:44PM +0200, Marek Szyprowski wrote: > On 02.09.2025 16:48, Leon Romanovsky wrote: > > From: Leon Romanovsky > > > > Convert the DMA direct mapping functions to accept physical addresses > > directly instead of page+offset parameters. The functions were already > > ope

Re: [PATCH v5 07/16] dma-mapping: convert dma_direct_*map_page to be phys_addr_t based

2025-09-07 Thread Marek Szyprowski
On 02.09.2025 16:48, Leon Romanovsky wrote: > From: Leon Romanovsky > > Convert the DMA direct mapping functions to accept physical addresses > directly instead of page+offset parameters. The functions were already > operating on physical addresses internally, so this change eliminates > the redun

Re: [PATCH v3 8/9] SUPPORT.md: add xenstorepvh-stubdom live update

2025-09-07 Thread Juergen Gross
On 8/20/25 08:05, Juergen Gross wrote: Ping? On 30.07.25 14:23, Juergen Gross wrote: Live update is now working with the PVH variant of xenstore-stubdom. Signed-off-by: Juergen Gross --- V2: - new patch ---   SUPPORT.md | 2 +-   1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SUPP

Re: [PATCH v7 04/12] xen/arm/irq: add handling for IRQs in the eSPI range

2025-09-07 Thread Julien Grall
On 05/09/2025 11:05, Leonid Komarianskyi wrote: On 05.09.25 10:10, Julien Grall wrote: Hi Leonid, On 04/09/2025 21:01, Leonid Komarianskyi wrote: diff --git a/xen/arch/arm/include/asm/irq.h b/xen/arch/arm/include/ asm/irq.h index 5bc6475eb4..2ff2d07d6d 100644 --- a/xen/arch/arm/include/asm/

Re: [PATCH v17 0/4] xen/domain: domain ID allocation

2025-09-07 Thread Demi Marie Obenour
On 8/29/25 19:21, dmuk...@xen.org wrote: > Patch 1 introduces new domid_{alloc,free} calls. > Patch 2 is a prep change for domain ID allocator test. > Patch 3 introduces some basic testing for domain ID allocator. > Patch 4 adjusts create_dom0() messages (use %pd). > > Link to v16: > https://lore