[PATCH 11/14] x86/paravirt: use common code for paravirt_steal_clock()

2025-09-10 Thread Juergen Gross
Remove the arch specific variant of paravirt_steal_clock() and use the common one instead. With alol 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 --- arch/x86/Kconfig

[PATCH 07/14] arm/paravirt: use common code for paravirt_steal_clock()

2025-09-10 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 00/14] paravirt: cleanup and reorg

2025-09-10 Thread Juergen Gross
Some cleanups and reorg of paravirt code and headers: - The first 2 patches should be not controversial at all, as they remove just some no longer needed #include and struct forward declarations. - The 3rd patch is removing CONFIG_PARAVIRT_DEBUG, which IMO has no real value, as it just chan

[PATCH 06/14] sched: move clock related paravirt code to kernel/sched

2025-09-10 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

[PATCH 01/14] x86/paravirt: remove not needed includes of paravirt.h

2025-09-10 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 --- arch/x86/entry/entry_64.S | 1 - arch/x86/entry/vsyscall/vsyscall_64.c | 1 - arch/x86/hyperv/hv_spinlock.c | 1 - arch/x86/include

Re: [PATCH v2 14/26] xen/domctl: wrap arch-specific arch_get_info_guest() with CONFIG_MGMT_HYPERCALLS

2025-09-10 Thread Stefano Stabellini
On Wed, 10 Sep 2025, Penny Zheng wrote: > Arch-specific function arch_get_info_guest() is responsible for > XEN_DOMCTL_getvcpucontext domctl-op, and shall be wrapped with > CONFIG_MGMT_HYPERCALLS > Wrap XEN_DOMCTL_getvcpucontext-case transiently with CONFIG_MGMT_HYPERCALLS, > and it will be removed

Re: [PATCH v2 06/26] xen/xsm: wrap xsm_vm_event_control() with CONFIG_VM_EVENT

2025-09-10 Thread Stefano Stabellini
On Wed, 10 Sep 2025, Penny Zheng wrote: > Function xsm_vm_event_control() is only invoked under CONFIG_VM_EVENT, so > it shall be wrapped with it > > Signed-off-by: Penny Zheng Reviewed-by: Stefano Stabellini

Re: [PATCH v2 19/26] xen/domctl: wrap set_global_virq_handler() with CONFIG_MGMT_HYPERCALLS

2025-09-10 Thread Stefano Stabellini
On Wed, 10 Sep 2025, Penny Zheng wrote: > Function set_global_virq_handler() is reponsible for > XEN_DOMCTL_set_virq_handler domctl-op, and shall be wrapped with > CONFIG_MGMT_HYPERCALLS. > Wrap XEN_DOMCTL_set_virq_handler-case transiently with CONFIG_MGMT_HYPERCALLS, > and it will be removed when

Re: [PATCH v2 23/26] xen/x86: make CONFIG_X86_PSR depend on CONFIG_MGMT_HYPERCALLS

2025-09-10 Thread Stefano Stabellini
On Wed, 10 Sep 2025, Penny Zheng wrote: > 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

Re: [PATCH v2 22/26] xen/domctl: wrap arch_{get,set}_paging_mempool_size() with CONFIG_MGMT_HYPERCALLS

2025-09-10 Thread Stefano Stabellini
On Wed, 10 Sep 2025, Penny Zheng wrote: > Arch-specific arch_{get,set}_paging_mempool_size() is responsible for > XEN_DOMCTL_{get,set}_paging_mempool_size domctl-op, and shall be wrapped > with CONFIG_MGMT_HYPERCALLS > Wrap XEN_DOMCTL_{get,set}_paging_mempool_size-case transiently with > CONFIG_MGM

Re: [PATCH v2 20/26] xen/domctl: wrap iommu-related domctl op with CONFIG_MGMT_HYPERCALLS

