[PATCH v4 2/2] xen/arm: Restrict Kconfig configuration for LLC coloring

2025-03-06 Thread Luca Fancellu
Xen LLC coloring feature can be used only on the MMU subsystem, move the code that selects it from ARM_64 to MMU and add the ARM_64 dependency. Signed-off-by: Luca Fancellu Reviewed-by: Michal Orzel --- v4 changes: - clarified that it's the Xen feature LLC coloring that is not applicable to

Re: xen | Failed pipeline for staging | fe5757f2

2025-03-06 Thread Jan Beulich
On 06.03.2025 18:25, GitLab wrote: > > > Pipeline #1703410235 has failed! > > Project: xen ( https://gitlab.com/xen-project/hardware/xen ) > Branch: staging ( > https://gitlab.com/xen-project/hardware/xen/-/commits/staging ) > > Commit: fe5757f2 ( > https://gitlab.com/xen-project/hardware/xen

Re: [PATCH] xen: Don't cast away const-ness in vcpu_show_registers()

2025-03-06 Thread Jan Beulich
On 07.03.2025 00:17, Andrew Cooper wrote: > On 05/03/2025 7:53 am, Jan Beulich wrote: >> On 03.03.2025 17:52, Andrew Cooper wrote: >>> On 26/02/2025 7:33 am, Jan Beulich wrote: On 26.02.2025 00:02, Andrew Cooper wrote: > The final hunk is `(struct vcpu *)v` in disguise, expressed using a

Re: [PATCH v2 2/2] x86/vlapic: Drop vlapic->esr_lock

2025-03-06 Thread Andrew Cooper
On 05/03/2025 1:56 pm, Jan Beulich wrote: > On 03.03.2025 19:53, Andrew Cooper wrote: >> The exact behaviour of LVTERR interrupt generation is implementation >> specific. >> >> * Newer Intel CPUs generate an interrupt when pending_esr becomes >>nonzero. >> >> * Older Intel and all AMD CPUs ge

[PATCH] xen/events: fix global virq handling

2025-03-06 Thread Juergen Gross
VIRQs are split into "global" and "per vcpu" ones. Unfortunately in reality there are "per domain" ones, too. send_global_virq() and set_global_virq_handler() make only sense for the real "global" ones, so replace virq_is_global() with a new function get_virq_type() returning one of the 3 possible

Re: [PATCH] RISCV/bitops: Use Zbb to provide arch-optimised bitops

2025-03-06 Thread Jan Beulich
On 06.03.2025 21:19, Andrew Cooper wrote: > On 05/03/2025 7:34 am, Jan Beulich wrote: >> On 28.02.2025 17:24, Andrew Cooper wrote: >>> On 27/02/2025 8:11 am, Jan Beulich wrote: On 26.02.2025 18:20, Andrew Cooper wrote: > --- a/xen/arch/riscv/include/asm/bitops.h > +++ b/xen/arch/riscv/

Re: [PATCH v2 2/3] x86/msi: don't use cached address and data fields in msi_desc for dump_msi()

2025-03-06 Thread Roger Pau Monné
On Thu, Mar 06, 2025 at 05:45:27PM +0100, Jan Beulich wrote: > On 06.03.2025 15:57, Roger Pau Monne wrote: > > Instead compose a dummy MSI message just for the purpose of getting the > > delivery attributes, which are the same for all messages. Note that the > > previous usage of the cached MSI me

Re: [PATCH v5] xen/consoled: clean up console handling for PV shim

2025-03-06 Thread Jan Beulich
On 06.03.2025 08:59, dm...@proton.me wrote:> --- a/xen/include/xen/consoled.h > +++ b/xen/include/xen/consoled.h > @@ -1,12 +1,23 @@ > +/* SPDX-License-Identifier: GPL-2.0-only */ > #ifndef __XEN_CONSOLED_H__ > #define __XEN_CONSOLED_H__ > > #include > > +int consoled_guest_tx(char c); > +

Re: [PATCH 01/23] xen: introduce hardware domain create flag

2025-03-06 Thread Andrew Cooper
On 06/03/2025 10:03 pm, Jason Andryuk wrote: > From: "Daniel P. Smith" > > Add and use a new internal create domain flag to specify the hardware > domain. This removes the hardcoding of domid 0 as the hardware domain. > > This allows more flexibility with domain creation. > > Signed-off-by: Danie

[PATCH v2] docs: hardware runners setup

2025-03-06 Thread Stefano Stabellini
Document how to setup a new hardware runner Signed-off-by: Victor Lira Signed-off-by: Stefano Stabellini Reviewed-by: Marek Marczykowski-Górecki --- v2: add external references and more examples diff --git a/docs/misc/ci.rst b/docs/misc/ci.rst index 7aee55c5d2..8d9ebfb39d 100644 --- a/docs/mis

Re: [PATCH 05/23] xen/arm: Add capabilities to dom0less

2025-03-06 Thread Stefano Stabellini
On Thu, 6 Mar 2025, Jason Andryuk wrote: > Add capabilities property to dom0less to allow building a > disaggregated system. > > Introduce bootfdt.h to contain these constants. > > When using the hardware or xenstore capabilities, adjust the grant and > event channel limits similar to dom0. > >

Re: [PATCH 10/23] xen/arm: dom0less delay xenstore initialization

