RE: [PATCH v6 10/19] xen/cpufreq: introduce new sub-hypercall to propagate CPPC data

2025-08-03 Thread Penny, Zheng
[Public] > -Original Message- > From: Jan Beulich > Sent: Wednesday, July 16, 2025 11:39 PM > To: Penny, Zheng > Cc: Huang, Ray ; Andrew Cooper > ; Roger Pau Monné ; > Anthony PERARD ; Orzel, Michal > ; Julien Grall ; Stefano Stabellini > ; xen-devel@lists.xenproject.org > Subject: Re: [

RE: [PATCH v6 05/19] xen/cpufreq: refactor cmdline "cpufreq=xxx"

2025-08-03 Thread Penny, Zheng
[Public] > -Original Message- > From: Jan Beulich > Sent: Wednesday, July 16, 2025 11:01 PM > To: Penny, Zheng > Cc: Huang, Ray ; xen-devel@lists.xenproject.org > Subject: Re: [PATCH v6 05/19] xen/cpufreq: refactor cmdline "cpufreq=xxx" > > On 11.07.2025 05:50, Penny Zheng wrote: > > ---

RE: [PATCH v6 05/19] xen/cpufreq: refactor cmdline "cpufreq=xxx"

2025-08-03 Thread Penny, Zheng
[Public] > -Original Message- > From: Jan Beulich > Sent: Wednesday, July 16, 2025 11:01 PM > To: Penny, Zheng > Cc: Huang, Ray ; xen-devel@lists.xenproject.org > Subject: Re: [PATCH v6 05/19] xen/cpufreq: refactor cmdline "cpufreq=xxx" > > On 11.07.2025 05:50, Penny Zheng wrote: > > ---

Re: [PATCH] BCM2711 reboot fix

2025-08-03 Thread Evgeny Beysembaev
According to the commit b334c1afad17 ("ARM: dts: bcm2711: Use proper compatible in PM/Watchdog node") in Linux kernel, the `compatible` string for the watchdog peripheral in the DTS has been modified from `brcm,bcm2835-pm` to `brcm,bcm2711-pm`, which caused `rpi4_map_watchdog()` function to fail

Re: [RESEND PATCH v3 1/1] kern/xen: Add Xen command line parsing

2025-08-03 Thread Aaron Rainbolt
On Fri, 1 Aug 2025 14:55:36 +0200 Daniel Kiper wrote: > On Fri, Jul 25, 2025 at 03:31:12PM -0500, Aaron Rainbolt wrote: > > Xen traditionally allows customizing guest behavior by passing > > arguments to the VM kernel via the kernel command line. This is no > > longer possible when using GRUB wit

Re: Fork or replace dependency yajl?

2025-08-03 Thread Andrew Cooper
On 03/08/2025 9:52 am, Christoph Grüninger wrote: > Dear Xen developers, > > you are using the dependency yajl (yet another json library, [1]) to > parse JSON files. The project seems abandoned with the last commit 10 > years ago, the last release over 11 years ago, and 75 open pull > requests. Pac

Re: [PATCH v2] xen: rework error handling in vcpu_create

2025-08-03 Thread Andrew Cooper
On 01/08/2025 9:24 pm, Stewart Hildebrand wrote: > In vcpu_create after scheduler data is allocated, if > vmtrace_alloc_buffer fails, it will jump to the wrong cleanup label > resulting in a memory leak. > > Move sched_destroy_vcpu and destroy_waitqueue_vcpu to vcpu_teardown. > Make vcpu_teardown i

RE: [PATCH v1] xen/x86: move domctl.o out of PV_SHIM_EXCLUSIVE

2025-08-03 Thread Penny, Zheng
[Public] > -Original Message- > From: Jan Beulich > Sent: Tuesday, July 29, 2025 6:45 PM > To: Penny, Zheng > Cc: Andrew Cooper ; Roger Pau Monné > ; Anthony PERARD ; Orzel, > Michal ; Julien Grall ; Stefano > Stabellini ; xen-devel@lists.xenproject.org; > Stabellini, > Stefano > Subje

[PATCH v1 14/25] xen/domctl: wrap around XEN_DOMCTL_{irq_permission,iomem_permission}

2025-08-03 Thread Penny Zheng
The following functions are invoked only under XEN_DOMCTL_{irq_permission,iomem_permission} domctl-op, and shall be wrapped: - xsm_irq_permission - xsm_iomem_permission Signed-off-by: Penny Zheng --- xen/include/xsm/dummy.h | 2 ++ xen/include/xsm/xsm.h | 4 xen/xsm/dummy.c | 2 ++

[PATCH v1 22/25] xen/domctl: wrap around XEN_DOMCTL_{get,set}_paging_mempool_size

2025-08-03 Thread Penny Zheng
Arch-specific arch_{get,set}_paging_mempool_size() is responsible for XEN_DOMCTL_{get,set}_paging_mempool_size domctl-op, and shall be wrapped. Signed-off-by: Penny Zheng --- xen/arch/arm/mmu/p2m.c | 4 xen/arch/x86/mm/paging.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/xen/ar

[PATCH v1 12/25] xen/domctl: wrap around XEN_DOMCTL_scheduler_op

2025-08-03 Thread Penny Zheng
Function sched_adjust() is responsible for XEN_DOMCTL_scheduler_op domctl-op. Tracing its calling chain, the following functions shall be wrapped too: - xsm_domctl_scheduler_op() - sched_adjust_dom() - scheduler-specific .adjust() callback Signed-off-by: Penny Zheng --- xen/common/sched/arinc653

[PATCH v1 20/25] xen/domctl: wrap around XEN_DOMCTL_set_virq_handler

2025-08-03 Thread Penny Zheng
Function set_global_virq_handler() is reponsible for XEN_DOMCTL_set_virq_handler domctl-op, and shall be wrapped. Signed-off-by: Penny Zheng --- xen/common/event_channel.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c index 67700b05

[PATCH v1 25/25] xen/domctl: wrap around domctl hypercall

2025-08-03 Thread Penny Zheng
Wrap domctl hypercall def and domctl.o with CONFIG_DOMCTL We need to make DOMCTL with prompt back, add help info and set default value as y. We shall at least provide "# CONFIG_DOMCTL is not set" in preset configs for PV shim on x86. Signed-off-by: Penny Zheng --- xen/arch/x86/configs/pvshim_def

[PATCH v1 13/25] xen/domctl: wrap around XEN_DOMCTL_getvcpucontext

2025-08-03 Thread Penny Zheng
Arch-specific function arch_get_info_guest() is responsible for XEN_DOMCTL_getvcpucontext domctl-op, and shall be wrapped Signed-off-by: Penny Zheng --- xen/arch/arm/domctl.c | 2 ++ xen/arch/x86/domctl.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/xen/arch/arm/domctl.c b/xen/arch/arm

[PATCH v1 06/25] xen/domctl: provide stub for domctl_lock_{acquire,release}

2025-08-03 Thread Penny Zheng
With DOMCTL=n, we need to provide stub for domctl_lock_{acquire,release}(), as it may be invoked by hvm_set_param() in x86 PV shim mode. Although PV_SHIM_EXCLUSIVE and HVM shall not be both enabled, randconfig stands little chance to make it happen. Signed-off-by: Penny Zheng --- xen/include/xen

[PATCH v1 23/25] xen/x86: make CONFIG_X86_PSR depend on SYSCTL || DOMCTL

2025-08-03 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 SYSCTL or DOMCTL. with this change, we could remove SYSCTL-wrapping in psr.c Signed-off-by: Penny Zheng --- xen/arch/x86/Kconfig | 1 + xen/arch/x86/psr.c | 18

[PATCH v1 09/25] xen/domctl: wrap around XEN_DOMCTL_destroydomain

2025-08-03 Thread Penny Zheng
Function domain_kill() is responsible for killing domain and relinquish domain-held resources. Tracking its calling chain, the following functions shall also be wrapped: - domain_relinquish_resource - pci_release_device - relinquish_shared_pages - paging_teardown - p2m_pod_empty_cache -

[PATCH v1 21/25] xen/domctl: wrap aound iommu-related domctl op

2025-08-03 Thread Penny Zheng
Function iommu_do_domctl() is the main entry for all iommu-related domctl-op. Tracking its calling chaining, the following functions shall all be wrapped: - iommu_do_pci_domctl - xsm_get_device_group - iommu_get_device_group - amd_iommu_group_id/intel_iommu_group_id - xsm_assign_device

[PATCH v1 10/25] xen/domctl: wrap around XEN_DOMCTL_setnodeaffinity

2025-08-03 Thread Penny Zheng
Function domain_set_node_affinity() is responsible for XEN_DOMCTL_setnodeaffinity domctl-op, and shall be wrapped with CONFIG_DOMCTL Signed-off-by: Penny Zheng --- xen/common/domain.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/common/domain.c b/xen/common/domain.c index be722c9f09

[PATCH v1 17/25] xen: add stub for XEN_DOMCTL_getdomaininfo

2025-08-03 Thread Penny Zheng
Function getdomaininfo() is designed for XEN_DOMCTL_getdomaininfo domctl-op to get per-domain info in userspace, so it shall be guarded with CONFIG_DOMCTL. We need to provide stub for getdomaininfo(), as it still could be invoked by XEN_SYSCTL_getdomaininfolist sysctl-op when CONFIG_DOMCTL=n. The s

[PATCH v1 24/25] xen/domctl: wrap around arch-specific domctl op

2025-08-03 Thread Penny Zheng
Function arch_do_domctl() is responsible for arch-specific domctl-op, and the following functions shall be wrapped: - xsm_domctl For x86: - hvm_save_one - hvm_acpi_power_button - hvm_acpi_sleep_button - xsm_{bind,unbind}_pt_irq - xsm_ioport_permission - xsm_ioport_mapping - hvm_debug_op - mem_shari

[PATCH v1 19/25] xen: make CONFIG_VM_EVENT depend on DOMCTL

2025-08-03 Thread Penny Zheng
VM event could only be enabled/disabled via vm_event domctl-op, so CONFIG_VM_EVENT shall depend on CONFIG_DOMCTL Signed-off-by: Penny Zheng --- xen/common/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/common/Kconfig b/xen/common/Kconfig index bf1850c154..24a7b83

[PATCH v1 16/25] xen/domctl: wrap around XEN_DOMCTL_set_target

2025-08-03 Thread Penny Zheng
Function xsm_set_target() is only invoked under XEN_DOMCTL_set_target domctl-op, and shall be wrapped. Signed-off-by: Penny Zheng --- xen/include/xsm/xsm.h | 4 xen/xsm/dummy.c | 2 ++ xen/xsm/flask/hooks.c | 4 3 files changed, 10 insertions(+) diff --git a/xen/include/xsm/xsm.

[PATCH v1 18/25] xen/domctl: wrap around XEN_DOMCTL_set_access_required

2025-08-03 Thread Penny Zheng
Arch-specific arch_p2m_set_access_required() is reponsible for XEN_DOMCTL_set_access_required domctl-op, and shall be wrapped. Signed-off-by: Penny Zheng --- xen/arch/arm/mem_access.c| 2 ++ xen/arch/x86/mm/mem_access.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/xen/arch/arm/mem_

[PATCH v1 15/25] xen/domctl: wrap around XEN_DOMCTL_settimeoffset

2025-08-03 Thread Penny Zheng
Arch-specific domain_set_time_offset() is responisble for XEN_DOMCTL_settimeoffset domctl-op, and shall be wrapped. Signed-off-by: Penny Zheng --- xen/arch/arm/time.c | 2 ++ xen/arch/x86/time.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/xen/arch/arm/time.c b/xen/arch/arm/time.c inde

[PATCH v1 11/25] xen/domctl: wrap around XEN_DOMCTL_{getvcpuaffinity,setvcpuaffinity}

2025-08-03 Thread Penny Zheng
Function vcpu_affinity_domctl() is responsible for XEN_DOMCTL_{getvcpuaffinity,setvcpuaffinity} domctl-op, tracking its calling chain, the following function shall be wrapped too: - vcpu_set_soft_affinity Signed-off-by: Penny Zheng --- xen/common/sched/core.c | 4 1 file changed, 4 insertio

[PATCH v1 04/25] xen: consolidate CONFIG_VM_EVENT

2025-08-03 Thread Penny Zheng
File hvm/vm_event.c and x86/vm_event.c are the extend to vm_event handling routines, and its compilation shall be guarded by CONFIG_VM_EVENT too. Futhermore, features about monitor_op and memory access are both based on vm event subsystem, so monitor.o/mem_access.o shall be wrapped under CONFIG_VM_

[PATCH v1 07/25] xen/domctl: wrap around XEN_DOMCTL_pausedomain

2025-08-03 Thread Penny Zheng
Function domain_pause_by_systemcontroller() is responsible for XEN_DOMCTL_pausedomain domctl-op, and shall be wrapped around with CONFIG_DOMCTL Signed-off-by: Penny Zheng --- xen/common/domain.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/common/domain.c b/xen/common/domain.c index

[PATCH v1 00/25] Introduce CONFIG_DOMCTL

2025-08-03 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. Each hypercall has a separate option to keep configuration flexible. Options to disable hypercalls: - sysctl - domctl - h

[PATCH v1 01/25] xen/x86: move domctl.o out of PV_SHIM_EXCLUSIVE

2025-08-03 Thread Penny Zheng
In order to fix CI error of a randconfig picking both PV_SHIM_EXCLUSIVE=y and HVM=y results in hvm.c being built, but domctl.c not being built, which leaves a few functions, like domctl_lock_acquire/release() undefined, causing linking to fail. To fix that, we intend to move domctl.o out of the PV_

[PATCH v1 08/25] xen/domctl: wrap around XEN_DOMCTL_soft_reset

2025-08-03 Thread Penny Zheng
Function domain_soft_reset() is responsible for domain soft reset, tracking its calling chain, and the following functions could also be wrapped: - grant_table_warn_active_grants() - argo_soft_reset() - arch_domain_soft_reset() - domain_resume(), another usage is in XEN_DOMCTL_resumedomain domctl-o

[PATCH v1 05/25] xen: introduce CONFIG_DOMCTL

2025-08-03 Thread Penny Zheng
We introduce a new Kconfig CONFIG_DOMCTL, which shall only be disabled on some dom0less systems or PV shim on x86, to reduce Xen footprint. Making DOMCTL without prompt is transient and it will be adjusted in the final patch. And the consequence of introducing "CONFIG_DOMCTL=y" in .config file gen

[PATCH v1 03/25] xen/x86: complement PG_log_dirty wrapping

2025-08-03 Thread Penny Zheng
We have PG_log_dirty flag to wrap codes about paging log-dirty support. The main entry is paging_domctl(), and tracking its call chain, the following functions needs wrapping too: - xsm_shadow_control - hvm_mapped_guest_frames_mark_dirty - hap_domctl - shadow_domctl - shadow_test_disable - sh

[PATCH v1 02/25] xen/x86: consolidate vram tracking support

2025-08-03 Thread Penny Zheng
Flag PG_log_dirty is for paging log dirty support, not vram tracking support. However data structure sh_dirty_vram{} and function paging_log_dirty_range() designed for vram tracking support, are guarded with PG_log_dirty. We release both from PG_log_dirty, and also move paging_log_dirty_range() int

Fork or replace dependency yajl?

2025-08-03 Thread Christoph Grüninger
Dear Xen developers, you are using the dependency yajl (yet another json library, [1]) to parse JSON files. The project seems abandoned with the last commit 10 years ago, the last release over 11 years ago, and 75 open pull requests. Packaging yajl requires patches, e.g., to make it compatible