2025-09-10 Thread Stefano Stabellini
On Wed, 10 Sep 2025, Penny Zheng wrote: > Function iommu_do_domctl() is the main entry for all iommu-related domctl-op, > and shall be wrapped with CONFIG_MGMT_HYPERCALLS. > Tracking its calling chain, the following functions shall all be wrapped > with CONFIG_MGMT_HYPERCALLS: > - iommu_do_pci_domc

Re: [PATCH v2 13/26] xen/domctl: wrap sched_adjust() with CONFIG_MGMT_HYPERCALLS

2025-09-10 Thread Stefano Stabellini
On Wed, 10 Sep 2025, Penny Zheng wrote: > Function sched_adjust() is responsible for XEN_DOMCTL_scheduler_op domctl-op, > so it could be wrapped with CONFIG_MGMT_HYPERCALLS. > Tracing its calling chain, the following functions shall be wrapped with > CONFIG_MGMT_HYPERCALLS too: > - sched_adjust_dom

Re: [PATCH v2 17/26] xen/domctl: wrap xsm_set_target() with CONFIG_MGMT_HYPERCALLS

2025-09-10 Thread Stefano Stabellini
On Wed, 10 Sep 2025, Penny Zheng wrote: > Function xsm_set_target() is only invoked under XEN_DOMCTL_set_target > domctl-op, and shall be wrapped with CONFIG_MGMT_HYPERCALLS. > > Signed-off-by: Penny Zheng > --- > v1 -> v2: > - adapt to changes of "unify DOMCTL to MGMT_HYPERCALLS" > --- > xen/in

Re: [PATCH v2 10/26] xen/domctl: wrap domain_kill() with CONFIG_MGMT_HYPERCALLS

2025-09-10 Thread Stefano Stabellini
On Wed, 10 Sep 2025, Penny Zheng wrote: > Function domain_kill() is responsible for killing domain and relinquish > domain-held resources. and it is only invoked under > XEN_DOMCTL_destroydomain-case. So it shall be wrapped with > CONFIG_MGMT_HYPERCALLS. > Tracking its calling chain, the following

Re: [PATCH v2 16/26] xen/domctl: wrap arch-specific domain_set_time_offset() with CONFIG_MGMT_HYPERCALLS

2025-09-10 Thread Stefano Stabellini
On Wed, 10 Sep 2025, Penny Zheng wrote: > Arch-specific domain_set_time_offset() is responisble for > XEN_DOMCTL_settimeoffset domctl-op, and shall be wrapped with > CONFIG_MGMT_HYPERCALLS > Wrap XEN_DOMCTL_settimeoffset-case transiently with CONFIG_MGMT_HYPERCALLS, > and it will be removed when in

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

2025-09-10 Thread Stefano Stabellini
On Wed, 10 Sep 2025, Penny Zheng wrote: > The following functions are invoked only under > XEN_DOMCTL_{irq_permission,iomem_permission} domctl-op, and shall be wrapped > with CONFIG_MGMT_HYPERCALLS: > - xsm_irq_permission > - xsm_iomem_permission > > Signed-off-by: Penny Zheng > --- > v1 -> v2: >

Re: [PATCH v2 09/26] xen/domctl: wrap domain_resume() with CONFIG_MGMT_HYPERCALLS

2025-09-10 Thread Stefano Stabellini
On Wed, 10 Sep 2025, Penny Zheng wrote: > One usage of function domain_resume() is in domain resume domctl-op, and > the other is in domain_soft_reset(), which is already guarded with > CONFIG_MGMT_HYPERCALLS. > So we could wrap domain_soft_reset() with CONFIG_MGMT_HYPERCALLS. > > Wrap XEN_DOMCTL_

Re: [PATCH v2 02/26] xen/sysctl: replace CONFIG_SYSCTL with CONFIG_MGMT_DOMCTL

2025-09-10 Thread Stefano Stabellini
On Wed, 10 Sep 2025, Stefano Stabellini wrote: > On Wed, 10 Sep 2025, Penny Zheng wrote: > > Rename all the CONFIG_SYSCTL into a single CONFIG_MGMT_HYPERCALLS to help > > provide a single option to manage all unnecessary hypercalls, including > > sysctl, domctl, etc, in dom0less system and PV shim

