Re: [PATCH v6 5/6] arm/mpu: Introduce utility functions for the pr_t type

2025-05-27 Thread Orzel, Michal
On 23/05/2025 08:54, Luca Fancellu wrote: > Introduce a few utility functions to manipulate and handle the > pr_t type. > > Signed-off-by: Luca Fancellu Reviewed-by: Michal Orzel ~Michal

Re: [PATCH] x86/vmx: Fix VMEntry failure on ADL/SPR with shadow guests

2025-05-27 Thread Roger Pau Monné
On Fri, May 23, 2025 at 05:05:58PM +0100, Andrew Cooper wrote: > Paging Writeable depends on EPT, so must disabled in non-EPT guests like the > other EPT dependent features. Otherwise, VMEntry fails with bad control > state. > > Drop a piece of trailing whitepsace in context. > > Fixes: ff10aa9d

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

2025-05-27 Thread Mykola Kvach
From: Mykola Kvach This patch adds support for the PSCI SYSTEM_SUSPEND function in the vPSCI (virtual PSCI) interface, allowing guests to request suspend via the PSCI v1.0 SYSTEM_SUSPEND call (both 32-bit and 64-bit variants). The implementation: - Adds SYSTEM_SUSPEND function IDs to PSCI defini

[PATCH v4][PART 1 1/4] tools/xl: allow resume command compilation for arm

2025-05-27 Thread Mykola Kvach
From: Mykola Kvach The "xl resume" command was previously excluded from ARM builds because system suspend/resume (e.g., `SYSTEM_SUSPEND`) via vPSCI was not implemented. On x86, the command is used for ACPI S3 suspend/resume. This change enables compilation of `xl resume` on ARM regardless of the

Re: [PATCH v2 4/5] libxc/PM: Ensure pxstat buffers are correctly sized

2025-05-27 Thread Ross Lagerwall
On Mon, May 26, 2025 at 3:04 PM Anthony PERARD wrote: > > On Mon, May 12, 2025 at 03:46:55PM +0100, Ross Lagerwall wrote: > > diff --git a/tools/libs/ctrl/xc_pm.c b/tools/libs/ctrl/xc_pm.c > > index ff7b5ada053f..cffbd1b8a955 100644 > > --- a/tools/libs/ctrl/xc_pm.c > > +++ b/tools/libs/ctrl/xc_pm

[PATCH v4][PART 1 3/4] SUPPORT.md: Document ARM PSCI and vPSCI support

2025-05-27 Thread Mykola Kvach
From: Mykola Kvach Add a new entry under "Host hardware support" to document Xen's use of the PSCI interface to interact with EL3 firmware via SMC calls. Supported PSCI functions include CPU_ON, CPU_OFF, SYSTEM_RESET, and SYSTEM_OFF. SYSTEM_SUSPEND is not yet supported. Add a separate entry unde

[PATCH] x86/ACPI: move scheduler enable/disable calls out of freeze/thaw_domains

2025-05-27 Thread Mykola Kvach
From: Mykola Kvach The scheduler_disable and scheduler_enable calls have been removed from freeze_domains and thaw_domains, respectively, and relocated to their usage context in enter_state. This change addresses the concern about misleading function semantics, as the scheduler operations are not

[PATCH v4][PART 1 0/4] Enable guest suspend/resume support on ARM via vPSCI

2025-05-27 Thread Mykola Kvach
From: Mykola Kvach This patch series introduces the initial support for guest suspend and resume on ARM platforms using the PSCI SYSTEM_SUSPEND interface. The main goal is to allow ARM guests to request suspension using PSCI and be resumed by the control domain (e.g., via "xl resume"). ### Backg

Re: [PATCH] x86/hvmloader: fix order of PCI vs MTRR initialization

2025-05-27 Thread Andrew Cooper
On 27/05/2025 9:55 am, Roger Pau Monne wrote: > After some recent change the order of MTRR vs PCI initialization is > inverted. MTRR will get initialization ahead of PCI scanning and sizing of > MMIO regions. As a result when setting up MTRRs the MMIO window below 4GB > will always have the same

Re: [PATCH v3 08/14] xen/riscv: imsic_init() implementation

