[PATCH v3 09/13] powerpc/mm: replace batch->active with in_lazy_mmu_mode()

2025-10-18 Thread Kevin Brodsky
The generic lazy_mmu layer now tracks whether a task is in lazy MMU mode. As a result we no longer need to track whether the per-CPU TLB batch struct is active - we know it is if in_lazy_mmu_mode() returns true. Signed-off-by: Kevin Brodsky --- arch/powerpc/include/asm/book3s/64/tlbflush-hash.h

Re: [PATCH v5] x86: make Viridian support optional

2025-10-18 Thread Demi Marie Obenour
On 10/17/25 11:52, Alejandro Vallejo wrote: > On Wed Oct 15, 2025 at 7:58 AM CEST, Demi Marie Obenour wrote: >> On 10/13/25 06:01, Alejandro Vallejo wrote: >>> On Wed Oct 8, 2025 at 6:04 PM CEST, Jan Beulich wrote: On 30.09.2025 14:52, Grygorii Strashko wrote: > --- a/xen/arch/x86/hvm/Kcon

Re: [RFC PATCH] xen: privcmd: fix ioeventfd/ioreq crashing PV domain

2025-10-18 Thread Demi Marie Obenour
On 10/18/25 20:42, Demi Marie Obenour wrote: > I'm pretty sure Xen doesn't support ioeventfd at all yet. There are > two options: > > 1. Port the backend to use an ioreq server instead of ioeventfd. > 2. Modify Linux (and possibly Xen) to support ioeventfd. > > Which virtio device are you trying

Re: [PATCH v2] MAINTAINERS: Add myself as an AMD SVM & IOMMU reviewer

2025-10-18 Thread Jan Beulich
On 08.10.2025 22:11, Jason Andryuk wrote: > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -220,6 +220,23 @@ F: xen/drivers/acpi/ > F: xen/include/acpi/ > F: tools/libacpi/ > > +AMD IOMMU > +M: Jan Beulich > +M: Andrew Cooper > +M: Roger Pau Monné > +R: Jason Andryuk > +S: S

[PATCH v2 16/17] hw/virtio/vhost: Replace legacy cpu_physical_memory_*map() calls

2025-10-18 Thread Philippe Mathieu-Daudé
Use VirtIODevice::dma_as address space to convert the legacy cpu_physical_memory_[un]map() calls to address_space_[un]map(). Signed-off-by: Philippe Mathieu-Daudé --- hw/virtio/vhost.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c

Re: domU suspend issue - freeze processes failed - Linux 6.16

2025-10-18 Thread Marek Marczykowski-Górecki
On Fri, Aug 22, 2025 at 08:42:30PM +0200, Marek Marczykowski-Górecki wrote: > On Fri, Aug 22, 2025 at 05:27:20PM +0200, Jürgen Groß wrote: > > On 22.08.25 16:42, Marek Marczykowski-Górecki wrote: > > > On Fri, Aug 22, 2025 at 04:39:33PM +0200, Marek Marczykowski-Górecki > > > wrote: > > > > Hi, >

Re: [PATCH v3] xen/arm, xen/common: Add Kconfig option to control Dom0 boot

2025-10-18 Thread Nicola Vetrini
On 2025-09-24 18:00, Oleksii Moisieiev wrote: This commit introduces a new Kconfig option, `CONFIG_DOM0_BOOT`, to allow for building Xen without support for booting a regular domain (Dom0). This functionality is primarily intended for the ARM architecture. A new Kconfig symbol, `HAS_DOM0`, has

[PATCH v5] x86: make Viridian support optional