Re: [PATCH v1] coverage: add missing include for macro

2025-09-10 Thread Andrew Cooper
On 11/09/2025 12:40 am, victorm.l...@amd.com wrote: > From: Victor Lira > > The missing include prevents it from compiling when CONFIG_COVERAGE is not set > and the header is included in a file that has not already included errno.h, > causing EOPNOTSUPP to be undeclared. > > Add the missing includ

Re: [PATCH v2 06/26] xen/xsm: wrap xsm_vm_event_control() with CONFIG_VM_EVENT

2025-09-10 Thread Stefano Stabellini
On Wed, 10 Sep 2025, Jan Beulich wrote: > On 10.09.2025 09:38, Penny Zheng wrote: > > Function xsm_vm_event_control() is only invoked under CONFIG_VM_EVENT, so > > it shall be wrapped with it > > Isn't this addressing a Misra violation then? Whether it's "unreachable code" > or "dead code" I can't

Re: [PATCH v2 02/26] xen/sysctl: replace CONFIG_SYSCTL with CONFIG_MGMT_DOMCTL

2025-09-10 Thread Stefano Stabellini
On Wed, 10 Sep 2025, Penny Zheng wrote: > Rename all the CONFIG_SYSCTL into a single CONFIG_MGMT_HYPERCALLS to help > provide a single option to manage all unnecessary hypercalls, including > sysctl, domctl, etc, in dom0less system and PV shim mode, which could also > make it easier to support rand

Re: [PATCH v1] coverage: add missing include for macro

2025-09-10 Thread Lira, Victor M
On 9/10/2025 4:47 PM, Andrew Cooper wrote: @@ -5,6 +5,7 @@ #include int sysctl_cov_op(struct xen_sysctl_coverage_op *op); #else +#include static inline int sysctl_cov_op(void *unused) { return -EOPNOTSUPP; ... this is starting to get overly busy to read and could do with some ex

[PATCH v1] coverage: add missing include for macro

2025-09-10 Thread victorm.lira
From: Victor Lira The missing include prevents it from compiling when CONFIG_COVERAGE is not set and the header is included in a file that has not already included errno.h, causing EOPNOTSUPP to be undeclared. Add the missing include. Signed-off-by: Victor Lira --- example of the problem:

[PATCH v2 2/3] CI: Update x86 to use Debian Trixie

2025-09-10 Thread Andrew Cooper
With the exception of the custom IBT job, copy all Debian 12 jobs making Debian 13 versions, then trim the Debian 12 ranconfig jobs. Update the test jobs using Debian 12 to use 13. Signed-off-by: Andrew Cooper --- CC: Anthony PERARD CC: Michal Orzel CC: Jan Beulich CC: Julien Grall CC: Roger

[PATCH v2 1/3] CI: Update ppc64 to use Debian Trixie

2025-09-10 Thread Andrew Cooper
Everything works fine with Debian 13. Provide two new build jobs (for a total of 6), and update the test job. Signed-off-by: Andrew Cooper --- CC: Anthony PERARD CC: Michal Orzel CC: Jan Beulich CC: Julien Grall CC: Roger Pau Monné CC: Stefano Stabellini CC: Oleksii Kurochko CC: Marek Mar

[PATCH v2 3/3] CHANGELOG: Notes about distro changes in CI

2025-09-10 Thread Andrew Cooper
Also state the RISC-V baseline now it's been set, as it's the reason why RISC-V Bullseye got dropped. Signed-off-by: Andrew Cooper --- CC: Anthony PERARD CC: Michal Orzel CC: Jan Beulich CC: Julien Grall CC: Roger Pau Monné CC: Stefano Stabellini CC: Oleksii Kurochko v2: * New --- CHANG

[PATCH v2 0/3] CI: Add Debian Trixie