2025-05-27 Thread Oleksii Kurochko
On 5/26/25 8:44 PM, Oleksii Kurochko wrote: +if ( !dt_property_read_u32(node, "riscv,guest-index-bits", + &imsic_cfg.guest_index_bits) ) +imsic_cfg.guest_index_bits = 0; +tmp = BITS_PER_LONG - IMSIC_MMIO_PAGE_SHIFT; +if ( tmp < imsic_cfg.guest_in

Re: [PATCH] x86/pv: Fix breakpoint reporting

2025-05-27 Thread Roger Pau Monné
On Mon, May 26, 2025 at 09:53:02PM +0100, Andrew Cooper wrote: > x86_merge_dr6() is not a no-op when 0 is passed in; it will discard the > previously latched breakpoint bits. > > The combination of do_debug()'s manual call to x86_merge_dr6() for external > debuggers, and pv_inject_DB() calling pv_

[PATCH v4][PART 1 4/4] CHANGELOG: Mention Xen suspend/resume to RAM feature on arm64

2025-05-27 Thread Mykola Kvach
From: Mykola Kvach Signed-off-by: Mykola Kvach --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec452027f5..fc89ed6e09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ The format is based on [Keep a Changelog](https://keepacha

[PATCH v5 04/18] xen/cpufreq: introduce new sub-hypercall to propagate CPPC data

2025-05-27 Thread Penny Zheng
In order to provide backward compatibility with existing governors that represent performance as frequency, like ondemand, the _CPC table can optionally provide processor frequency range values, Lowest frequency and Nominal frequency, to let OS use Lowest Frequency/ Performance and Nominal Frequenc

Xen Security Advisory 468 v3 (CVE-2025-27462,CVE-2025-27463,CVE-2025-27464) - WinPVDrivers: Excessive permissions on user-exposed devices

2025-05-27 Thread Xen . org security team
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Xen Security Advisory CVE-2025-27462,CVE-2025-27463,CVE-2025-27464 / XSA-468 version 3 WinPVDrivers: Excessive permissions on user-exposed devices UPDATES IN VERSION 3 Public release.

[PATCH v4 3/4] tools: remove qemu-traditional

2025-05-27 Thread Juergen Gross
Remove qemu traditional from the tree. Signed-off-by: Juergen Gross Acked-by: Oleksii Kurochko # CHANGELOG.md Reviewed-by: Anthony PERARD --- V3: - remove another ioemu reference in INSTALL (Anthony Perard) - remove generating stubdompath.sh and related makefile helpers (Anthony Perard) ---

[PATCH v4 4/4] build: don't require full tools build for building stubdoms

2025-05-27 Thread Juergen Gross
With the drop of qemu-traditional "make stubdom" no longer requires "make tools" to have finished. It is enough to add "install-tools-public-headers" as a prereq of "install-stubdom". Signed-off-by: Juergen Gross Acked-by: Anthony PERARD --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 d

Re: [PATCH] x86/ACPI: move scheduler enable/disable calls out of freeze/thaw_domains

2025-05-27 Thread Andrew Cooper
On 27/05/2025 11:04 am, Mykola Kvach wrote: > From: Mykola Kvach > > The scheduler_disable and scheduler_enable calls have been removed > from freeze_domains and thaw_domains, respectively, and relocated > to their usage context in enter_state. This change addresses > the concern about misleading

Re: [PATCH v10 6/7] xen/arm: enable dom0 to use PCI devices with pci-passthrough=no

2025-05-27 Thread Mykyta Poturai
On 29.04.25 15:20, Jan Beulich wrote: > On 29.04.2025 13:52, Mykyta Poturai wrote: > I further notice that you didn't adjust the "reset" sub-op handling, despite > my earlier hint in that direction. Looking at the commit message, you only > mention PHYSDEVOP_pci_device_add anyway. I think all thre

[PATCH] device-tree: Move Arm's static-evtchn feature to common

2025-05-27 Thread Michal Orzel
There's nothing Arm specific about this feature. Move it to common as part of a larger activity to commonalize device tree related features. For now, select it only for ARM until others (e.g. RISC-V) verify it works for them too. Signed-off-by: Michal Orzel --- Other candidates: static memory, sh

[PATCH v5 10/18] xen/cpufreq: introduce a new amd cppc driver for cpufreq scaling

2025-05-27 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

[PATCH v5 15/18] xen/cpufreq: bypass governor-related para for amd-cppc-epp

2025-05-27 Thread Penny Zheng
HWP and amd-cppc-epp are both governor-less driver, so we introduce "hw_auto" flag to together bypass governor-related print in print_cpufreq_para(). In get/set_cpufreq_para(), we are adding "cpufreq_driver.setpolicy == NULL" check to exclude governor-related para for amd-cppc-epp driver. Signed-

[PATCH v5 12/18] xen/cpufreq: get performance policy from governor set via xenpm

2025-05-27 Thread Penny Zheng
Even if Xen governor is not used in amd-cppc active mode, we could somehow deduce which performance policy (CPUFREQ_POLICY_xxx) user wants to apply through which governor they choose, such as: If user chooses performance governor, they want maximum performance. If user chooses powersave governor, t

[PATCH v5 05/18] xen/cpufreq: refactor cmdline "cpufreq=xxx"

2025-05-27 Thread Penny Zheng
A helper function handle_cpufreq_cmdline() is introduced to tidy different handling pathes. We also add a new helper cpufreq_opts_contain() to ignore and warn user redundant setting, like "cpufreq=hwp;hwp;xen" Signed-off-by: Penny Zheng --- v2 -> v3: - new commit --- v3 -> v4: - add one single he

[PATCH v5 09/18] xen/amd: introduce amd_process_freq() to get processor frequency

2025-05-27 Thread Penny Zheng
When _CPC table could not provide processor frequency range values for Xen governor, we need to read processor max frequency as anchor point. So we extract amd cpu core frequency calculation logic from amd_log_freq(), and wrap it as a new helper amd_process_freq(). Signed-off-by: Penny Zheng ---

[PATCH v5 01/18] xen/pmstat: guard perf.states[] access with XEN_PX_INIT

2025-05-27 Thread Penny Zheng
Accessing to perf.states[] array shall not be only guarded with user-defined hypercall input, so we add XEN_PX_INIT check to gain safety. Signed-off-by: Penny Zheng --- v4 -> v5: - new commit --- xen/drivers/acpi/pmstat.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --

[PATCH v5 07/18] xen/cpufreq: disable px statistic info in amd-cppc mode

2025-05-27 Thread Penny Zheng
We want to bypass construction of px statistic info, while not bypassing cpufreq_statistic_lock initialization for a good reason, in cpufreq_statistic_init() for amd-cppc mode, as P-states is not necessary there. Signed-off-by: Penny Zheng Acked-by: Jan Beulich --- v3 -> v4: - remove unnecessary

[PATCH v5 03/18] xen/cpufreq: extract _PSD info from "struct xen_processor_performance"

2025-05-27 Thread Penny Zheng
_PSD info, consisted of "shared_type" and "struct xen_psd_package", will not only be provided from px-specific "struct xen_processor_performance", but also in CPPC data. In cpufreq_add/del_cpu(), a new helper get_psd_info() is introduced to extract common _PSD info from px-specific "struct xen_pro

[PATCH v5 08/18] xen/cpu: Expand core frequency calculation for AMD Family 1Ah CPUs

2025-05-27 Thread Penny Zheng
AMD Family 1Ah CPU needs a different COF(Core Operating Frequency) formula, due to a change in the PStateDef MSR layout in AMD Family 1Ah. In AMD Family 1Ah, Core current operating frequency in MHz is calculated as follows: CoreCOF = Core::X86::Msr::PStateDef[CpuFid[11:0]] * 5MHz We introduce

[PATCH v5 02/18] xen/cpufreq: move "init" flag into common structure

2025-05-27 Thread Penny Zheng
AMD cpufreq cores will be intialized in two modes, legacy P-state mode, and CPPC mode. So "init" flag shall be extracted from px-specific "struct xen_processor_perf", and placed in the common "struct processor_pminfo". Otherwise, later when introducing a new sub-hypercall to propagate CPPC data, we

[PATCH v5 18/18] xen/cpufreq: Adapt SET/GET_CPUFREQ_CPPC xen_sysctl_pm_op for amd-cppc driver

2025-05-27 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 use "processor_pminfo[cpuid]->init & XEN_CPPC_INIT" to identify cpufreq driver is amd-cppc/amd-cppc-epp. Furthermore, using wheth

[PATCH v5 11/18] xen/x86: implement EPP support for the amd-cppc driver in active mode

2025-05-27 Thread Penny Zheng
amd-cppc has 2 operation modes: autonomous (active) mode and non-autonomous (passive) mode. In active mode, we don't need Xen governor to calculate and tune the cpu frequency, while hardware built-in CPPC power algorithm will calculate the runtime workload and adjust cores frequency automatically a

[PATCH v5 14/18] xen/cpufreq: introduce GET_CPUFREQ_CPPC sub-cmd

2025-05-27 Thread Penny Zheng
In amd-cppc passive mode, it's Xen governor which is responsible for performance tuning, so governor and CPPC could co-exist. That is, both governor-info and CPPC-info could be printed together via xenpm tool. To achieve that, "struct xen_cppc_para" needs to be moved out of the union and also "str

[PATCH v5 16/18] tools: drop "has_num" condition check for cppc mode

2025-05-27 Thread Penny Zheng
In `xenpm get-cpufreq-para `, ->freq_num and ->cpu_num checking are tied together via variable "has_num", while ->freq_num only has non-zero value when cpufreq driver in legacy P-states mode. So we drop the "has_num" condition check, and mirror the ->gov_num check for both ->freq_num and ->cpu_num

[PATCH] x86/hvmloader: fix order of PCI vs MTRR initialization

2025-05-27 Thread Roger Pau Monne
After some recent change the order of MTRR vs PCI initialization is inverted. MTRR will get initialization ahead of PCI scanning and sizing of MMIO regions. As a result when setting up MTRRs the MMIO window below 4GB will always have the same size, and there will be no window above 4GB. This resu

[PATCH v5 17/18] tools: optimize cpufreq average freq print

2025-05-27 Thread Penny Zheng
Unlike Cx/Px states, for which we need an extra loop to summerize residency ( sum_cx[]/sum_px[]), we could call get_avgfreq_by_cpuid() right before printing. Also, with introduction of CPPC mode, average frequency print shall not depend on the existence of legacy P-states, so we remove "px_cap" dep

[PATCH v5 13/18] xen/cpufreq: normalize hwp driver check with hwp_active()

2025-05-27 Thread Penny Zheng
Instead of using hypercall passing parameter to identify hwp driver, we shall use hwp_active(). Also, we've already used hwp_active() in do_get_pm_info() in the same file to do hwp driver check, it's better syncing with same way. Signed-off-by: Penny Zheng --- v4 -> v5: - new commit --- xen/driv

[PATCH v5 06/18] xen/x86: introduce "cpufreq=amd-cppc" xen cmdline

2025-05-27 Thread Penny Zheng
Users need to set "cpufreq=amd-cppc" in xen cmdline to enable amd-cppc driver, which selects ACPI Collaborative Performance and Power Control (CPPC) on supported AMD hardware to provide a finer grained frequency control mechanism. `verbose` option can also be included to support verbose print. Whe

[PATCH v5 00/18] amd-cppc CPU Performance Scaling Driver

2025-05-27 Thread Penny Zheng
amd-cppc is the AMD CPU performance scaling driver that introduces a new CPU frequency control mechanism on modern AMD APU and CPU series in Xen. The new mechanism is based on Collaborative Processor Performance Control (CPPC) which provides finer grain frequency management than legacy ACPI hardwar

Re: [PATCH 3/3] CI: Adjust how domU is packaged in dom0

2025-05-27 Thread Marek Marczykowski-Górecki
On Thu, May 22, 2025 at 06:36:40PM +0100, Andrew Cooper wrote: > Package domU in /root for dom0 and insert into the uncompressed part of dom0's > rootfs, rather than recompressing it as part of the overlay. It doesn't really need moving to /root to achieve this, no? The domU-in-dom0.cpio can very

Re: [PATCH 2/3] CI: Use bash arrays to simplfy dom0 rootfs construction

2025-05-27 Thread Anthony PERARD
On Thu, May 22, 2025 at 06:36:39PM +0100, Andrew Cooper wrote: > For Qubes, this requires switching from sh to bash. > > This reduces the number of times the target filename needs to be written to 1. > > Expand the comment to explain the concatination constraints. Isn't the correct spelling "con

Re: [PATCH v3 09/14] xen/riscv: aplic_init() implementation

2025-05-27 Thread Oleksii Kurochko
On 5/22/25 5:26 PM, Jan Beulich wrote: On 21.05.2025 18:03, Oleksii Kurochko wrote: --- a/xen/arch/riscv/aplic.c +++ b/xen/arch/riscv/aplic.c @@ -9,19 +9,113 @@ * Copyright (c) 2024-2025 Vates */ +#include #include #include #include +#include #include #include +#includ

[PATCH v4 0/4] remove qemu-traditional

2025-05-27 Thread Juergen Gross
Remove the qemu-traditional support. This includes the Mini-OS based ioemu-stubdom. Don't remove ROMBIOS for now, as it can be used with qemu (XenServer is doing that). After adding the series a run of autoconf should be done. Changes in V2: - addressed comments Changes in V3: - patches 1 and 5

Re: [PATCH] x86/hvm: Drop unused vpic.h includes

2025-05-27 Thread Jason Andryuk
On 2025-05-27 11:03, Andrew Cooper wrote: It's only hvm.c, irq.c and vcpi.c which need this header, and they all s/vcpi/vpic/ get it via asm/hvm/irq.h. Signed-off-by: Andrew Cooper Reviewed-by: Jason Andryuk

[PATCH v1 3/3] tools/arm: Add the trap_unmapped_mmio xl config option

2025-05-27 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Signed-off-by: Edgar E. Iglesias --- docs/man/xl.cfg.5.pod.in | 6 ++ tools/golang/xenlight/helpers.gen.go | 3 ++- tools/golang/xenlight/types.gen.go | 1 + tools/libs/light/libxl_arm.c | 8 ++-- tools/libs/light/libxl_types.idl | 1 +

[PATCH v1 1/3] xen/arm: Add a way to disable traps on unmapped MMIO

2025-05-27 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Add a per-domain way to optionally disable traps on unmapped MMIO. Signed-off-by: Edgar E. Iglesias --- tools/libs/light/libxl_arm.c | 3 +++ xen/arch/arm/dom0less-build.c | 3 +++ xen/arch/arm/domain.c | 2 ++ xen/arch/arm/domain_build.c

[PATCH v1 0/3] xen/arm: Add option to optionally disable trapping on unmapped mmio

2025-05-27 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" This follows up on the virtio-pci discussion and adds a per-domain option to select the behaviour of accesses to unmapped mmio ranges. The new option is trap-unmapped-mmio. For dom0less I negated it to be able to use a boolean prop and keep existing behaviour, i.e trap-u

[PATCH v1 2/3] xen/arm: dom0less: Add trap-unmapped-mmio-disabled

2025-05-27 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Add the trap-unmapped-mmio-disabled per-domain fdt property. Signed-off-by: Edgar E. Iglesias --- docs/misc/arm/device-tree/booting.txt | 7 +++ xen/arch/arm/dom0less-build.c | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/misc/

Re: [PATCH v1 0/3] xen/arm: Add option to optionally disable trapping on unmapped mmio

2025-05-27 Thread Andrew Cooper
On 27/05/2025 8:56 pm, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > This follows up on the virtio-pci discussion and adds a per-domain > option to select the behaviour of accesses to unmapped mmio ranges. > The new option is trap-unmapped-mmio. For dom0less I negated it to > be able to

[PATCH] x86/setup: Trim includes

2025-05-27 Thread Andrew Cooper
None of these are used by setup.c today. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné --- xen/arch/x86/setup.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 1f5cb67bd0ee..4181df97754a 100644 --- a/xen/arch/x8

[PATCH] x86/traps: Trim includes

2025-05-27 Thread Andrew Cooper
None of these are used by traps.c today. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné I'm experimenting with include-what-you-use but it's not the most ergonomic of tools to use. xen.git/xen$ wc -l arch/x86/traps-{before,after}.i 29647 arch/x86/traps-before.i 25355

Re: [PATCH v4][PART 1 4/4] CHANGELOG: Mention Xen suspend/resume to RAM feature on arm64

2025-05-27 Thread Mykola Kvach
Hi, @Oleksii Kurochko On Tue, May 27, 2025 at 6:38 PM Oleksii Kurochko wrote: > > Hello Mykola, > > On 5/27/25 11:18 AM, Mykola Kvach wrote: > > From: Mykola Kvach > > Signed-off-by: Mykola Kvach > --- > CHANGELOG.md | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/CHANGELOG.md b/CHANG

Re: [PATCH] x86/ACPI: move scheduler enable/disable calls out of freeze/thaw_domains

2025-05-27 Thread Andrew Cooper
On 27/05/2025 5:17 pm, Mykola Kvach wrote: > Hi, @Andrew Cooper > > On Tue, May 27, 2025 at 3:53 PM Andrew Cooper > wrote: >> On 27/05/2025 11:04 am, Mykola Kvach wrote: >>> From: Mykola Kvach >>> >>> The scheduler_disable and scheduler_enable calls have been removed >>> from freeze_domains and

[PATCH] BCM2711 reboot fix

2025-05-27 Thread Evgeny Beysembaev
From 0057d145ddd90c01922636205484088c02a0e45a Mon Sep 17 00:00:00 2001 Message-ID: <0057d145ddd90c01922636205484088c02a0e45a.1748380800.git.megabo...@gmail.com> From: Evgeny Beysembaev Date: Tue, 27 May 2025 13:48:31 +0200 Subject: [PATCH] BCM2711 reboot fix According to the commit b334c1afad1

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

2025-05-27 Thread pr-tracker-bot
The pull request you sent on Mon, 26 May 2025 08:33:07 +0200: > git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git > for-linus-6.16-rc1-tag has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/5cf5240991bcea3c0f38e36e65e1742d6db7912c Thank you! -- Deet-doot-dot, I

[PATCH v4 2/4] tools: remove support for running a guest with qemu-traditional

2025-05-27 Thread Juergen Gross
Remove the code in tools for running a guest with qemu-traditional. This covers xl, libxl, libacpi, hvmloader and the related python and go bindings. Signed-off-by: Juergen Gross Acked-by: Jan Beulich # hvmloader Reviewed-by: Anthony PERARD --- V2: - Keep most of the removed comment in hvmloade

Re: [PATCH 2/3] CI: Use bash arrays to simplfy dom0 rootfs construction

2025-05-27 Thread Andrew Cooper
On 27/05/2025 4:19 pm, Marek Marczykowski-Górecki wrote: > On Tue, May 27, 2025 at 04:01:34PM +0200, Anthony PERARD wrote: >> On Thu, May 22, 2025 at 06:36:39PM +0100, Andrew Cooper wrote: >>> For Qubes, this requires switching from sh to bash. >>> >>> This reduces the number of times the target fi

[PATCH v3 5/5] libxc/PM: Retry get_pxstat if data is incomplete

2025-05-27 Thread Ross Lagerwall
If the total returned by Xen is more than the number of elements allocated, it means that the buffer was too small and so the data is incomplete. Retry to get all the data. Signed-off-by: Ross Lagerwall Reviewed-by: Anthony PERARD --- tools/misc/xenpm.c | 49 +---

[PATCH v3 4/5] libxc/PM: Ensure pxstat buffers are correctly sized

2025-05-27 Thread Ross Lagerwall
xc_pm_get_pxstat() requires the caller to allocate the pt and trans_pt buffers but then calls xc_pm_get_max_px() to determine how big they are (and hence how much Xen will copy into them). This is susceptible to races if xc_pm_get_max_px() changes so avoid the problem by requiring the caller to als

[PATCH v3 2/5] public/sysctl: Clarify usage of pm_{px,cx}_stat

2025-05-27 Thread Ross Lagerwall
Suggested-by: Jan Beulich Signed-off-by: Ross Lagerwall --- In v3: * Moved some changes to patch 1 * Clarified some comments xen/include/public/sysctl.h | 39 +++-- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/xen/include/public/sysctl.h b/xe

[PATCH v3 0/5] pmstat interface fixes

2025-05-27 Thread Ross Lagerwall
Clarify and fix usage of the pmstat hypervisor and tools interfaces regarding sizes of buffers passed in. Ross Lagerwall (5): x86/pmstat: Check size of PMSTAT_get_pxstat buffers public/sysctl: Clarify usage of pm_{px,cx}_stat cpufreq: Avoid potential buffer overrun and leak libxc/PM: Ensur

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

2025-05-27 Thread Ross Lagerwall
Check that the total number of states passed in and hence the size of buffers is sufficient to avoid writing more than the caller has allocated. The interface is not explicit about whether getpx.total is expected to be set by the caller in this case but since it is always set in libxenctrl it seem

Re: [PATCH 2/3] CI: Use bash arrays to simplfy dom0 rootfs construction

2025-05-27 Thread Stefano Stabellini
On Tue, 27 May 2025, Anthony PERARD wrote: > On Thu, May 22, 2025 at 06:36:39PM +0100, Andrew Cooper wrote: > > For Qubes, this requires switching from sh to bash. > > > > This reduces the number of times the target filename needs to be written to > > 1. > > > > Expand the comment to explain the

Re: [PATCH 1/3] CI/qubes: Deduplicate the handling of ${dom0_check}

2025-05-27 Thread Stefano Stabellini
On Tue, 27 May 2025, Anthony PERARD wrote: > On Thu, May 22, 2025 at 06:36:38PM +0100, Andrew Cooper wrote: > > Make it clear that ${dom0_check} is unconditional. > > > > No functional change. > > > > Signed-off-by: Andrew Cooper > > Reviewed-by: Anthony PERARD Reviewed-by: Stefano Stabellini

Re: [PATCH 3/3] CI: Drop custom handling of tools/tests

2025-05-27 Thread Andrew Cooper
On 28/05/2025 1:16 am, Stefano Stabellini wrote: > On Mon, 26 May 2025, Andrew Cooper wrote: >> On 26/05/2025 6:22 pm, Anthony PERARD wrote: >>> On Mon, May 26, 2025 at 05:45:29PM +0100, Andrew Cooper wrote: On 20/05/2025 9:52 pm, Andrew Cooper wrote: > diff --git a/automation/scripts/run-

Re: [PATCH 3/3] CI: Drop custom handling of tools/tests

2025-05-27 Thread Stefano Stabellini
On Mon, 26 May 2025, Andrew Cooper wrote: > On 26/05/2025 6:22 pm, Anthony PERARD wrote: > > On Mon, May 26, 2025 at 05:45:29PM +0100, Andrew Cooper wrote: > >> On 20/05/2025 9:52 pm, Andrew Cooper wrote: > >>> diff --git a/automation/scripts/run-tools-tests > >>> b/automation/scripts/run-tools-te

Re: [PATCH 3/3] CI: Adjust how domU is packaged in dom0

2025-05-27 Thread Andrew Cooper
On 28/05/2025 1:30 am, Stefano Stabellini wrote: > On Thu, 22 May 2025, Andrew Cooper wrote: >> diff --git a/automation/scripts/qubes-x86-64.sh >> b/automation/scripts/qubes-x86-64.sh >> index 1dd3f48b3d29..17a37134f46a 100755 >> --- a/automation/scripts/qubes-x86-64.sh >> +++ b/automation/scripts

Re: [PATCH 3/3] CI: Adjust how domU is packaged in dom0

2025-05-27 Thread Stefano Stabellini
On Wed, 28 May 2025, Andrew Cooper wrote: > On 28/05/2025 1:30 am, Stefano Stabellini wrote: > > On Thu, 22 May 2025, Andrew Cooper wrote: > >> diff --git a/automation/scripts/qubes-x86-64.sh > >> b/automation/scripts/qubes-x86-64.sh > >> index 1dd3f48b3d29..17a37134f46a 100755 > >> --- a/automati

Re: [PATCH 2/3] tools/tests: Install tests into $(LIBEXEC)/tests

2025-05-27 Thread Stefano Stabellini
On Mon, 26 May 2025, Anthony PERARD wrote: > On Tue, May 20, 2025 at 09:52:38PM +0100, Andrew Cooper wrote: > > $(LIBEXEC_BIN) is a dumping ground of many things. Separate the "clearly > > tests" from everything else so we can clean up how they're run in CI. > > > > Signed-off-by: Andrew Cooper

Re: [PATCH 1/3] tools/tests: Drop depriv-fd-checker

2025-05-27 Thread Stefano Stabellini
On Mon, 26 May 2025, Anthony PERARD wrote: > On Tue, May 20, 2025 at 09:52:37PM +0100, Andrew Cooper wrote: > > Unlike the other tests, this is not standalone. It requires poking at a > > live > > system, making it unweildly to use. > > > > It hasn't been touched in 7 years, despite changes in l

Re: [PATCH 3/3] CI: Adjust how domU is packaged in dom0

2025-05-27 Thread Stefano Stabellini
On Thu, 22 May 2025, Andrew Cooper wrote: > Package domU in /root for dom0 and insert into the uncompressed part of dom0's > rootfs, rather than recompressing it as part of the overlay. > > For Qubes, this avoids putting the domU kernel in dom0's rootfs for tests > which aren't going to boot a gue

[PATCH v3 3/5] cpufreq: Avoid potential buffer overrun and leak

2025-05-27 Thread Ross Lagerwall
If set_px_pminfo is called a second time with a larger state_count than the first call, calls to PMSTAT_get_pxstat will read beyond the end of the pt and trans_pt buffers allocated in cpufreq_statistic_init() since they would have been allocated with the original state_count. Secondly, the states

[PATCH] xen/x86: Remove is_periodic_irq() prototype

2025-05-27 Thread Jason Andryuk
is_periodic_irq() was removed in the Fixes commit, but the prototype remained. Drop it now. Fixes: ddc35d1cc994 ("[HVM] Enable more than one platform timer...") Signed-off-by: Jason Andryuk --- The full Fixes line is: Fixes: ddc35d1cc994 ("[HVM] Enable more than one platform timer (PIT/RTC/HPET)

[PATCH] x86/bitops: Optimise arch_ffs()/etc some more on AMD

2025-05-27 Thread Andrew Cooper
One aspect of the old ffs()/etc infrastructure was the use of TZCNT/LZCNT without a CPUID check. Given no obvious justification, I dropped it during the cleanup. It turns out there is a good reason, on all but the most recent AMD CPUs. Reinstate the use of "blind" TZCNT/LZCNT when safe to do so.

Re: [PATCH] xen/x86: Remove is_periodic_irq() prototype

2025-05-27 Thread Andrew Cooper
On 27/05/2025 11:37 pm, Jason Andryuk wrote: > is_periodic_irq() was removed in the Fixes commit, but the prototype > remained. Drop it now. > > Fixes: ddc35d1cc994 ("[HVM] Enable more than one platform timer...") > Signed-off-by: Jason Andryuk Acked-by: Andrew Cooper > --- > The full Fixes li

Re: [PATCH] xen/x86: Remove is_periodic_irq() prototype

2025-05-27 Thread Andrew Cooper
On 27/05/2025 11:54 pm, Jason Andryuk wrote: > On 2025-05-27 18:39, Andrew Cooper wrote: >> On 27/05/2025 11:37 pm, Jason Andryuk wrote: >>> is_periodic_irq() was removed in the Fixes commit, but the prototype >>> remained.  Drop it now. >>> >>> Fixes: ddc35d1cc994 ("[HVM] Enable more than one plat

Re: [PATCH] xen/x86: Remove is_periodic_irq() prototype

2025-05-27 Thread Jason Andryuk
On 2025-05-27 18:39, Andrew Cooper wrote: On 27/05/2025 11:37 pm, Jason Andryuk wrote: is_periodic_irq() was removed in the Fixes commit, but the prototype remained. Drop it now. Fixes: ddc35d1cc994 ("[HVM] Enable more than one platform timer...") Signed-off-by: Jason Andryuk Acked-by: Andr

Re: [PATCH] x86/hvmloader: fix order of PCI vs MTRR initialization

2025-05-27 Thread Anthoine Bourgeois
On Tue, May 27, 2025 at 10:55:04AM +0200, Roger Pau Monne wrote: After some recent change the order of MTRR vs PCI initialization is inverted. MTRR will get initialization ahead of PCI scanning and sizing of MMIO regions. As a result when setting up MTRRs the MMIO window below 4GB will always h

Re: [PATCH 1/3] CI/qubes: Deduplicate the handling of ${dom0_check}

2025-05-27 Thread Anthony PERARD
On Thu, May 22, 2025 at 06:36:38PM +0100, Andrew Cooper wrote: > Make it clear that ${dom0_check} is unconditional. > > No functional change. > > Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH v4][PART 1 4/4] CHANGELOG: Mention Xen suspend/resume to RAM feature on arm64

2025-05-27 Thread Oleksii Kurochko
Hello Mykola, On 5/27/25 11:18 AM, Mykola Kvach wrote: From: Mykola Kvach Signed-off-by: Mykola Kvach --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec452027f5..fc89ed6e09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ T

Re: [PATCH 2/3] CI: Use bash arrays to simplfy dom0 rootfs construction

2025-05-27 Thread Marek Marczykowski-Górecki
On Tue, May 27, 2025 at 04:01:34PM +0200, Anthony PERARD wrote: > On Thu, May 22, 2025 at 06:36:39PM +0100, Andrew Cooper wrote: > > For Qubes, this requires switching from sh to bash. > > > > This reduces the number of times the target filename needs to be written to > > 1. > > > > Expand the c

[PATCH] x86/hvm: Drop unused vpic.h includes

2025-05-27 Thread Andrew Cooper
It's only hvm.c, irq.c and vcpi.c which need this header, and they all get it via asm/hvm/irq.h. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné --- xen/arch/x86/hvm/io.c | 1 - xen/arch/x86/hvm/vioapic.c | 1 - xen/arch/x86/hvm/vmsi.c | 1 - xen/arch/x86/hvm/vm

Re: [PATCH 3/3] CI: Adjust how domU is packaged in dom0

2025-05-27 Thread Andrew Cooper
On 27/05/2025 2:55 pm, Marek Marczykowski-Górecki wrote: > On Thu, May 22, 2025 at 06:36:40PM +0100, Andrew Cooper wrote: >> Package domU in /root for dom0 and insert into the uncompressed part of >> dom0's >> rootfs, rather than recompressing it as part of the overlay. > It doesn't really need mo

Re: [PATCH] x86/ACPI: move scheduler enable/disable calls out of freeze/thaw_domains

2025-05-27 Thread Mykola Kvach
Hi, @Andrew Cooper On Tue, May 27, 2025 at 3:53 PM Andrew Cooper wrote: > > On 27/05/2025 11:04 am, Mykola Kvach wrote: > > From: Mykola Kvach > > > > The scheduler_disable and scheduler_enable calls have been removed > > from freeze_domains and thaw_domains, respectively, and relocated > > to t

[PATCH v4 1/4] docs: remove qemu-traditional support from documentation

2025-05-27 Thread Juergen Gross
In preparation to no longer support qemu-traditional (including qemu-stubdom), remove it from documentation. Signed-off-by: Juergen Gross Reviewed-by: Anthony PERARD --- V2: - mention "qemu_xen_traditional" in xenstore-paths.pandoc as a removed device model variant (Andrew Cooper) - don't drop