2025-03-06 Thread Stefano Stabellini
On Thu, 6 Mar 2025, Jason Andryuk wrote: > To allocate the xenstore event channel and initialize the grant table > entry, the xenstore domid is neeed. A dom0 is craeted before the domUs, > so it is normally available through hardware_domain. With capabilities > and dom0less, the xenstore domain m

Re: [PATCH v2 1/3] x86/apic: remove delivery and destination mode fields from drivers

2025-03-06 Thread Jan Beulich
On 06.03.2025 16:54, Roger Pau Monné wrote: > On Thu, Mar 06, 2025 at 04:33:37PM +0100, Jan Beulich wrote: >> On 06.03.2025 15:57, Roger Pau Monne wrote: >>> --- a/xen/arch/x86/genapic/bigsmp.c >>> +++ b/xen/arch/x86/genapic/bigsmp.c >>> @@ -46,8 +46,6 @@ static int __init cf_check probe_bigsmp(voi

Re: [PATCH 08/23] xen/arm: dom0less seed xenstore grant table entry

2025-03-06 Thread Stefano Stabellini
On Thu, 6 Mar 2025, Jason Andryuk wrote: > With a split hardware and control domain, the control domain may still > want and xenstore access. Currently this relies on init-dom0less to > seed the grants. This is problematic since we don't want hardware > domain to be able to map the control domain

Re: [PATCH 04/23] xen/arm: dom0less use domid 0 for hwdom

2025-03-06 Thread Stefano Stabellini
On Thu, 6 Mar 2025, Jason Andryuk wrote: > Assign domid 0 to the hwdom. Normally, dom0less does not use domid 0. > > This fixes using the Xen console which assumes domid 0 to use the > hypercall interface. > > Signed-off-by: Jason Andryuk I hope there is a check already in the code somewhere t

Re: [PATCH 02/23] xen/arm: Factor out construct_hwdom()

2025-03-06 Thread Stefano Stabellini
On Thu, 6 Mar 2025, Jason Andryuk wrote: > Factor out construct_hwdom() from construct_dom0(). This will be > re-used by the dom0less code when building a domain with the hardware > capability. > > iommu_hwdom_init(d) is moved into construct_hwdom() which moves it after > kernel_probe(). kernel_

Re: [PATCH v2 3/5] x86/IDT: Generate bsp_idt[] at build time

2025-03-06 Thread Andrew Cooper
On 05/03/2025 2:09 pm, Jan Beulich wrote: > On 05.03.2025 01:02, Andrew Cooper wrote: >> ... rather than dynamically at boot time. Aside from less runtime overhead, >> this approach is less fragile than the preexisting autogen stubs mechanism. >> >> We can manage this with some linker calculations

Re: [PATCH v2 2/5] x86/IDT: Make idt_tables[] be per_cpu(idt)

2025-03-06 Thread Andrew Cooper
On 05/03/2025 2:01 pm, Jan Beulich wrote: > On 05.03.2025 01:02, Andrew Cooper wrote: >> This can be a plain per_cpu() variable, and __read_mostly seeing as it's >> allocated once and never touched again. > cpu_smpboot_free() certainly touches (really: modifies) it again. Not really.  That's a dea

Re: [PATCH] docs: hardware runners setup

2025-03-06 Thread Marek Marczykowski-Górecki
On Thu, Mar 06, 2025 at 01:54:48PM -0800, Stefano Stabellini wrote: > Document how to setup a new hardware runner > > Signed-off-by: Victor Lira > Signed-off-by: Stefano Stabellini I have some minor minor hints about pointing at more examples, but regardless: Reviewed-by: Marek Marczykowski-Gór

Re: [PATCH v2 1/2] x86/vlapic: Fix handling of writes to APIC_ESR

2025-03-06 Thread Andrew Cooper
On 05/03/2025 1:49 pm, Jan Beulich wrote: > On 03.03.2025 19:53, Andrew Cooper wrote: >> Xen currently presents APIC_ESR to guests as a simple read/write register. >> >> This is incorrect. The SDM states: >> >> The ESR is a write/read register. Before attempt to read from the ESR, >> software

Re: [ImageBuilder] uboot-script-gen: handle reserved memory regions

2025-03-06 Thread Stefano Stabellini
On Thu, 6 Mar 2025, Stefano Stabellini wrote: > On Fri, 28 Feb 2025, Luca Miccio wrote: > > Currently, the uboot-script-gen does not account for reserved memory > > regions in the device tree. This oversight can lead to scenarios where > > one or more boot modules overlap with a reserved region. As

[PATCH] xen/pciback: Remove unused pcistub_get_pci_dev

2025-03-06 Thread linux
From: "Dr. David Alan Gilbert" pcistub_get_pci_dev() was added in 2009 as part of: commit 30edc14bf39a ("xen/pciback: xen pci backend driver.") Remove it. Signed-off-by: Dr. David Alan Gilbert --- drivers/xen/xen-pciback/pci_stub.c | 20 drivers/xen/xen-pciback/pciback.h

Re: [PATCH] docs: fix INTRODUCE description in xenstore.txt

2025-03-06 Thread Andrew Cooper
On 06/03/2025 7:09 am, Jürgen Groß wrote: > On 05.03.25 23:57, Andrew Cooper wrote: >> On 05/03/2025 8:52 am, Juergen Gross wrote: >>> The description of the Xenstore INTRODUCE command is still referencing >>> xend. Fix that. >>> >>> While at it, make clear that the Xenstore implementation is allow

Re: [PATCH] XSM: correct xsm_get_domain_state()

2025-03-06 Thread Daniel P. Smith
On 3/6/25 09:16, Jan Beulich wrote: Add the missing first parameter and move it next to a close relative. Fixes: 3ad3df1bd0aa ("xen: add new domctl get_domain_state") Signed-off-by: Jan Beulich Acked-by: Daniel P. Smith

Re: [PATCH v3] x86/vmx: Rewrite vmx_sync_pir_to_irr() to be more efficient

2025-03-06 Thread Andrew Cooper
On 05/03/2025 11:36 am, Jan Beulich wrote: > On 05.03.2025 00:22, Andrew Cooper wrote: >> There are two issues. First, pi_test_and_clear_on() pulls the cache-line to >> the CPU and dirties it even if there's nothing outstanding, but the final >> bitmap_for_each() is O(256) when O(8) would do, and

Re: [IMAGEBUILDER PATCH] Add domain capabilities

2025-03-06 Thread Stefano Stabellini
On Thu, 6 Mar 2025, Jason Andryuk wrote: > Add domain capabilities to creating disaggregated systems. > > Signed-off-by: Jason Andryuk Reviewed-by: Stefano Stabellini > --- > README.md| 16 ++ > scripts/uboot-script-gen | 47 +++

Re: [RFC] qxl: add additional vram regions to Xen physmap

2025-03-06 Thread Stefano Stabellini
+Xenia, Ray On Thu, 6 Mar 2025, Alessandro Muggianu wrote: > Hi all, > > Using QXL graphics on Windows 10 hvm domains causes the guest to become > extremely slow. The behaviour will happen as soon as Windows loads the > driver, so the VM will initially work normally while the OS is loading. > >

Re: [PATCH] xen: Don't cast away const-ness in vcpu_show_registers()

2025-03-06 Thread Andrew Cooper
On 05/03/2025 7:53 am, Jan Beulich wrote: > On 03.03.2025 17:52, Andrew Cooper wrote: >> On 26/02/2025 7:33 am, Jan Beulich wrote: >>> On 26.02.2025 00:02, Andrew Cooper wrote: The final hunk is `(struct vcpu *)v` in disguise, expressed using a runtime pointer chase through memory and a t

[PATCH 09/23] tools/init-dom0less: Only seed legacy xenstore grants

2025-03-06 Thread Jason Andryuk
The hardware domain is unable to seed a control domain, but we want the control domain to use xenstore. Rely on the hypervisor to seed dom0less grant table entries for Xenstore, so this seeding is unnecessary. However, that only works for the new xenstore late init. The legacy protocol which use

[PATCH 11/23] tools/xenstored: Automatically set dom0_domid and priv_domid

2025-03-06 Thread Jason Andryuk
With split hardware and control domains, each domain should be privileged with respect to xenstore. When adding domains to xenstore, look at their privilege and add them to xenstored as appropriate. dom0_domid is used for the hardware domain, and priv_domid is used for a control domain. Only one

Re: [XEN PATCH v2 2/3] xen/rt: address violation of MISRA C Rule 8.2

2025-03-06 Thread Jan Beulich
On 06.03.2025 00:24, Stefano Stabellini wrote: > On Wed, 5 Mar 2025, Jan Beulich wrote: >> On 25.02.2025 10:38, Nicola Vetrini wrote: >>> Rule 8.2 states: "Function types shall be in prototype form with >>> named parameters". >>> >>> The parameter name is missing from the function pointer type >>>

[PATCH v4 2/2] xen/mm: Introduce per-arch pte_attr_t type for PTE flags

2025-03-06 Thread Shawn Anastasio
Xen's memory management APIs map_pages_to_xen, modify_xen_mappings, set_fixmap, ioremap_attr, and __vmap all use an unsigned int to represent architecture-dependent page table entry flags. This assumption is not well-suited for PPC/radix where some flags go past 32-bits, so introduce the pte_attr_t

[PATCH 14/23] xsm/dummy: Allow XS_PRIV to call get_hvm_param

2025-03-06 Thread Jason Andryuk
This is useful for a combined hardware/xenstore domain that will run init-dom0less and xenstored. init-dom0less calls xc_hvm_param_get() to retrieve the xenstore event channel and pfn to configure xenstore for a guest. With a hypervisor-allocated event channel and page, the set_hvm_param is not n

[PATCH 15/23] xen/xsm: Add XSM_HW_PRIV

2025-03-06 Thread Jason Andryuk
Xen includes disctinct concepts of a control domain (privileged) and a hardware domain, but there is only a single XSM_PRIV check. For dom0 this is not an issue as they are one and the same. With hyperlaunch and its build capabiliies, a non-privileged hwdom and a privileged control domain should

[PATCH 20/23] xsm/silo: Support hwdom/control domains

2025-03-06 Thread Jason Andryuk
The is_control_domain() check is not sufficient for a split hardware/control domain. Add is_priv_domain() to support allowing for either control or hardware. Without this, a xenstore/hardware domain is unable to map a domU's grants. This silo check is for grants, events and argo. The dummy poli

[PATCH 17/23] xsm/dummy: Allow hwdom more - except targeting control

2025-03-06 Thread Jason Andryuk
Allow hwdom all perms, except XSM_PRIV, and except commands where the target is the control domain. This protects the control domain from hwdom while allowing the hardware domain to serve as the backend and device model for other domUs. Signed-off-by: Jason Andryuk --- xen/include/xsm/dummy.h |

[PATCH 21/23] automation/dom0less-arm64: Use double quotes

2025-03-06 Thread Jason Andryuk
Use double quotes so we can change the contents of the base imagebuilder config. Specifically, we'll want to remove the dom0 entries for a split hardware/control domain test. Signed-off-by: Jason Andryuk --- .../scripts/qemu-smoke-dom0less-arm64.sh | 34 +-- 1 file changed,

[PATCH 13/23] xsm/dummy: Allow XS_PRIV XEN_SYSCTL_getdomaininfolist

2025-03-06 Thread Jason Andryuk
To hyperlaunch xenstore, we want it to automatically introduce all domains it finds while initializing. To do that, change xsm_sysctl to allow XS_PRIV to call XEN_SYSCTL_getdomaininfolist. Xenstore can already call XEN_DOMCTL_getdomaininfo for the same information, but it requires knowing the dom

[PATCH 18/23] xsm/dummy: Allow hwdom SYSCTL_readconsole/physinfo

2025-03-06 Thread Jason Andryuk
Allow the hwdom to access the console, and to access physical information about the system. Signed-off-by: Jason Andryuk --- xen/include/xsm/dummy.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/include/xsm/dummy.h b/xen/include/xsm/dummy.h index 294777e904..f4656bd179 100644 --- a/

[PATCH 08/23] xen/arm: dom0less seed xenstore grant table entry

2025-03-06 Thread Jason Andryuk
With a split hardware and control domain, the control domain may still want and xenstore access. Currently this relies on init-dom0less to seed the grants. This is problematic since we don't want hardware domain to be able to map the control domain's resources. Instead have the hypervisor see th

[IMAGEBUILDER PATCH] Add domain capabilities

2025-03-06 Thread Jason Andryuk
Add domain capabilities to creating disaggregated systems. Signed-off-by: Jason Andryuk --- README.md| 16 ++ scripts/uboot-script-gen | 47 2 files changed, 63 insertions(+) diff --git a/README.md b/README.md index ae2fdfd..2

[PATCH 16/23] xsm/dummy: Allow hwdom xen_version

2025-03-06 Thread Jason Andryuk
Running xl queries XENVER_commandline and XENVER_build_id. The hardware domain should have access to the command line. The hardware domain is at least semi-trusted - just allow it access to all the xen_version info. Signed-off-by: Jason Andryuk --- xen/include/xsm/dummy.h | 2 ++ 1 file change

[PATCH 12/23] tools/xl: Print domain capabilities with verbose

2025-03-06 Thread Jason Andryuk
Capabilities are show like this (long lines trimmed): xl list --verbose Name Security Label Capabilities Domain-0 - hardware xenstore dom0less-1 - - dom0less-2 - privileged Signed-off-by: Jason Andryuk --- docs/man/

[PATCH 00/23] ARM split hardware and control domains

2025-03-06 Thread Jason Andryuk
This series implements separation of dom0 into separate hardware and control domains. It uses the capabilities idea from Hyperlaunch - hardware, control, and xenstore. It's been tested with dom0 as hardware & xenstore, dom1 as control, and dom2 as a domU. Running hardware and xenstore together e

[PATCH 03/23] xen/arm: dom0less hwdom construction

2025-03-06 Thread Jason Andryuk
When creating a hardware domain, have the dom0less code call construct_hwdom() which is shared with the dom0 code. The hardware domain requires building that best matches the dom0 build path. Re-use it to keep them in sync. The device tree node of the dom0less config is now passed into construct

[PATCH 05/23] xen/arm: Add capabilities to dom0less

2025-03-06 Thread Jason Andryuk
Add capabilities property to dom0less to allow building a disaggregated system. Introduce bootfdt.h to contain these constants. When using the hardware or xenstore capabilities, adjust the grant and event channel limits similar to dom0. Also for the hardware domain, set directmap and iommu. Thi

[PATCH 10/23] xen/arm: dom0less delay xenstore initialization

2025-03-06 Thread Jason Andryuk
To allocate the xenstore event channel and initialize the grant table entry, the xenstore domid is neeed. A dom0 is craeted before the domUs, so it is normally available through hardware_domain. With capabilities and dom0less, the xenstore domain may not be created first. Keep the population of

[PATCH 04/23] xen/arm: dom0less use domid 0 for hwdom

2025-03-06 Thread Jason Andryuk
Assign domid 0 to the hwdom. Normally, dom0less does not use domid 0. This fixes using the Xen console which assumes domid 0 to use the hypercall interface. Signed-off-by: Jason Andryuk --- xen/arch/arm/dom0less-build.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a

[PATCH 01/23] xen: introduce hardware domain create flag

2025-03-06 Thread Jason Andryuk
From: "Daniel P. Smith" Add and use a new internal create domain flag to specify the hardware domain. This removes the hardcoding of domid 0 as the hardware domain. This allows more flexibility with domain creation. Signed-off-by: Daniel P. Smith Signed-off-by: Jason Andryuk --- xen/arch/ar

[PATCH] docs: hardware runners setup

2025-03-06 Thread Stefano Stabellini
Document how to setup a new hardware runner Signed-off-by: Victor Lira Signed-off-by: Stefano Stabellini diff --git a/docs/misc/ci.rst b/docs/misc/ci.rst index 7aee55c5d2..ef3f183153 100644 --- a/docs/misc/ci.rst +++ b/docs/misc/ci.rst @@ -19,6 +19,49 @@ After getting access to relevant runners

Re: [PATCH v2 1/2] xen/domain: Annotate struct domain as page aligned

2025-03-06 Thread Andrew Cooper
On 05/03/2025 9:23 am, Jan Beulich wrote: > On 04.03.2025 00:29, Andrew Cooper wrote: >> struct domain is always a page aligned allocation. Update it's type to >> reflect this, so we can safely reuse the lower bits in the pointer for >> auxiliary information. >> >> No functional change. >> >> Sign

Re: [PATCH v8 0/9] remove libxenctrl usage from xenstored

2025-03-06 Thread Jürgen Groß
On 06.03.25 14:13, Jan Beulich wrote: On 06.03.2025 00:32, Stefano Stabellini wrote: On Wed, 5 Mar 2025, Juergen Gross wrote: On 25.02.25 12:10, Juergen Gross wrote: Ping? Especially ... On 04.02.25 12:33, Juergen Gross wrote: Xenstored is using libxenctrl for only one purpose: to get inform

Re: [PATCH v8 3/9] xen: add bitmap to indicate per-domain state changes

2025-03-06 Thread Jan Beulich
On 04.02.2025 12:34, Juergen Gross wrote: > @@ -1075,6 +1086,26 @@ static void clear_global_virq_handlers(struct domain > *d) > } > } > > +struct domain *lock_dom_exc_handler(void) > +{ > +struct domain *d; > + > +d = get_global_virq_handler(VIRQ_DOM_EXC); The Arm dom0less crash(e

Re: [PATCH v2 2/2] xen/watchdog: Identify which domain watchdog fired

2025-03-06 Thread Andrew Cooper
On 05/03/2025 9:27 am, Jan Beulich wrote: > On 04.03.2025 00:29, Andrew Cooper wrote: >> --- a/xen/common/sched/core.c >> +++ b/xen/common/sched/core.c >> @@ -1534,12 +1534,19 @@ long vcpu_yield(void) >> >> static void cf_check domain_watchdog_timeout(void *data) >> { >> -struct domain *d =

Re: [PATCH] RISCV/bitops: Use Zbb to provide arch-optimised bitops

2025-03-06 Thread Andrew Cooper
On 05/03/2025 7:34 am, Jan Beulich wrote: > On 28.02.2025 17:24, Andrew Cooper wrote: >> On 27/02/2025 8:11 am, Jan Beulich wrote: >>> On 26.02.2025 18:20, Andrew Cooper wrote: --- a/xen/arch/riscv/include/asm/bitops.h +++ b/xen/arch/riscv/include/asm/bitops.h @@ -125,6 +125,13 @@ st

[PATCH v2 3/3] x86/msi: prevent MSI entry re-writes of the same data

2025-03-06 Thread Roger Pau Monne
Attempt to reduce the MSI entry writes, and the associated checking whether memory decoding and MSI-X is enabled for the PCI device, when the MSI data hasn't changed. When using Interrupt Remapping the MSI entry will contain an index into the remapping table, and it's in such remapping table where

Re: [PATCH v16 4/5] xen/arm: translate virtual PCI bus topology for guests

2025-03-06 Thread Stewart Hildebrand
On 5/23/24 03:48, Roger Pau Monné wrote: > On Wed, May 22, 2024 at 06:59:23PM -0400, Stewart Hildebrand wrote: >> From: Oleksandr Andrushchenko >> >> There are three originators for the PCI configuration space access: >> 1. The domain that owns physical host bridge: MMIO handlers are >> there so

Re: [PATCH 4/7] xen/arm: add support for R-Car Gen4 PCI host controller

2025-03-06 Thread Stewart Hildebrand
On 2/24/25 04:18, Mykyta Poturai wrote: > From: Oleksandr Andrushchenko > > Add support for Renesas R-Car Gen4 PCI host controller. > S4 and V4H SoCs are supported. > Implement config read/write operations for both root and child buses. > For accessing the child bus, iATU is used for address tran

Re: [PATCH] docs: specify numerical values of Xenstore commands

2025-03-06 Thread Jürgen Groß
On 06.03.25 14:09, Jan Beulich wrote: On 06.03.2025 13:56, Jürgen Groß wrote: On 06.03.25 13:32, Jan Beulich wrote: On 06.03.2025 13:23, Juergen Gross wrote: --- a/docs/misc/xenstore.txt +++ b/docs/misc/xenstore.txt @@ -86,6 +86,65 @@ parts of xenstore inaccessible to some clients. In any cas

Re: [PATCH v2 2/3] x86/msi: don't use cached address and data fields in msi_desc for dump_msi()

2025-03-06 Thread Jan Beulich
On 06.03.2025 15:57, Roger Pau Monne wrote: > Instead compose a dummy MSI message just for the purpose of getting the > delivery attributes, which are the same for all messages. Note that the > previous usage of the cached MSI message wasn't fetching the hardware MSI > fields either. This feels n

Re: [PATCH] xen/events: fix get_global_virq_handler() usage without hardware domain

2025-03-06 Thread Juergen Gross
On 06.03.25 17:00, Jan Beulich wrote: On 06.03.2025 16:54, Juergen Gross wrote: --- a/xen/common/event_channel.c +++ b/xen/common/event_channel.c @@ -1036,7 +1036,9 @@ int set_global_virq_handler(struct domain *d, uint32_t virq) { old = global_virq_handlers[virq]; hdl

Re: [PATCH] xen/events: fix get_global_virq_handler() usage without hardware domain

2025-03-06 Thread Jan Beulich
On 06.03.2025 16:54, Juergen Gross wrote: > --- a/xen/common/event_channel.c > +++ b/xen/common/event_channel.c > @@ -1036,7 +1036,9 @@ int set_global_virq_handler(struct domain *d, uint32_t > virq) > { > old = global_virq_handlers[virq]; > hdl = get_global_virq_handler(virq

[PATCH v3 3/5] acpi/cppc: extract _cpc entry parsing logic

2025-03-06 Thread Penny Zheng
When running as Xen dom0 PVH guest, MADT table is customized and may have the "wrong" UID processor number, which is inconsistent with the UID in Processor entry in native DSDT. As a result, during ACPI boot-up for dom0, linux fails to set up proper processor logical id <-> physical id map(acpi_ma

Re: [PATCH v2 1/3] x86/apic: remove delivery and destination mode fields from drivers

2025-03-06 Thread Roger Pau Monné
On Thu, Mar 06, 2025 at 04:33:37PM +0100, Jan Beulich wrote: > On 06.03.2025 15:57, Roger Pau Monne wrote: > > --- a/xen/arch/x86/genapic/bigsmp.c > > +++ b/xen/arch/x86/genapic/bigsmp.c > > @@ -46,8 +46,6 @@ static int __init cf_check probe_bigsmp(void) > > > > const struct genapic __initconst_

[PATCH] xen/events: fix get_global_virq_handler() usage without hardware domain

2025-03-06 Thread Juergen Gross
Some use cases of get_global_virq_handler() didn't account for the case of running without hardware domain. Fix that by testing get_global_virq_handler() returning NULL where needed (e.g. when directly dereferencing the result). Fixes: 980822c5edd1 ("xen/events: allow setting of global virq handl

Re: [PATCH v8 3/9] xen: add bitmap to indicate per-domain state changes

2025-03-06 Thread Jürgen Groß
On 06.03.25 16:41, Jan Beulich wrote: On 04.02.2025 12:34, Juergen Gross wrote: @@ -1075,6 +1086,26 @@ static void clear_global_virq_handlers(struct domain *d) } } +struct domain *lock_dom_exc_handler(void) +{ +struct domain *d; + +d = get_global_virq_handler(VIRQ_DOM_EXC);

Re: [PATCH v2 1/3] x86/apic: remove delivery and destination mode fields from drivers

2025-03-06 Thread Jan Beulich
On 06.03.2025 15:57, Roger Pau Monne wrote: > --- a/xen/arch/x86/genapic/bigsmp.c > +++ b/xen/arch/x86/genapic/bigsmp.c > @@ -46,8 +46,6 @@ static int __init cf_check probe_bigsmp(void) > > const struct genapic __initconst_cf_clobber apic_bigsmp = { > APIC_INIT("bigsmp", probe_bigsmp), > -

A Heartfelt Goodbye to the Xen Project Community

2025-03-06 Thread Kelly Choi
Hi all, It is with a heavy heart that I share that my time as the Community Manager for the Xen Project has come to an end due to redundancy. While this was an unexpected change, I want to take this opportunity to express my gratitude and reflect on what an incredible journey it has been. Being p

Re: [PATCH v6] Avoid crash calling PrintErrMesg from efi_multiboot2

2025-03-06 Thread Frediano Ziglio
On Thu, Mar 6, 2025 at 2:26 PM Jan Beulich wrote: > > On 26.02.2025 19:54, Marek Marczykowski-Górecki wrote: > > On Mon, Feb 24, 2025 at 02:31:00PM +, Frediano Ziglio wrote: > >> On Mon, Feb 24, 2025 at 1:16 PM Marek Marczykowski-Górecki > >> wrote: > >>> > >>> On Mon, Feb 24, 2025 at 12:57:1

[PATCH] xen/xsm: fix xsm_get_domain_state() in xsm.h

2025-03-06 Thread Juergen Gross
xsm_get_domain_state() in xsm.h is lacking a xsm_default_t parameter. Add it. Fixes: 3ad3df1bd0aa ("xen: add new domctl get_domain_state") Signed-off-by: Juergen Gross --- xen/include/xsm/xsm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/include/xsm/xsm.h b/xen/inclu

[PATCH v2 2/3] x86/msi: don't use cached address and data fields in msi_desc for dump_msi()

2025-03-06 Thread Roger Pau Monne
Instead compose a dummy MSI message just for the purpose of getting the delivery attributes, which are the same for all messages. Note that the previous usage of the cached MSI message wasn't fetching the hardware MSI fields either. No functional change intended. Signed-off-by: Roger Pau Monné

Re: [PATCH] libxl: avoid infinite loop in libxl__remove_directory()

2025-03-06 Thread Jürgen Groß
On 06.03.25 12:25, Jan Beulich wrote: Infinitely retrying the rmdir() invocation makes little sense. While the original observation was the log filling the disk (due to repeated "Directory not empty" errors, in turn occurring for unclear reasons), the loop wants breaking even if there was no erro

[PATCH v2 0/3] x86/pci: reduce PCI accesses

2025-03-06 Thread Roger Pau Monne
Hello, First patch is not really related, but it's some cleanup I've found while looking at the other fixes. Patch 2 switched dump_msi() to not rely on the cached MSI message, and finally patch 3 changes the logic to prevent re-writing the same MSI message. Patches 1 and 2 are new in this versio

Re: [PATCH] xen/xsm: fix xsm_get_domain_state() in xsm.h

2025-03-06 Thread Daniel P. Smith
On 3/6/25 09:33, Juergen Gross wrote: xsm_get_domain_state() in xsm.h is lacking a xsm_default_t parameter. Add it. Fixes: 3ad3df1bd0aa ("xen: add new domctl get_domain_state") Signed-off-by: Juergen Gross Acked-by: Daniel P. Smith

Re: [PATCH] XSM: correct xsm_get_domain_state()

2025-03-06 Thread Andrew Cooper
On 06/03/2025 2:16 pm, Jan Beulich wrote: > Add the missing first parameter and move it next to a close relative. > > Fixes: 3ad3df1bd0aa ("xen: add new domctl get_domain_state") > Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper

[PATCH] XSM: correct xsm_get_domain_state()

2025-03-06 Thread Jan Beulich
Add the missing first parameter and move it next to a close relative. Fixes: 3ad3df1bd0aa ("xen: add new domctl get_domain_state") Signed-off-by: Jan Beulich --- a/xen/include/xsm/xsm.h +++ b/xen/include/xsm/xsm.h @@ -231,6 +231,11 @@ static inline int xsm_getdomaininfo(xsm_ return alternat

Re: [PATCH] x86/msi: prevent MSI entry re-writes of the same data

2025-03-06 Thread Jan Beulich
On 05.03.2025 18:57, Roger Pau Monné wrote: > On Wed, Mar 05, 2025 at 11:30:51AM +0100, Jan Beulich wrote: >> On 28.02.2025 12:32, Roger Pau Monne wrote: >>> @@ -1407,7 +1415,9 @@ int pci_restore_msi_state(struct pci_dev *pdev) >>> } >>> type = entry->msi_attrib.type; >>> >>> -

Re: [PATCH] config: update Mini-OS commit

2025-03-06 Thread Jan Beulich
On 06.03.2025 14:51, Juergen Gross wrote: > Update the Mini-OS upstream revision. > > Signed-off-by: Juergen Gross Acked-by: Jan Beulich

Re: [PATCH v8 0/9] remove libxenctrl usage from xenstored

2025-03-06 Thread Jürgen Groß
On 06.03.25 14:53, Jan Beulich wrote: On 06.03.2025 14:27, Jürgen Groß wrote: On 06.03.25 14:13, Jan Beulich wrote: On 06.03.2025 00:32, Stefano Stabellini wrote: On Wed, 5 Mar 2025, Juergen Gross wrote: On 25.02.25 12:10, Juergen Gross wrote: Ping? Especially ... On 04.02.25 12:33, Juergen

[PATCH] config: update Mini-OS commit

2025-03-06 Thread Juergen Gross
Update the Mini-OS upstream revision. Signed-off-by: Juergen Gross --- Config.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Config.mk b/Config.mk index 8b426a580f..8a73f3da62 100644 --- a/Config.mk +++ b/Config.mk @@ -232,7 +232,7 @@ QEMU_UPSTREAM_URL ?= https://xenbits

Re: [PATCH] docs: specify numerical values of Xenstore commands

2025-03-06 Thread Jan Beulich
On 06.03.2025 13:56, Jürgen Groß wrote: > On 06.03.25 13:32, Jan Beulich wrote: >> On 06.03.2025 13:23, Juergen Gross wrote: >>> --- a/docs/misc/xenstore.txt >>> +++ b/docs/misc/xenstore.txt >>> @@ -86,6 +86,65 @@ parts of xenstore inaccessible to some clients. In any >>> case passing >>> bulk

Re: [PATCH] docs: specify numerical values of Xenstore commands

2025-03-06 Thread Jan Beulich
On 06.03.2025 13:23, Juergen Gross wrote: > --- a/docs/misc/xenstore.txt > +++ b/docs/misc/xenstore.txt > @@ -86,6 +86,65 @@ parts of xenstore inaccessible to some clients. In any > case passing > bulk data through xenstore is not recommended as the performance > properties are poor. > > +---

[PATCH] docs: specify numerical values of Xenstore commands

2025-03-06 Thread Juergen Gross
In docs/misc/xenstore.txt all Xenstore commands are specified, but the specifications lack the numerical values of the commands. Add a table with all commands, their values, and a potential remark (e.g. whether the command is optional). Reported-by: Jan Beulich Signed-off-by: Juergen Gross ---

[PATCH] libxl: avoid infinite loop in libxl__remove_directory()

2025-03-06 Thread Jan Beulich
Infinitely retrying the rmdir() invocation makes little sense. While the original observation was the log filling the disk (due to repeated "Directory not empty" errors, in turn occurring for unclear reasons), the loop wants breaking even if there was no error message being logged (much like is don

[PATCH v3 1/5] xen/acpi: upload power and performance related data from a PVH dom0

2025-03-06 Thread Penny Zheng
From: Roger Pau Monne When running as a PVH dom0 the ACPI MADT is crafted by Xen in order to report the correct numbers of vCPUs that dom0 has, so the host MADT is not provided to dom0. This creates issues when parsing the power and performance related data from ACPI dynamic tables, as the ACPI

Re: [PATCH] xen/public: add missing Xenstore commands to xs_wire.h

2025-03-06 Thread Jan Beulich
On 06.03.2025 09:21, Juergen Gross wrote: > The GET_FEATURE, SET_FEATURE, GET_QUOTA and SET_QUOTA Xenstore commands > are defined in docs/misc/xenstore.txt, but they are missing in > xs_wire.h. > > Add the missing commands to xs_wire.h > > Signed-off-by: Juergen Gross > --- > xen/include/public

[RFC] qxl: add additional vram regions to Xen physmap

2025-03-06 Thread Alessandro Muggianu
Hi all, Using QXL graphics on Windows 10 hvm domains causes the guest to become extremely slow. The behaviour will happen as soon as Windows loads the driver, so the VM will initially work normally while the OS is loading. This was reproduced on the current master but to my knowledge it's always

Re: [PATCH v4 01/11] x86/HVM: improve CET-IBT pruning of ENDBR

2025-03-06 Thread Jan Beulich
On 05.03.2025 18:26, Roger Pau Monné wrote: > On Wed, Mar 05, 2025 at 05:23:05PM +0100, Jan Beulich wrote: >> On 05.03.2025 16:39, Roger Pau Monné wrote: >>> On Wed, Mar 05, 2025 at 04:02:51PM +0100, Jan Beulich wrote: On 05.03.2025 15:48, Roger Pau Monné wrote: > On Tue, Feb 25, 2025 at 1

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

2025-03-06 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. Signed-off-by: Penny Zheng --- v1 -> v2: - Give the variable des_perf an initializer of 0 - Use the strncmp()s directly in the if() --- xen/arch/x86/acpi/cpufreq/amd-cppc.c | 1

[PATCH v3 10/15] xen/cpufreq: only set gov NULL when cpufreq_driver.setpolicy is NULL

2025-03-06 Thread Penny Zheng
From: Penny Zheng amd-cppc on active mode bypasses the scaling governor layer, and provides its own P-state selection algorithms in hardware. Consequently, when it is used, the driver's -> setpolicy() callback is invoked to register per-CPU utilization update callbacks, not the ->target() callbac

[PATCH v3 12/15] xen/x86: implement EPP support for the amd-cppc driver in active mode

2025-03-06 Thread Penny Zheng
amd-cppc has 2 operation modes: autonomous (active) mode, non-autonomous (passive) mode. In active mode, platform ignores the requestd done in the Desired Performance Target register and takes into account only the values set to the minimum, maximum and energy performance preference(EPP) registers.

[PATCH v3 13/15] tools/xenpm: Print CPPC parameters for amd-cppc driver

2025-03-06 Thread Penny Zheng
From: Penny Zheng HWP, amd-cppc, amd-cppc-epp are all the implementation of ACPI CPPC (Collaborative Processor Performace Control), so we introduce cppc_mode flag to print CPPC-related para. And HWP and amd-cppc-epp are both governor-less driver, so we introduce hw_auto flag to bypass governor-r

Re: [PATCH v3 0/3] xen: Fix usage of devices behind a VMD bridge

2025-03-06 Thread Roger Pau Monné
Hello, I've attempted to ping Nirmal directly on the VMD patch, but got no reply so far. First version of this series was posted on 10/01, yet there hasn't been any feedback from Nirmal. Would it be possible to merge this without Nirmal Ack due to timeout? It's not even a new feature, just a bu

[PATCH v3 01/15] xen/cpufreq: introduces XEN_PM_PSD for solely delivery of _PSD

2025-03-06 Thread Penny Zheng
_PSD(P-State Dependency) provides performance control, no matter legacy P-state or CPPC, logical processor dependency information to OSPM. In order to re-use it for CPPC, this commit extracts the delivery of _PSD info from set_px_pminfo() and wrap it with a new sub-hypercall XEN_PM_PSD. Signed-of

[PATCH v3 00/15] amd-cppc CPU Performance Scaling Driver

2025-03-06 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

[PATCH v3 07/15] xen/cpufreq: fix core frequency calculation for AMD Family 1Ah CPUs

2025-03-06 Thread Penny Zheng
This commit fixes core frequency calculation for AMD Family 1Ah CPUs, 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 Signed-off-by: Penny

[PATCH v3 04/15] xen/cpufreq: move XEN_PROCESSOR_PM_xxx to internal header

2025-03-06 Thread Penny Zheng
XEN_PROCESSOR_PM_xxx are used to set xen_processor_pmbits only, which is a Xen-internal variable only. Although PV Dom0 passed these bits in si->flags, they haven't been used anywhere. So this commit moves XEN_PROCESSOR_PM_xxx back to internal header "acpi/cpufreq/processor_perf.h" Signed-off-by:

[PATCH v3 08/15] xen/amd: export processor max frequency value

2025-03-06 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. For AMD processors, we export max frequency value from amd_log_freq() Signed-off-by: Penny Zheng --- v1 -> v2: - new commit --- xen/amd: export processor

[PATCH v3 11/15] xen/cpufreq: abstract Energy Performance Preference value

2025-03-06 Thread Penny Zheng
Intel's hwp Energy Performance Preference value is compatible with CPPC's Energy Performance Preference value, so this commit abstracts the value and re-place it in common header file cpufreq.h, to be used not only for hwp in the future. Signed-off-by: Penny Zheng Acked-by: Jan Beulich --- xen/

[PATCH v3 06/15] xen/cpufreq: disable px statistic info in amd-cppc mode

2025-03-06 Thread Penny Zheng
Bypass cnstruction and deconstruction for px statistic info( cpufreq_statistic_init and cpufreq_statistic_exit) in cpufreq CPPC mode. Signed-off-by: Penny Zheng --- v2 -> v3: - new commit --- xen/drivers/cpufreq/utility.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/xen/drivers/cpu

  1   2   >