2025-09-10 Thread Andrew Cooper
Refreshed the Trixie series. Update containerize, and change one x86 container to be rootless. Add some changelog notes. These containers are already built and deployed for people to test with. Andrew Cooper (3): CI: Update ppc64 to use Debian Trixie CI: Update x86 to use Debian Trixie CH

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

2025-09-10 Thread Jan Beulich
On 10.09.2025 09:38, Penny Zheng wrote: > @@ -2456,9 +2460,13 @@ static struct hvm_function_table __initdata_cf_clobber > svm_function_table = { > .fpu_dirty_intercept = svm_fpu_dirty_intercept, > .msr_read_intercept = svm_msr_read_intercept, > .msr_write_intercept = svm_msr_wri

[PATCH] libacpi: Remove CPU hotplug and GPE handling from PVH DSDTs

2025-09-10 Thread Alejandro Vallejo
CPU hotplug relies on the guest having access to the legacy online CPU bitmap that QEMU provides at PIO 0xAF00. But PVH guests have no DM, so this causes the MADT to get corrupted due to spurious modifications of the "online" flag in MADT entries and the table checksum during the initial acpica pas

Re: [PATCH v9 1/4] xen/arm: add generic SCI subsystem

2025-09-10 Thread Oleksii Moisieiev
Hi Julien, Thank you for your observations. You're absolutely right about this. Currently, the sci_relinquish_resources call doesn't perform any operations because the single-agent doesn't implement a callback. I'll move the sci implementation to be positioned above the tee implementation and p

domU reboot claim failed

2025-09-10 Thread Jason Andryuk
Hi, We're running Android as a guest and it's running the Compatibility Test Suite. During the CTS, the Android domU is rebooted multiple times. In the middle of the CTS, we've seen reboot fail. xl -vvv shows: domainbuilder: detail: Could not allocate memory for HVM guest as we cannot claim

Re: [PATCH] libacpi: Remove CPU hotplug and GPE handling from PVH DSDTs

2025-09-10 Thread Alejandro Vallejo
On Wed Sep 10, 2025 at 7:01 PM CEST, Alejandro Vallejo wrote: > On Wed Sep 10, 2025 at 5:31 PM CEST, Jan Beulich wrote: >> On 10.09.2025 17:16, Alejandro Vallejo wrote: >>> On Wed Sep 10, 2025 at 5:02 PM CEST, Jan Beulich wrote: On 10.09.2025 16:49, Alejandro Vallejo wrote: > CPU hotplug r

Re: [PATCH] libacpi: Remove CPU hotplug and GPE handling from PVH DSDTs

2025-09-10 Thread Grygorii Strashko
On 10.09.25 18:16, Alejandro Vallejo wrote: On Wed Sep 10, 2025 at 5:02 PM CEST, Jan Beulich wrote: On 10.09.2025 16:49, Alejandro Vallejo wrote: CPU hotplug relies on the guest having access to the legacy online CPU bitmap that QEMU provides at PIO 0xAF00. But PVH guests have no DM, so this

Re: [PATCH] libacpi: Remove CPU hotplug and GPE handling from PVH DSDTs

2025-09-10 Thread Jan Beulich
On 10.09.2025 17:16, Alejandro Vallejo wrote: > On Wed Sep 10, 2025 at 5:02 PM CEST, Jan Beulich wrote: >> On 10.09.2025 16:49, Alejandro Vallejo wrote: >>> CPU hotplug relies on the guest having access to the legacy online CPU >>> bitmap that QEMU provides at PIO 0xAF00. But PVH guests have no DM,

Re: [PATCH v2 08/26] xen/domctl: wrap domain_soft_reset() with CONFIG_MGMT_HYPERCALLS

2025-09-10 Thread Jan Beulich
On 10.09.2025 09:38, Penny Zheng wrote: > Function domain_soft_reset() is responsible for domain soft reset domctl-op, > and shall be wrapped with CONFIG_MGMT_HYPERCALLS > Tracking its calling chain, and the following functions shall also be wrapped > with CONFIG_MGMT_HYPERCALLS: > - grant_table_wa

Re: [PATCH v2 07/26] xen/domctl: wrap domain_pause_by_systemcontroller() with MGMT_HYPERCALLS

2025-09-10 Thread Jan Beulich
On 10.09.2025 09:38, Penny Zheng wrote: > --- a/xen/common/domain.c > +++ b/xen/common/domain.c > @@ -1606,10 +1606,12 @@ static int _domain_pause_by_systemcontroller(struct > domain *d, bool sync) > return 0; > } > > +#ifdef CONFIG_MGMT_HYPERCALLS > int domain_pause_by_systemcontroller(s