2025-10-18 Thread Grygorii Strashko
From: Sergiy Kibrik Add config option VIRIDIAN that covers viridian code within HVM. Calls to viridian functions guarded by is_viridian_domain() and related macros. Having this option may be beneficial by reducing code footprint for systems that are not using Hyper-V. [[email protected]

[XEN PATCH v2 0/8] Allow to build libxl and other tools with json-c instead of yajl

2025-10-18 Thread Anthony PERARD
From: Anthony PERARD Patch series available in this git branch: https://xenbits.xenproject.org/git-http/people/aperard/xen-unstable.git br.libxl-libjsonc-v2 changes in v2: - introduce $(XEN_JSON_LIBS) to have either -lyajl or -ljson-c or both (for a short while). - few more changes detail in

Re: [RFC PATCH] xen: privcmd: fix ioeventfd/ioreq crashing PV domain

2025-10-18 Thread Demi Marie Obenour
I'm pretty sure Xen doesn't support ioeventfd at all yet. There are two options: 1. Port the backend to use an ioreq server instead of ioeventfd. 2. Modify Linux (and possibly Xen) to support ioeventfd. Which virtio device are you trying to implement? virtio-GPU will need a lot of additional wo

[PATCH v4 5/7] hw/sd/sdhci: Do not unparent in instance_finalize()

2025-10-18 Thread Akihiko Odaki
Children are automatically unparented so manually unparenting is unnecessary. Worse, automatic unparenting happens before the instance_finalize() callback of the parent gets called, so object_unparent() calls in the callback will refer to objects that are already unparented, which is semantically

Re: [GIT PULL] xen: branch for v6.18-rc1

2025-10-18 Thread pr-tracker-bot
The pull request you sent on Fri, 26 Sep 2025 13:31:05 +0200: > git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git > for-linus-6.18-rc1-tag has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/30d4efb2f5a515a60fe6b0ca85362cbebea21e2f Thank you! -- Deet-doot-dot, I

Re: domU suspend issue - freeze processes failed - Linux 6.16

2025-10-18 Thread Grygorii Strashko
On 24.09.25 16:30, Marek Marczykowski-Górecki wrote: On Wed, Sep 24, 2025 at 01:17:15PM +0300, Grygorii Strashko wrote: On 22.09.25 13:09, Marek Marczykowski-Górecki wrote: On Fri, Aug 22, 2025 at 08:42:30PM +0200, Marek Marczykowski-Górecki wrote: On Fri, Aug 22, 2025 at 05:27:20PM +0200

[PATCH v3 18/22] x86/pv: Adjust GS handling for FRED mode

2025-10-18 Thread Andrew Cooper
When FRED is active, hardware automatically swaps GS when changing privilege, and the SWAPGS instruction is disallowed. For native OSes using GS as the thread local pointer this is a massive improvement on the pre-FRED architecture, but under Xen it makes handling PV guests more complicated. Spec

[PATCH] xen/arm: gicv3: initialize eSPI unconditionally

2025-10-18 Thread Leonid Komarianskyi
Since the firmware may initialize eSPIs before Xen, and without CONFIG_GICV3_ESPI enabled, Xen would not reinitialize them properly during boot. In such cases, once the GIC is re-enabled in Xen, interrupts may be received that cannot be handled. To ensure proper operation on hardware with eSPI fea

Re: [PATCH v3 03/22] x86/fsgsbase: Split out __{rd,wr}gs_shadow() helpers

2025-10-18 Thread Jan Beulich
On 04.10.2025 00:53, Andrew Cooper wrote: > Right now they're inline in {read,write}_gs_shadow(), but we're going to need > to use these elsewhere to support FRED. > > No functional change. > > Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich

Re: [XEN][PATCH] x86: hvm: vlapic: rework WR/rsvdz masks for LVTx regs

2025-10-18 Thread Jan Beulich
On 09.10.2025 13:42, Grygorii Strashko wrote: > From: Grygorii Strashko > > Rework LVTx registers masks usage in MMIO/WRMSR write emulation code: > > - do LVTx masks renaming and rearranging to x_WR_MASK/x_RO_MASK > > - rename "vlapic_lvt_mask[]" to "lvt_wr_masks[]" to indicate they define > wr

[PATCH] drivers/xen/xenbus: Replace deprecated strcpy in xenbus_transaction_end

2025-10-18 Thread Thorsten Blum
strcpy() is deprecated; use strscpy() instead. Fix the function comment and use bool instead of int while we're at it. Link: https://github.com/KSPP/linux/issues/88 Signed-off-by: Thorsten Blum --- drivers/xen/xenbus/xenbus_xs.c | 9 +++-- include/xen/xenbus.h | 2 +- 2 files chang

[PATCH v3 06/21] sched: Move clock related paravirt code to kernel/sched

2025-10-18 Thread Juergen Gross
Paravirt clock related functions are available in multiple archs. In order to share the common parts, move the common static keys to kernel/sched/ and remove them from the arch specific files. Make a common paravirt_steal_clock() implementation available in kernel/sched/cputime.c, guarding it wit

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

2025-10-18 Thread Roger Pau Monné
On Wed, Oct 15, 2025 at 01:14:20PM -0400, Jason Andryuk wrote: > On 2025-10-15 08:59, Jan Beulich wrote: > > On 14.10.2025 09:37, Roger Pau Monné wrote: > > > On Mon, Oct 13, 2025 at 05:11:06PM -0400, Jason Andryuk wrote: > > > > io_apic_level_ack_pending() will end up in an infinite loop if > > >

Re: [PATCH for-4.21] cirrus-ci: add json-c for libxl dependency

2025-10-18 Thread Andrew Cooper
On 07/10/2025 5:13 pm, Roger Pau Monne wrote: > Add json-c package for libxl usage. At the same time drop YAJL. > > Signed-off-by: Roger Pau Monné > --- > Would be nice to have for 4.21, so that we test with json-c instead of > YAJL. I plan to switch the FreeBSD Xen port use json-c for 4.21. > >

Re: domU suspend issue - freeze processes failed - Linux 6.16

2025-10-18 Thread Yann Sionneau
On 9/24/25 15:30, Marek Marczykowski-Górecki wrote: > On Wed, Sep 24, 2025 at 01:17:15PM +0300, Grygorii Strashko wrote: >> >> >> On 22.09.25 13:09, Marek Marczykowski-Górecki wrote: >>> On Fri, Aug 22, 2025 at 08:42:30PM +0200, Marek Marczykowski-Górecki wrote: On Fri, Aug 22, 2025 at 05:27:2

[PATCH v3 04/13] sparc/mm: implement arch_flush_lazy_mmu_mode()

2025-10-18 Thread Kevin Brodsky
Upcoming changes to the lazy_mmu API will cause arch_flush_lazy_mmu_mode() to be called when leaving a nested lazy_mmu section. Move the relevant logic from arch_leave_lazy_mmu_mode() to arch_flush_lazy_mmu_mode() and have the former call the latter. Signed-off-by: Kevin Brodsky --- arch/sparc/

Re: [PATCH for-4.21] vpci/msix: improve handling of bogus MSI-X capabilities

2025-10-18 Thread Andrew Cooper
On 06/10/2025 2:55 pm, Alejandro Vallejo wrote: > On Tue Sep 30, 2025 at 2:57 PM CEST, Roger Pau Monné wrote: >> On Tue, Sep 30, 2025 at 11:15:01AM +0200, Alejandro Vallejo wrote: >>> On Mon Sep 29, 2025 at 10:41 AM CEST, Roger Pau Monne wrote: I've had the luck to come across a PCI card that

[PATCH v3] arm: address violations of MISRA C Rule 2.1

2025-10-18 Thread Dmytro Prokopchuk1
MISRA C Rule 2.1 states: "A project shall not contain unreachable code". In certain build configurations the following functions 'prepare_acpi()' and 'gicv3_its_setup_collection()' are defined as inline functions and contain the macro 'BUG()'. This resulted in violations due to these functions bec

[PATCH v3 25/28] xen/domctl: avoid unreachable codes when both MGMT_HYPERCALLS and MEM_SHARING unset

2025-10-18 Thread Penny Zheng
The following functions have been referenced in places which is either guarded with CONFIG_MGMT_HYPERCALLS or CONFIG_MEM_SHARING: - arch_hvm_save - arch_hvm_check - arch_hvm_load - hvm_save_size - hvm_save - hvm_load - hvm_vmtrace_reset So they shall be wrapped under OR relationship, otherwise they

[PATCH v3 21/21] x86/pvlocks: Move paravirt spinlock functions into own header

2025-10-18 Thread Juergen Gross
Instead of having the pv spinlock function definitions in paravirt.h, move them into the new header paravirt-spinlock.h. Signed-off-by: Juergen Gross --- V2: - use new header instead of qspinlock.h - use dedicated pv_ops_lock array - move more paravirt related lock code V3: - hide native_pv_lock_

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

2025-10-18 Thread Jan Beulich
On 17.09.2025 23:55, Oleksii Kurochko wrote: > --- a/xen/arch/riscv/p2m.c > +++ b/xen/arch/riscv/p2m.c > @@ -978,3 +978,189 @@ int map_regions_p2mt(struct domain *d, > > return rc; > } > + > + Nit: No double blank lines please. > +/* > + * p2m_get_entry() should always return the correct

[PATCH v3 00/28] Disable domctl-op via CONFIG_MGMT_HYPERCALLS

2025-10-18 Thread Penny Zheng
It can be beneficial for some dom0less systems to further reduce Xen footprint via disabling some hypercalls handling code, which may not to be used & required in such systems. We are introducing a new single Kconfig CONFIG_MGMT_HYPERCALLS to manage such hypercalls. We are trying to disable hyperc

[PATCH v3 01/22] x86/msr: Change rdmsr() to have normal API

2025-10-18 Thread Andrew Cooper
We want a consistent MSR API, and these want to be named rdmsr() and wrmsr(), but not with their current APIs. The current rdmsr() flavours writing to their parameters by name makes code that reads like invalid C, and is unergonomic to use in lots of cases. Change the API, and update the callers

Re: [PATCH v5] x86: make Viridian support optional

2025-10-18 Thread Roger Pau Monné
On Tue, Oct 14, 2025 at 04:24:53PM +0300, Grygorii Strashko wrote: > On 13.10.25 15:17, Roger Pau Monné wrote: > > On Tue, Sep 30, 2025 at 12:52:16PM +, Grygorii Strashko wrote: > > > From: Sergiy Kibrik > > > + > > > + If unsure, say Y. > > > + > > > config MEM_PAGING > > > bool

Re: [PATCH 2/2] x86: guard synthetic feature and bug enumerators

2025-10-18 Thread Andrew Cooper
On 25/09/2025 11:48 am, Jan Beulich wrote: > While adding new enumerators one may overlook the (rare) need to bump > X86_NR_{SYNTH,BUG}. Guard against that happening by adding respective > checking. The use of BUILD_BUG_ON_ZERO(), however, entails a number of > other changes, as the expansion may n

Re: [PATCH v3] xen/arm, xen/common: Add Kconfig option to control Dom0 boot

2025-10-18 Thread Jan Beulich
On 24.09.2025 18:00, Oleksii Moisieiev wrote: > --- a/xen/common/Kconfig > +++ b/xen/common/Kconfig > @@ -26,6 +26,14 @@ config DOM0LESS_BOOT > Xen boot without the need of a control domain (Dom0), which could be > present anyway. > > +config DOM0_BOOT > + bool "Dom0 boot supp

Re: [PATCH v2] tools: init-dom0less: Replace err() with more informative messages

2025-10-18 Thread Alejandro Vallejo
On Tue Oct 7, 2025 at 8:26 AM CEST, Michal Orzel wrote: > Current use of err() has the following issues: > - without setting errno, on error it results in printing e.g.: > "init-dom0less: writing to xenstore: Success" > This is very misleading and difficult to deduct that there was a > failure.

Re: [PATCH v3 02/22] x86/msr: Change wrmsr() to take a single parameter

2025-10-18 Thread Demi Marie Obenour
On 10/3/25 18:53, Andrew Cooper wrote: > Mirroring the cleanup to rdmsr(), do the same to wrmsr(). It now has the same > API as wrmsrl(), but we'll want to drop that wrapper in due course. > > It's telling that almost all remaining users pass in 0. Most are converted > directly to WRMSRNS, but a

[PATCH v3 11/18] target/i386/kvm: Replace legacy cpu_physical_memory_rw() call

2025-10-18 Thread Philippe Mathieu-Daudé
Get the vCPU address space and convert the legacy cpu_physical_memory_rw() by address_space_rw(). Signed-off-by: Philippe Mathieu-Daudé --- target/i386/kvm/xen-emu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/i386/kvm/xen-emu.c b/target/i386/kvm/xen-emu.c index

Re: [PATCH 2/2] Update Xen version to 4.21.0-rc1

2025-10-18 Thread Jan Beulich
On 07.10.2025 10:28, Andrew Cooper wrote: > On 07/10/2025 7:54 am, Roger Pau Monné wrote: >> On Mon, Oct 06, 2025 at 09:08:40PM +0100, Andrew Cooper wrote: >>> --- a/xen/Makefile >>> +++ b/xen/Makefile >>> @@ -6,7 +6,7 @@ this-makefile := $(call lastword,$(MAKEFILE_LIST)) >>> # All other places th

Re: [PATCH v5] x86: make Viridian support optional

2025-10-18 Thread Marek Marczykowski-Górecki
On Fri, Oct 17, 2025 at 12:40:33AM +0300, Grygorii Strashko wrote: > > > On 15.10.25 11:00, Roger Pau Monné wrote: > > On Tue, Oct 14, 2025 at 06:48:23PM +0300, Grygorii Strashko wrote: > > > > > > > > > On 14.10.25 17:38, Roger Pau Monné wrote: > > > > On Tue, Oct 14, 2025 at 04:24:53PM +0300,

Re: [PATCH v2] libs/guest: don't use unsigned long as type for PFNs

2025-10-18 Thread Oleksii Kurochko
On 10/6/25 7:59 AM, Juergen Gross wrote: Declarations of xc_dom_console_init() and xc_dom_console_set_disconnected() in libxenguest.h don't match their implementation in the library. Under arm32, xen_pfn_t is a uint64_t and wider than unsigned long. Use xen_pfn_t for GFNs in the library to fix

[XEN PATCH v2 8/8] Update CHANGELOG and README with dependency on json-c

2025-10-18 Thread Anthony PERARD
From: Anthony PERARD Signed-off-by: Anthony PERARD Acked-by: Oleksii Kurochko --- CHANGELOG.md | 2 ++ README | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b9518ff08..5c70bc0250 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14

[PATCH v3 4/5] tools: Allow building xen-hptool without CONFIG_MIGRATE

2025-10-18 Thread Mykyta Poturai
With CPU hotplug sysctls implemented on Arm it becomes useful to have a tool for calling them. Introduce a new congifure option "hptool" to allow building hptool separately from other migration tools, and enable it by default. Signed-off-by: Mykyta Poturai v2->v3: * no changes v1->v2: * switch

Re: [PATCH v4 18/18] xen/riscv: introduce metadata table to store P2M type

2025-10-18 Thread Oleksii Kurochko
On 9/23/25 12:41 AM, Jan Beulich wrote: On 17.09.2025 23:55, Oleksii Kurochko wrote: +/* + * `pte` – PTE entry for which the type `t` will be stored. + * + * If `t` is `p2m_ext_storage`, both `ctx` and `p2m` must be provided; + * otherwise, they may be NULL. + */ +static void p2m_set_type(pte_

Re: [PATCH v1 3/9] parisc: Convert DMA map_page to map_phys interface

2025-10-18 Thread James Bottomley
On Fri, 2025-10-03 at 13:18 -0400, John David Anglin wrote: > On 2025-10-03 11:01 a.m., Jason Gunthorpe wrote: > > This doesn't actually use the virt at all: > > > > offset = ((unsigned long) addr) & ~IOVP_MASK; > > if((size % L1_CACHE_BYTES) || ((unsigned long)addr % > > L1_CACHE_BYTES))

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

2025-10-18 Thread Jan Beulich
On 23.09.2025 06:38, Penny Zheng wrote: > @@ -154,6 +156,17 @@ static int get_cpufreq_para(struct xen_sysctl_pm_op *op) > else > strlcpy(op->u.get_para.scaling_driver, "Unknown", CPUFREQ_NAME_LEN); > > +/* > + * In CPPC active mode, we are borrowing governor field to indicat

[PATCH v4 3/7] hw/core/register: Do not unparent in instance_finalize()

2025-10-18 Thread Akihiko Odaki
Children are automatically unparented so manually unparenting is unnecessary. Worse, automatic unparenting happens before the instance_finalize() callback of the parent gets called, so object_unparent() calls in the callback will refer to objects that are already unparented, which is semantically

Re: [PATCH for-4.21 01/10] x86/HPET: limit channel changes

2025-10-18 Thread Jan Beulich
On 17.10.2025 11:23, Roger Pau Monné wrote: > On Thu, Oct 16, 2025 at 09:31:21AM +0200, Jan Beulich wrote: >> Despite 1db7829e5657 ("x86/hpet: do local APIC EOI after interrupt >> processing") we can still observe nested invocations of >> hpet_interrupt_handler(). This is, afaict, a result of previ

[PATCH for-4.21 01/10] x86/HPET: limit channel changes

2025-10-18 Thread Jan Beulich
Despite 1db7829e5657 ("x86/hpet: do local APIC EOI after interrupt processing") we can still observe nested invocations of hpet_interrupt_handler(). This is, afaict, a result of previously used channels retaining their IRQ affinity until some other CPU re-uses them. Such nesting is increasingly pro

Re: [PATCH v5] x86: make Viridian support optional

2025-10-18 Thread Roger Pau Monné
On Tue, Sep 30, 2025 at 12:52:16PM +, Grygorii Strashko wrote: > From: Sergiy Kibrik > > Add config option VIRIDIAN that covers viridian code within HVM. > Calls to viridian functions guarded by is_viridian_domain() and related > macros. > Having this option may be beneficial by reducing cod

Re: [PATCH] xen/arm: XEN_DOMCTL_get_address_size hypercall support

2025-10-18 Thread Demi Marie Obenour
On 10/3/25 06:14, Julien Grall wrote: > Hi Demi, > > On 02/10/2025 19:27, Demi Marie Obenour wrote: >> On 10/2/25 06:10, Andrew Cooper wrote: >>> On 01/10/2025 9:01 pm, Milan Djokic wrote: Signed-off-by: Milan Djokic --- XEN_DOMCTL_get_address_size hypercall is not implemented

Re: [PATCH v3 02/18] system/memory: Better describe @plen argument of flatview_translate()

2025-10-18 Thread Philippe Mathieu-Daudé
On 30/9/25 11:18, Thomas Huth wrote: On 30/09/2025 10.31, Philippe Mathieu-Daudé wrote: Hi Thomas, On 30/9/25 10:24, Thomas Huth wrote: On 30/09/2025 10.21, Philippe Mathieu-Daudé wrote: flatview_translate()'s @plen argument is output-only and can be NULL. When Xen is enabled, only update @p

Re: [PATCH v3 07/22] x86/traps: Alter switch_stack_and_jump() for FRED mode

2025-10-18 Thread Jan Beulich
On 04.10.2025 00:53, Andrew Cooper wrote: > FRED and IDT differ by a Supervisor Token on the base of the shstk. This > means that switch_stack_and_jump() needs to discard one extra word when FRED > is active. > > Fix a typo in the parameter name, which should be shstk_base. > > Signed-off-by: An

[PATCH v3 11/21] x86/paravirt: Use common code for paravirt_steal_clock()

2025-10-18 Thread Juergen Gross
Remove the arch specific variant of paravirt_steal_clock() and use the common one instead. With all archs supporting Xen now having been switched to the common variant, including paravirt.h can be dropped from drivers/xen/time.c. Signed-off-by: Juergen Gross Acked-by: Peter Zijlstra (Intel) ---

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

2025-10-18 Thread Oleksii Kurochko
On 9/22/25 10:46 PM, Jan Beulich wrote: On 17.09.2025 23:55, Oleksii Kurochko wrote: --- a/xen/arch/riscv/p2m.c +++ b/xen/arch/riscv/p2m.c @@ -978,3 +978,189 @@ int map_regions_p2mt(struct domain *d, return rc; } + + Nit: No double blank lines please. +/* + * p2m_get_entry() shou

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

2025-10-18 Thread Jan Beulich
On 24.09.2025 08:39, Penny, Zheng wrote: > [Public] > > Hi, > >> -Original Message- >> From: Jan Beulich >> Sent: Sunday, September 14, 2025 10:04 PM >> To: Tamas K Lengyel ; Penny, Zheng >> >> Cc: Huang, Ray ; Andrew Cooper >> ; Roger Pau Monné ; >> Alexandru Isaila ; Petre Pircalabu >

[PATCH v3 01/21] x86/paravirt: Remove not needed includes of paravirt.h

2025-10-18 Thread Juergen Gross
In some places asm/paravirt.h is included without really being needed. Remove the related #include statements. Signed-off-by: Juergen Gross Acked-by: Peter Zijlstra (Intel) --- V3: - reinstate the include in mmu_context.h (kernel test robot) --- arch/x86/entry/entry_64.S | 1 - arc

[PATCH v3 08/13] arm64: mm: replace TIF_LAZY_MMU with in_lazy_mmu_mode()

2025-10-18 Thread Kevin Brodsky
The generic lazy_mmu layer now tracks whether a task is in lazy MMU mode. As a result we no longer need a TIF flag for that purpose - let's use the new in_lazy_mmu_mode() helper instead. Signed-off-by: Kevin Brodsky --- arch/arm64/include/asm/pgtable.h | 16 +++- arch/arm64/inclu

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

2025-10-18 Thread Julien Grall
Hi Ayan, On 22/09/2025 17:40, Ayan Kumar Halder wrote: On 15/09/2025 12:14, Julien Grall wrote: Hi Ayan, Hi Julien, On 12/09/2025 18:00, Ayan Kumar Halder wrote: Introduce CONFIG_GICV3_SELFTEST to enclose tests for GICv3 driver. Test that Xen is able to generate SGIs. Signed-off-by: Ayan

Re: [PATCH for-4.21] x86/HWP: adjust feature_hdc's section annotation

2025-10-18 Thread Jason Andryuk
On 2025-10-09 05:09, Jan Beulich wrote: On 09.10.2025 11:07, Andrew Cooper wrote: On 09/10/2025 9:50 am, Jan Beulich wrote: The variable can be cleared (set to false) by a non-init function's error path (hwp_init_msrs()). Fixes: 99c4570f8209 ("cpufreq: Add Hardware P-State (HWP) driver") Signe

[PATCH for-4.21??? 0/3] x86/vLAPIC: CMCI LVT handling

2025-10-18 Thread Jan Beulich
1: add indirection to LVT handling 2: drop VLAPIC_VERSION 3: properly support the CMCI LVT Now having this coded up, I realize it may be too intrusive at this point of the release cycle. Still I wanted to propose it ... Jan

Re: [ImageBuilder] uboot-script-gen: Add ability to configure static event channels

2025-10-18 Thread Stefano Stabellini
On Mon, 29 Sep 2025, Oleksandr Tyshchenko wrote: > Add DOMU_STATIC_EVTCHNS[number]="local_id local_port remote_id; ..." > configuration file string option specifying the static event channel > definitions for domain. > > The build script uses simple IDs to automatically and safely > generate the r

Re: [PATCH v1 0/4] Implement CPU hotplug on Arm

2025-10-18 Thread Julien Grall
Hi Grygorii, On 23/09/2025 17:09, Grygorii Strashko wrote: On 18.09.25 15:16, Mykyta Poturai wrote: This series implements support for CPU hotplug/unplug on Arm. To achieve this, several things need to be done: 1. XEN_SYSCTL_CPU_HOTPLUG_* calls implemented. 2. timer and GIC maintenance interr

Re: [PATCH v3 02/18] system/memory: Better describe @plen argument of flatview_translate()

2025-10-18 Thread Thomas Huth
On 30/09/2025 10.31, Philippe Mathieu-Daudé wrote: Hi Thomas, On 30/9/25 10:24, Thomas Huth wrote: On 30/09/2025 10.21, Philippe Mathieu-Daudé wrote: flatview_translate()'s @plen argument is output-only and can be NULL. When Xen is enabled, only update @plen_out when non-NULL. Signed-off-by:

[PATCH v3 10/22] x86/traps: Make an IDT-specific #PF helper

2025-10-18 Thread Andrew Cooper
FRED provides %cr2 in the the stack frame, avoiding the need to read %cr2 manually. Rename do_page_fault() to handle_PF(), and update it to take cr2, still named addr for consistency. Introduce a new handle_PF_IDT() which reads %cr2 and conditionally re-enables interrupts. No functional change.

[PATCH v3 04/18] target/i386/arch_memory_mapping: Use address_space_memory_is_io()

2025-10-18 Thread Philippe Mathieu-Daudé
Since all functions have an address space argument, it is trivial to replace cpu_physical_memory_is_io() by address_space_memory_is_io(). Signed-off-by: Philippe Mathieu-Daudé --- target/i386/arch_memory_mapping.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tar

[PATCH v2 00/17] system/physmem: Remove cpu_physical_memory _is_io() and _rw()

2025-10-18 Thread Philippe Mathieu-Daudé
Since v1: - Removed extra 'len' arg in address_space_is_io (rth) --- The cpu_physical_memory API is legacy (see commit b7ecba0f6f6): ``cpu_physical_memory_*`` ~ These are convenience functions which are identical to ``address_space_*`` but operate specifically on

[PATCH v3 24/28] xen/domctl: make CONFIG_X86_PSR depend on CONFIG_MGMT_HYPERCALLS

2025-10-18 Thread Penny Zheng
Users control/monitor Intel Platform Shared Resource (PSR) through related domctl-op or sysctl-op, so CONFIG_X86_PSR can be put under MGMT_HYPERCALLS. With this change, we could remove MGMT_HYPERCALLS-wrapping in psr.c. Signed-off-by: Penny Zheng Reviewed-by: Stefano Stabellini Acked-by: Jan Beu

Re: [PATCH v2] xen: Strip xen.efi by default

2025-10-18 Thread Jan Beulich
On 02.10.2025 16:10, Marek Marczykowski-Górecki wrote: > On Thu, Oct 02, 2025 at 02:05:56PM +0100, Andrew Cooper wrote: >> On 12/06/2025 11:07 am, Frediano Ziglio wrote: >>> For xen.gz file we strip all symbols and have an additional >>> xen-syms file version with all symbols. >>> Make xen.efi more

Re: [PATCH] x86/hap: Inline "flush_vcpu" in "flush_tlb"

2025-10-18 Thread Roger Pau Monné
On Mon, Sep 29, 2025 at 12:36:30PM +, Teddy Astie wrote: > flush_vcpu static function here is only used in one place which is just below > where it is defined. Inline the function to reduce the noise and clarify > what we are doing. Did you check that the compiler doesn't inline it already? I

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

2025-10-18 Thread Jason Andryuk
On 2025-10-15 08:59, Jan Beulich wrote: On 14.10.2025 09:37, Roger Pau Monné wrote: On Mon, Oct 13, 2025 at 05:11:06PM -0400, 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. Do you know h

[PATCH v3 13/13] mm: introduce arch_wants_lazy_mmu_mode()

2025-10-18 Thread Kevin Brodsky
powerpc decides at runtime whether the lazy MMU mode should be used. To avoid the overhead associated with managing task_struct::lazy_mmu_state if the mode isn't used, introduce arch_wants_lazy_mmu_mode() and bail out of lazy_mmu_mode_* if it returns false. Add a default definition returning true,

Re: [PATCH v1 9/9] dma-mapping: remove unused map_page callback

2025-10-18 Thread Jason Gunthorpe
On Sun, Sep 28, 2025 at 06:02:29PM +0300, Leon Romanovsky wrote: > From: Leon Romanovsky > > After conversion of arch code to use physical address mapping, > there are no users of .map_page() and .unmap_page() callbacks, > so let's remove them. > > Signed-off-by: Leon Romanovsky > --- > includ

Re: [PATCH for-4.21 4/6] tools/xl: check return value of printf_info_one_json() in list_domains_details()

2025-10-18 Thread Jason Andryuk
On 2025-10-15 09:40, Roger Pau Monne wrote: And return from the function early if printf_info_one_json() returns error. Reported by internal XenServer Coverity instance. Fixes: f6c6f2679d49 ("libxl: Convert libxl__object_to_json() to json-c") Signed-off-by: Roger Pau Monné Reviewed-by: Jason

[PATCH] x86/hap: Inline "flush_vcpu" in "flush_tlb"

2025-10-18 Thread Teddy Astie
flush_vcpu static function here is only used in one place which is just below where it is defined. Inline the function to reduce the noise and clarify what we are doing. No functional change. Signed-off-by: Teddy Astie --- xen/arch/x86/mm/hap/hap.c | 7 +-- 1 file changed, 1 insertion(+), 6

[PATCH v5 13/14] xen: swiotlb: Convert mapping routine to rely on physical address

2025-10-18 Thread Leon Romanovsky
From: Leon Romanovsky Switch to .map_phys callback instead of .map_page. Reviewed-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky --- drivers/xen/grant-dma-ops.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/xen/grant-dma-ops.c b/drivers/

[PATCH v3 20/28] xen/domctl: wrap arch-specific domain_set_time_offset() with CONFIG_MGMT_HYPERCALLS

2025-10-18 Thread Penny Zheng
Arch-specific domain_set_time_offset() is responisble for XEN_DOMCTL_settimeoffset domctl-op, and shall be wrapped with CONFIG_MGMT_HYPERCALLS. Otherwise it will become unreachable when MGMT_HYPERCALLS=n, and hence violating Misra rule 2.1. Signed-off-by: Penny Zheng Reviewed-by: Stefano Stabelli

[PATCH v2] tools: init-dom0less: Replace err() with more informative messages

2025-10-18 Thread Michal Orzel
Current use of err() has the following issues: - without setting errno, on error it results in printing e.g.: "init-dom0less: writing to xenstore: Success" This is very misleading and difficult to deduct that there was a failure. - does not propagate error codes to the caller. - skips "init_doma

[PATCH v3 03/18] system/memory: Factor address_space_is_io() out

2025-10-18 Thread Philippe Mathieu-Daudé
Factor address_space_is_io() out of cpu_physical_memory_is_io(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- include/system/memory.h | 9 + system/physmem.c| 21 - 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/include

Re: [PATCH for-4.21 03/10] x86/HPET: use single, global, low-priority vector for broadcast IRQ

2025-10-18 Thread Andrew Cooper
On 16/10/2025 8:32 am, Jan Beulich wrote: > Using dynamically allocated / maintained vectors has several downsides: > - possible nesting of IRQs due to the effects of IRQ migration, > - reduction of vectors available for devices, > - IRQs not moving as intended if there's shortage of vectors, > - h

Re: [PATCH for-4.21 01/10] x86/HPET: limit channel changes

2025-10-18 Thread Roger Pau Monné
On Thu, Oct 16, 2025 at 01:47:38PM +0200, Jan Beulich wrote: > On 16.10.2025 12:24, Roger Pau Monné wrote: > > On Thu, Oct 16, 2025 at 09:31:21AM +0200, Jan Beulich wrote: > >> Despite 1db7829e5657 ("x86/hpet: do local APIC EOI after interrupt > >> processing") we can still observe nested invocatio

Re: [PATCH v2 18/26] xen/domctl: wrap xsm_getdomaininfo() with CONFIG_MGMT_HYPERCALLS

2025-10-18 Thread Oleksii Kurochko
On 9/26/25 9:14 AM, Jan Beulich wrote: On 26.09.2025 08:57, Penny, Zheng wrote: -Original Message- From: Jan Beulich Sent: Friday, September 26, 2025 2:53 PM On 26.09.2025 06:41, Penny, Zheng wrote: -Original Message- From: Jan Beulich Sent: Thursday, September 25, 2025 10:29

Re: [PATCH v3 0/7] Do not unparent in instance_finalize()

2025-10-18 Thread Paolo Bonzini
Queued, thanks. Paolo

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

2025-10-18 Thread Roger Pau Monné
On Mon, Oct 13, 2025 at 05:11:06PM -0400, 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. Do you know how you end up with an entry with pin == -1 on the irq_pin_list? Are there systems wit

Re: [PATCH 3/3] efi: Limit Shim's Verify success to EFI_SUCCESS

2025-10-18 Thread Marek Marczykowski-Górecki
On Thu, Sep 11, 2025 at 10:35:51AM +0200, Jan Beulich wrote: > On 11.09.2025 10:24, Gerald Elder-Vass wrote: > > Commit 59a1d6d3ea1e replaced the Verify status check with > > !EFI_ERROR(...), this changed the behaviour to consider any warnings > > (EFI_WARN_) to be considered a successful verificat

RE: [PATCH v2 15/26] xen/domctl: wrap xsm_{irq_permission,iomem_permission} with CONFIG_MGMT_HYPERCALLS

2025-10-18 Thread Penny, Zheng
[Public] > -Original Message- > From: Jan Beulich > Sent: Thursday, September 11, 2025 7:02 PM > To: Penny, Zheng ; Daniel P. Smith > > Cc: Huang, Ray ; [email protected] > Subject: Re: [PATCH v2 15/26] xen/domctl: wrap > xsm_{irq_permission,iomem_permission} with CONFIG_MGM

RE: [PATCH v2 18/26] xen/domctl: wrap xsm_getdomaininfo() with CONFIG_MGMT_HYPERCALLS

2025-10-18 Thread Penny, Zheng
[Public] > -Original Message- > From: Jan Beulich > Sent: Friday, September 26, 2025 3:14 PM > To: Penny, Zheng > Cc: Huang, Ray ; Daniel P. Smith > ; [email protected]; Andryuk, Jason > ; Andrew Cooper ; > Julien Grall ; Stefano Stabellini ; > Anthony > PERARD ; Orzel, Mic

Re: [PATCH v2] xen/domain: introduce DOMID_ANY

2025-10-18 Thread dmukhin
On Tue, Sep 23, 2025 at 12:43:54AM +0200, Jan Beulich wrote: > On 22.09.2025 23:56, [email protected] wrote: > > On Mon, Sep 22, 2025 at 05:23:37PM +0200, Jan Beulich wrote: > >> On 20.09.2025 19:47, [email protected] wrote: > >>> From: Denis Mukhin > >>> > >>> Add a new symbol DOMID_ANY aliasing DOM

Re: [PATCH v4 13/18] xen/riscv: implement p2m_next_level()

2025-10-18 Thread Jan Beulich
On 17.09.2025 23:55, Oleksii Kurochko wrote: > Implement the p2m_next_level() function, which enables traversal and dynamic > allocation of intermediate levels (if necessary) in the RISC-V > p2m (physical-to-machine) page table hierarchy. > > To support this, the following helpers are introduced:

Re: [PATCH] xen/arm: XEN_DOMCTL_get_address_size hypercall support

2025-10-18 Thread Julien Grall
Hi Demi, On 03/10/2025 17:03, Demi Marie Obenour wrote: On 10/3/25 06:14, Julien Grall wrote: Hi Demi, On 02/10/2025 19:27, Demi Marie Obenour wrote: On 10/2/25 06:10, Andrew Cooper wrote: On 01/10/2025 9:01 pm, Milan Djokic wrote: Signed-off-by: Milan Djokic --- XEN_DOMCTL_get_address_si

[PATCH v1 0/9] Remove DMA .map_page and .unmap_page callbacks

2025-10-18 Thread Leon Romanovsky
Changelog: v1: * Fixed wrong offset in alpha conversion patch. v0: https://lore.kernel.org/all/[email protected] Hi, This series continues following two series: 1. "dma-mapping: migrate to physical address-based API" https://lore.kernel.org/all/cover.1757423202.git.leo...@nvid

[PATCH v3 21/28] xen/domctl: wrap xsm_set_target() with CONFIG_MGMT_HYPERCALLS

2025-10-18 Thread Penny Zheng
Function xsm_set_target() is only invoked under XEN_DOMCTL_set_target domctl-op, and shall be wrapped with CONFIG_MGMT_HYPERCALLS. Otherwise it will become unreachable codes when MGMT_HYPERCALLS=n, and hence violating Misra 2.1. Signed-off-by: Penny Zheng --- v1 -> v2: - adapt to changes of "unif

[PATCH 10/15] target/i386/nvmm: Inline cpu_physical_memory_rw() in nvmm_mem_callback

2025-10-18 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- target/i386/nvmm/nvmm-all.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/target/i386/nvmm/nvmm-all.c b/target/i386/nvmm/nvmm-all.c index ed424251673..2e442baf4b7 100644 --- a/target/i386/nvmm/nvmm-all.c +++ b/target/i386/nvmm/nv

[PATCH v3 07/21] arm/paravirt: Use common code for paravirt_steal_clock()

2025-10-18 Thread Juergen Gross
Remove the arch specific variant of paravirt_steal_clock() and use the common one instead. This allows to remove paravirt.c and paravirt.h from arch/arm. Until all archs supporting Xen have been switched to the common code of paravirt_steal_clock(), drivers/xen/time.c needs to include asm/paravir

[PATCH for-4.21 1/2] cirrus-ci: install libinotify for FreeBSD

2025-10-18 Thread Roger Pau Monne
FreeBSD QEMU build requires libinotify, otherwise the build fails with: ./qemu-xen-dir-remote/meson.build:2535:15: ERROR: C shared or static library 'inotify' not found Install the package and add the /usr/local include and libs paths explicitly as QEMU configure options. Signed-off-by: Roger P

[PATCH v2 12/17] target/i386/nvmm: Inline cpu_physical_memory_rw() in nvmm_mem_callback

2025-10-18 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- target/i386/nvmm/nvmm-all.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/target/i386/nvmm/nvmm-all.c b/target/i386/nvmm/nvmm-all.c index ed424251673..2e442baf4b7 100644 --- a/target/i386/nvmm/nvmm-all.c +++ b/target/i386/nvmm/nv

Re: [PATCH v5] x86: make Viridian support optional

2025-10-18 Thread Jan Beulich
On 30.09.2025 14:52, Grygorii Strashko wrote: > --- a/xen/arch/x86/hvm/Kconfig > +++ b/xen/arch/x86/hvm/Kconfig > @@ -62,6 +62,16 @@ config ALTP2M > > If unsure, stay with defaults. > > +config VIRIDIAN > + bool "Hyper-V enlightenments for guests" if EXPERT > + default y > +

Re: [PATCH for-4.21] x86/ucode: Fix missing printk() newline in ucode_probe_amd()

2025-10-18 Thread Oleksii Kurochko
On 10/17/25 1:26 AM, Andrew Cooper wrote: Fixes: 630e8875ab36 ("x86/ucode: Perform extra SHA2 checks on AMD Fam17h/19h microcode") Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné CC: Oleksii Kurochko For 4.21. This is a formatting fix with basically 0 risk. It is encoura

[PATCH v3 08/22] x86/traps: Skip Supervisor Shadow Stack tokens in FRED mode

2025-10-18 Thread Andrew Cooper
FRED doesn't use Supervisor Shadow Stack tokens. Skip setting them up. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- CC: Jan Beulich CC: Roger Pau Monné v3: * Move further still v2: * New --- xen/arch/x86/mm.c| 12 +--- xen/arch/x86/setup.c | 8 2 files

Re: [PATCH v4 11/18] xen/riscv: Implement p2m_free_subtree() and related helpers

2025-10-18 Thread Oleksii Kurochko
On 9/20/25 1:57 AM, Jan Beulich wrote: On 17.09.2025 23:55, Oleksii Kurochko wrote: @@ -342,11 +354,147 @@ static int p2m_next_level(struct p2m_domain *p2m, bool alloc_tbl, return P2M_TABLE_MAP_NONE; } +static void p2m_put_foreign_page(struct page_info *pg) +{ +/* + * It’s

[PATCH v5 11/14] sparc: Use physical address DMA mapping

2025-10-18 Thread Leon Romanovsky
From: Leon Romanovsky Convert sparc architecture DMA code to use .map_phys callback. Signed-off-by: Leon Romanovsky --- arch/sparc/kernel/iommu.c | 30 +--- arch/sparc/kernel/pci_sun4v.c | 31 ++--- arch/sparc/mm/io-unit.c | 38

[PATCH 08/15] target/i386/whpx: Replace legacy cpu_physical_memory_rw() call

2025-10-18 Thread Philippe Mathieu-Daudé
Get the vCPU address space and convert the legacy cpu_physical_memory_rw() by address_space_rw(). Signed-off-by: Philippe Mathieu-Daudé --- target/i386/whpx/whpx-all.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-a

  1   2   3   4   >