Re: [PATCH v2 05/26] xen/x86: make VM_EVENT depend on CONFIG_MGMT_HYPERCALLS

2025-09-10 Thread Jan Beulich
On 10.09.2025 09:38, Penny Zheng wrote: > VM event could only be enabled/disabled via vm_event domctl-op, so > CONFIG_VM_EVENT shall depend on CONFIG_MGMT_HYPERCALLS > > Signed-off-by: Penny Zheng Looks plausible to me, so: Acked-by: Jan Beulich but really Tamas (now Cc-ed) should also get a ch

Re: [PATCH] libacpi: Remove CPU hotplug and GPE handling from PVH DSDTs

2025-09-10 Thread Jan Beulich
On 10.09.2025 16:49, Alejandro Vallejo wrote: > CPU hotplug relies on the guest having access to the legacy online CPU > bitmap that QEMU provides at PIO 0xAF00. But PVH guests have no DM, so > this causes the MADT to get corrupted due to spurious modifications of > the "online" flag in MADT entrie

Re: [PATCH v2 01/26] xen/x86: move domctl.o out of PV_SHIM_EXCLUSIVE

2025-09-10 Thread Jan Beulich
On 10.09.2025 09:38, Penny Zheng wrote: > 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 f

Re: [PATCH 1/2] x86/IO-APIC: drop setup_ioapic_ids_from_mpc()

2025-09-10 Thread Jan Beulich
On 10.09.2025 15:26, Andrew Cooper wrote: > On 03/09/2025 8:55 am, Jan Beulich wrote: >> Along the lines of what b89f8f054f96 ("x86/apic: Drop sync_Arb_IDs()") >> said, the function is dead logic as well: All 64-bit capable Intel systems >> have (at least) xAPIC (if not x2APIC). >> >> Even if Eclai

Re: [PATCH 2/2] x86/IO-APIC: drop io_apic_get_unique_id()

2025-09-10 Thread Andrew Cooper
On 03/09/2025 8:56 am, Jan Beulich wrote: > Along the lines of what b89f8f054f96 ("x86/apic: Drop sync_Arb_IDs()") > said, the function is dead logic as well: All 64-bit capable Intel systems > have (at least) xAPIC (if not x2APIC). > > Even if Eclair can't know it, such code is violating Misra rul

Re: [PATCH] CI: Switch the alpine containers to be non-root

2025-09-10 Thread Andrew Cooper
On 10/09/2025 12:57 pm, Marek Marczykowski-Górecki wrote: > On Wed, Sep 10, 2025 at 12:34:16PM +0100, Andrew Cooper wrote: >> Testing on staging-4.19 is hitting a reliable failure, caused by alpine/3.18 >> being a root build container, but debian/12-x86_64 being a non-root test >> container. Speci

Re: [PATCH v6 03/16] dma-debug: refactor to use physical addresses for page mapping

2025-09-10 Thread Jason Gunthorpe
On Wed, Sep 10, 2025 at 08:26:18AM +0300, Leon Romanovsky wrote: > #define PageHighMem(__p) is_highmem_idx(page_zonenum(__p)) > -#define PhysHighMem(__p) (PageHighMem(phys_to_page(__p))) > #define folio_test_highmem(__f)is_highmem_idx(folio_zonenum(__f)) > #else > PAGEFLAG_FALSE(HighMem

[PATCH v2 22/26] xen/domctl: wrap arch_{get,set}_paging_mempool_size() with CONFIG_MGMT_HYPERCALLS

2025-09-10 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 with CONFIG_MGMT_HYPERCALLS Wrap XEN_DOMCTL_{get,set}_paging_mempool_size-case transiently with CONFIG_MGMT_HYPERCALLS, and it will be removed when introduc

Re: [PATCH v11 3/5] vpci/rebar: Implement cleanup function for Rebar

2025-09-10 Thread Chen, Jiqian
On 2025/8/29 18:22, Roger Pau Monné wrote: > On Fri, Aug 08, 2025 at 04:03:35PM +0800, Jiqian Chen wrote: >> When Rebar initialization fails, vPCI hides the capability, but >> removing handlers and datas won't be performed until the device is >> deassigned. So, implement Rebar cleanup hook that wil

RE: [PATCH v9 0/8] amd-cppc CPU Performance Scaling Driver

2025-09-10 Thread Penny, Zheng
[Public] > -Original Message- > From: Jan Beulich > Sent: Wednesday, September 10, 2025 12:11 AM > To: Penny, Zheng > Cc: Andrew Cooper ; Roger Pau Monné > ; Anthony PERARD ; Orzel, > Michal ; Julien Grall ; Stefano > Stabellini ; Juergen Gross ; Oleksii > Kurochko ; Community Manager >

Re: [PATCH v7 02/16] xen/8250-uart: update definitions

2025-09-10 Thread Mykola Kvach
Hi Denis, Thank you for the updates from the previous version of patch series, On Tue, Sep 9, 2025 at 1:47 PM Jan Beulich wrote: > > On 08.09.2025 23:11, dmuk...@xen.org wrote: > > --- a/xen/include/xen/8250-uart.h > > +++ b/xen/include/xen/8250-uart.h > > @@ -32,6 +32,7 @@ > > #define UART_MCR

[PATCH v2 14/26] xen/domctl: wrap arch-specific arch_get_info_guest() with CONFIG_MGMT_HYPERCALLS

2025-09-10 Thread Penny Zheng
Arch-specific function arch_get_info_guest() is responsible for XEN_DOMCTL_getvcpucontext domctl-op, and shall be wrapped with CONFIG_MGMT_HYPERCALLS Wrap XEN_DOMCTL_getvcpucontext-case transiently with CONFIG_MGMT_HYPERCALLS, and it will be removed when introducing CONFIG_MGMT_HYPERCALLS on the co

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

2025-09-10 Thread Penny Zheng
Function xsm_getdomaininfo() is only invoked in XEN_DOMCTL_getdomaininfo domctl-op, and it shall be wrapped with CONFIG_MGMT_HYPERCALLS Signed-off-by: Penny Zheng --- v1 -> v2: - adapt to changes of "unify DOMCTL to MGMT_HYPERCALLS" --- xen/include/xsm/xsm.h | 6 +- xen/xsm/dummy.c | 2

[PATCH v2 19/26] xen/domctl: wrap set_global_virq_handler() with CONFIG_MGMT_HYPERCALLS

2025-09-10 Thread Penny Zheng
Function set_global_virq_handler() is reponsible for XEN_DOMCTL_set_virq_handler domctl-op, and shall be wrapped with CONFIG_MGMT_HYPERCALLS. Wrap XEN_DOMCTL_set_virq_handler-case transiently with CONFIG_MGMT_HYPERCALLS, and it will be removed when introducing CONFIG_MGMT_HYPERCALLS on the common/d

[PATCH v2 24/26] xen/domctl: wrap arch-specific domctl-op with CONFIG_MGMT_HYPERCALLS

2025-09-10 Thread Penny Zheng
Function arch_do_domctl() is responsible for arch-specific domctl-op, and shall be wrapped with CONFIG_MGMT_HYPERCALLS Tracking its calling chain and the following functions shall be wrapped with CONFIG_MGMT_HYPERCALLS: For x86: - hvm_save_one - hvm_acpi_power_button - hvm_acpi_sleep_button - hvm_d

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

2025-09-10 Thread Penny Zheng
The following functions are invoked only under XEN_DOMCTL_{irq_permission,iomem_permission} domctl-op, and shall be wrapped with CONFIG_MGMT_HYPERCALLS: - xsm_irq_permission - xsm_iomem_permission Signed-off-by: Penny Zheng --- v1 -> v2: - adapt to changes of "unify DOMCTL to MGMT_HYPERCALLS" ---

[PATCH v2 25/26] xen/xsm: wrap xsm functions with CONFIG_MGMT_HYPERCALLS

2025-09-10 Thread Penny Zheng
The following functions are xsm-related and only invoked under arch-specific domctl-op, so they shall all be wrapped with CONFIG_MGMT_HYPERCALLS: - xsm_domctl - xsm_{bind,unbind}_pt_irq - xsm_ioport_permission - xsm_ioport_mapping Signed-off-by: Penny Zheng --- v1 -> v2: - new commit --- xen/inc

[PATCH v2 05/26] xen/x86: make VM_EVENT depend on CONFIG_MGMT_HYPERCALLS

2025-09-10 Thread Penny Zheng
VM event could only be enabled/disabled via vm_event domctl-op, so CONFIG_VM_EVENT shall depend on CONFIG_MGMT_HYPERCALLS Signed-off-by: Penny Zheng --- v1 -> v2: - adapt to changes of "unify DOMCTL to MGMT_HYPERCALLS" --- xen/common/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH v2 00/26] Disable domctl-op via CONFIG_MGMT_HYPERCALLS

2025-09-10 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 v2 02/26] xen/sysctl: replace CONFIG_SYSCTL with CONFIG_MGMT_DOMCTL

2025-09-10 Thread Penny Zheng
Rename all the CONFIG_SYSCTL into a single CONFIG_MGMT_HYPERCALLS to help provide a single option to manage all unnecessary hypercalls, including sysctl, domctl, etc, in dom0less system and PV shim mode, which could also make it easier to support randconfigs. Suggested-by: Stefano Stabellini Sign

[PATCH v2 07/26] xen/domctl: wrap domain_pause_by_systemcontroller() with MGMT_HYPERCALLS

2025-09-10 Thread Penny Zheng
Function domain_pause_by_systemcontroller() is responsible for XEN_DOMCTL_pausedomain domctl-op, and shall be wrapped around with CONFIG_MGMT_HYPERCALLS. Provide transient wrapping around XEN_DOMCTL_pausedomain-case, and it will be removed on introducing CONFIG_MGMT_HYPERCALLS on the common/domctl.

[PATCH v2 09/26] xen/domctl: wrap domain_resume() with CONFIG_MGMT_HYPERCALLS

2025-09-10 Thread Penny Zheng
One usage of function domain_resume() is in domain resume domctl-op, and the other is in domain_soft_reset(), which is already guarded with CONFIG_MGMT_HYPERCALLS. So we could wrap domain_soft_reset() with CONFIG_MGMT_HYPERCALLS. Wrap XEN_DOMCTL_resumedomain-case transiently with CONFIG_MGMT_HYPER

[PATCH v2 06/26] xen/xsm: wrap xsm_vm_event_control() with CONFIG_VM_EVENT

2025-09-10 Thread Penny Zheng
Function xsm_vm_event_control() is only invoked under CONFIG_VM_EVENT, so it shall be wrapped with it Signed-off-by: Penny Zheng --- v1 -> v2: - new commit --- xen/include/xsm/xsm.h | 4 ++-- xen/xsm/dummy.c | 2 +- xen/xsm/flask/hooks.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deleti

[PATCH v2 01/26] xen/x86: move domctl.o out of PV_SHIM_EXCLUSIVE

2025-09-10 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_