All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/26] Disable domctl-op via CONFIG_MGMT_HYPERCALLS
@ 2025-09-10  7:38 Penny Zheng
  2025-09-10  7:38 ` [PATCH v2 01/26] xen/x86: move domctl.o out of PV_SHIM_EXCLUSIVE Penny Zheng
                   ` (25 more replies)
  0 siblings, 26 replies; 102+ messages in thread
From: Penny Zheng @ 2025-09-10  7:38 UTC (permalink / raw)
  To: xen-devel, xen-devel
  Cc: ray.huang, Penny Zheng, Jan Beulich, Andrew Cooper,
	Roger Pau Monné, Anthony PERARD, Michal Orzel, Julien Grall,
	Stefano Stabellini, Bertrand Marquis, Volodymyr Babchuk,
	Alistair Francis, Bob Eshleman, Connor Davis, Oleksii Kurochko,
	Nathan Studer, Stewart Hildebrand, Dario Faggioli, Juergen Gross,
	George Dunlap, Daniel P. Smith, Tamas K Lengyel, Alexandru Isaila,
	Petre Pircalabu, Christopher Clark, Meng Xu, Rahul Singh

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 hypercalls in the following aspects:
- sysctl
- domctl
- hvm
- physdev
- platform
This patch serie is only focusing on domctl-op. Different aspects will be
covered in different patch serie.

Features, like VM event, or paging log-dirty support, which fully rely on
domctl-op, will be wrapped with CONFIG_MGMT_HYPERCALLS, to reduce Xen
footprint as much as possible.

It is derived from Stefano Stabellini's commit "xen: introduce kconfig options to
disable hypercalls"(
https://lore.kernel.org/xen-devel/20241219092917.3006174-1-Sergiy_Kibrik@epam.com)

Penny Zheng (26):
  xen/x86: move domctl.o out of PV_SHIM_EXCLUSIVE
  xen/sysctl: replace CONFIG_SYSCTL with CONFIG_MGMT_DOMCTL
  xen/x86: consolidate vram tracking support
  xen: consolidate CONFIG_VM_EVENT
  xen/x86: make VM_EVENT depend on CONFIG_MGMT_HYPERCALLS
  xen/xsm: wrap xsm_vm_event_control() with CONFIG_VM_EVENT
  xen/domctl: wrap domain_pause_by_systemcontroller() with
    MGMT_HYPERCALLS
  xen/domctl: wrap domain_soft_reset() with CONFIG_MGMT_HYPERCALLS
  xen/domctl: wrap domain_resume() with CONFIG_MGMT_HYPERCALLS
  xen/domctl: wrap domain_kill() with CONFIG_MGMT_HYPERCALLS
  xen/domctl: wrap domain_set_node_affinity() with
    CONFIG_MGMT_HYPERCALLS
  xen/domctl: wrap vcpu_affinity_domctl() with CONFIG_MGMT_HYPERCALLS
  xen/domctl: wrap sched_adjust() with CONFIG_MGMT_HYPERCALLS
  xen/domctl: wrap arch-specific arch_get_info_guest() with
    CONFIG_MGMT_HYPERCALLS
  xen/domctl: wrap xsm_{irq_permission,iomem_permission} with
    CONFIG_MGMT_HYPERCALLS
  xen/domctl: wrap arch-specific domain_set_time_offset() with
    CONFIG_MGMT_HYPERCALLS
  xen/domctl: wrap xsm_set_target() with CONFIG_MGMT_HYPERCALLS
  xen/domctl: wrap xsm_getdomaininfo() with CONFIG_MGMT_HYPERCALLS
  xen/domctl: wrap set_global_virq_handler() with CONFIG_MGMT_HYPERCALLS
  xen/domctl: wrap iommu-related domctl op with CONFIG_MGMT_HYPERCALLS
  xen/xsm: wrap xsm-iommu-related functions with CONFIG_MGMT_HYPERCALLS
  xen/domctl: wrap arch_{get,set}_paging_mempool_size() with
    CONFIG_MGMT_HYPERCALLS
  xen/x86: make CONFIG_X86_PSR depend on CONFIG_MGMT_HYPERCALLS
  xen/domctl: wrap arch-specific domctl-op with CONFIG_MGMT_HYPERCALLS
  xen/xsm: wrap xsm functions with CONFIG_MGMT_HYPERCALLS
  xen/domctl: wrap common/domctl.c with CONFIG_MGMT_HYPERCALLS

 xen/Kconfig.debug                           |  4 +-
 xen/arch/arm/Makefile                       |  2 +-
 xen/arch/arm/arm32/Makefile                 |  2 +-
 xen/arch/arm/arm64/Makefile                 |  2 +-
 xen/arch/arm/domain.c                       |  5 ++
 xen/arch/arm/include/asm/tee/tee.h          |  2 +
 xen/arch/arm/mmu/p2m.c                      |  8 +++
 xen/arch/arm/mpu/p2m.c                      |  2 +
 xen/arch/arm/tee/ffa.c                      |  4 ++
 xen/arch/arm/tee/optee.c                    |  4 ++
 xen/arch/arm/tee/tee.c                      |  2 +
 xen/arch/arm/time.c                         |  2 +
 xen/arch/riscv/stubs.c                      |  4 +-
 xen/arch/x86/Kconfig                        |  1 +
 xen/arch/x86/Makefile                       |  6 +-
 xen/arch/x86/configs/pvshim_defconfig       |  2 +-
 xen/arch/x86/domain.c                       |  4 ++
 xen/arch/x86/emul-i8254.c                   |  2 +
 xen/arch/x86/hvm/Makefile                   |  4 +-
 xen/arch/x86/hvm/hvm.c                      |  4 ++
 xen/arch/x86/hvm/pmtimer.c                  |  2 +
 xen/arch/x86/hvm/save.c                     |  2 +
 xen/arch/x86/hvm/svm/svm.c                  |  8 +++
 xen/arch/x86/hvm/vmx/vmx.c                  | 16 +++++
 xen/arch/x86/include/asm/hvm/hvm.h          | 20 +++++++
 xen/arch/x86/include/asm/hvm/monitor.h      | 65 ++++++++++++++++++++-
 xen/arch/x86/include/asm/hvm/vm_event.h     |  4 ++
 xen/arch/x86/include/asm/mem_access.h       |  9 +++
 xen/arch/x86/include/asm/monitor.h          |  7 +++
 xen/arch/x86/include/asm/p2m.h              |  6 +-
 xen/arch/x86/include/asm/paging.h           | 34 +++++------
 xen/arch/x86/mm/hap/hap.c                   |  4 +-
 xen/arch/x86/mm/mem_sharing.c               |  4 ++
 xen/arch/x86/mm/p2m-pod.c                   |  2 +
 xen/arch/x86/mm/p2m.c                       | 30 ++++++++++
 xen/arch/x86/mm/paging.c                    | 36 ++----------
 xen/arch/x86/psr.c                          | 18 ------
 xen/arch/x86/time.c                         |  2 +
 xen/common/Kconfig                          | 22 +++----
 xen/common/Makefile                         |  7 +--
 xen/common/argo.c                           |  2 +
 xen/common/device-tree/device-tree.c        |  2 +
 xen/common/domain.c                         | 10 ++++
 xen/common/event_channel.c                  |  2 +
 xen/common/grant_table.c                    |  2 +
 xen/common/page_alloc.c                     |  8 +--
 xen/common/perfc.c                          |  4 +-
 xen/common/sched/arinc653.c                 | 10 ++--
 xen/common/sched/core.c                     | 10 ++--
 xen/common/sched/cpupool.c                  | 16 ++---
 xen/common/sched/credit.c                   | 10 +++-
 xen/common/sched/credit2.c                  | 10 +++-
 xen/common/sched/private.h                  |  6 +-
 xen/common/sched/rt.c                       |  4 ++
 xen/common/spinlock.c                       |  4 +-
 xen/drivers/char/console.c                  |  4 +-
 xen/drivers/passthrough/amd/pci_amd_iommu.c |  8 +++
 xen/drivers/passthrough/arm/ipmmu-vmsa.c    |  6 ++
 xen/drivers/passthrough/arm/smmu-v3.c       |  4 ++
 xen/drivers/passthrough/arm/smmu.c          |  4 ++
 xen/drivers/passthrough/device_tree.c       |  6 ++
 xen/drivers/passthrough/iommu.c             |  2 +
 xen/drivers/passthrough/pci.c               |  6 ++
 xen/drivers/passthrough/vtd/iommu.c         |  6 ++
 xen/include/hypercall-defs.c                | 14 ++---
 xen/include/xen/domain.h                    | 13 +++--
 xen/include/xen/mem_access.h                | 35 ++++++++++-
 xen/include/xen/monitor.h                   |  8 ++-
 xen/include/xen/vm_event.h                  | 24 +++++++-
 xen/include/xsm/xsm.h                       | 58 +++++++++++++-----
 xen/lib/x86/Makefile                        |  2 +-
 xen/xsm/dummy.c                             | 16 ++---
 xen/xsm/flask/hooks.c                       | 44 +++++++-------
 73 files changed, 522 insertions(+), 202 deletions(-)

-- 
2.34.1



^ permalink raw reply	[flat|nested] 102+ messages in thread

end of thread, other threads:[~2025-10-13  9:25 UTC | newest]

Thread overview: 102+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-10  7:38 [PATCH v2 00/26] Disable domctl-op via CONFIG_MGMT_HYPERCALLS Penny Zheng
2025-09-10  7:38 ` [PATCH v2 01/26] xen/x86: move domctl.o out of PV_SHIM_EXCLUSIVE Penny Zheng
2025-09-10 13:47   ` Jan Beulich
2025-09-10  7:38 ` [PATCH v2 02/26] xen/sysctl: replace CONFIG_SYSCTL with CONFIG_MGMT_DOMCTL Penny Zheng
2025-09-11  1:34   ` Stefano Stabellini
2025-09-11  2:18     ` Stefano Stabellini
2025-09-10  7:38 ` [PATCH v2 03/26] xen/x86: consolidate vram tracking support Penny Zheng
2025-09-10 14:08   ` Jan Beulich
2025-09-11  7:15     ` Penny, Zheng
2025-09-11  7:54       ` Penny, Zheng
2025-09-11  8:10         ` Jan Beulich
2025-09-10  7:38 ` [PATCH v2 04/26] xen: consolidate CONFIG_VM_EVENT Penny Zheng
2025-09-10 14:56   ` Jan Beulich
2025-09-11  9:20     ` Penny, Zheng
2025-09-11  9:52       ` Jan Beulich
2025-09-13 23:31     ` Tamas K Lengyel
2025-09-14 14:04       ` Jan Beulich
2025-09-24  6:39         ` Penny, Zheng
2025-09-25  5:45           ` Jan Beulich
2025-09-10  7:38 ` [PATCH v2 05/26] xen/x86: make VM_EVENT depend on CONFIG_MGMT_HYPERCALLS Penny Zheng
2025-09-10 15:06   ` Jan Beulich
2025-09-13 23:21     ` Tamas K Lengyel
2025-09-10  7:38 ` [PATCH v2 06/26] xen/xsm: wrap xsm_vm_event_control() with CONFIG_VM_EVENT Penny Zheng
2025-09-10 13:51   ` Jan Beulich
2025-09-11  1:37     ` Stefano Stabellini
2025-09-11  2:08   ` Stefano Stabellini
2025-09-11 11:03   ` Jan Beulich
2025-09-10  7:38 ` [PATCH v2 07/26] xen/domctl: wrap domain_pause_by_systemcontroller() with MGMT_HYPERCALLS Penny Zheng
2025-09-10 15:08   ` Jan Beulich
2025-09-24  7:11     ` Penny, Zheng
2025-09-25  5:47       ` Jan Beulich
2025-09-10  7:38 ` [PATCH v2 08/26] xen/domctl: wrap domain_soft_reset() with CONFIG_MGMT_HYPERCALLS Penny Zheng
2025-09-10 15:13   ` Jan Beulich
2025-09-12  7:18     ` Penny, Zheng
2025-09-12  7:34       ` Jan Beulich
2025-09-10  7:38 ` [PATCH v2 09/26] xen/domctl: wrap domain_resume() " Penny Zheng
2025-09-11  2:27   ` Stefano Stabellini
2025-09-10  7:38 ` [PATCH v2 10/26] xen/domctl: wrap domain_kill() " Penny Zheng
2025-09-11  2:29   ` Stefano Stabellini
2025-09-10  7:38 ` [PATCH v2 11/26] xen/domctl: wrap domain_set_node_affinity() " Penny Zheng
2025-09-11  2:29   ` Stefano Stabellini
2025-09-10  7:38 ` [PATCH v2 12/26] xen/domctl: wrap vcpu_affinity_domctl() " Penny Zheng
2025-09-10 15:52   ` Jan Beulich
2025-09-10  7:38 ` [PATCH v2 13/26] xen/domctl: wrap sched_adjust() " Penny Zheng
2025-09-11  2:30   ` Stefano Stabellini
2025-09-11 10:42   ` Jan Beulich
2025-09-10  7:38 ` [PATCH v2 14/26] xen/domctl: wrap arch-specific arch_get_info_guest() " Penny Zheng
2025-09-11  2:31   ` Stefano Stabellini
2025-09-11 10:45     ` Jan Beulich
2025-09-10  7:38 ` [PATCH v2 15/26] xen/domctl: wrap xsm_{irq_permission,iomem_permission} " Penny Zheng
2025-09-11  2:34   ` Stefano Stabellini
2025-09-11 11:02   ` Jan Beulich
2025-09-25  7:43     ` Penny, Zheng
2025-09-10  7:38 ` [PATCH v2 16/26] xen/domctl: wrap arch-specific domain_set_time_offset() " Penny Zheng
2025-09-11  2:36   ` Stefano Stabellini
2025-09-11 11:27   ` Jan Beulich
2025-09-25  8:01     ` Penny, Zheng
2025-09-10  7:38 ` [PATCH v2 17/26] xen/domctl: wrap xsm_set_target() " Penny Zheng
2025-09-11  2:37   ` Stefano Stabellini
2025-09-11 11:33     ` Jan Beulich
2025-09-25  8:10       ` Penny, Zheng
2025-09-10  7:38 ` [PATCH v2 18/26] xen/domctl: wrap xsm_getdomaininfo() " Penny Zheng
2025-09-11 13:30   ` Jan Beulich
2025-09-25  9:41     ` Penny, Zheng
2025-09-25 14:28       ` Jan Beulich
2025-09-26  4:41         ` Penny, Zheng
2025-09-26  6:53           ` Jan Beulich
2025-09-26  6:57             ` Penny, Zheng
2025-09-26  7:14               ` Jan Beulich
2025-09-26  8:22                 ` Penny, Zheng
2025-09-26  8:30                   ` Jan Beulich
2025-09-29 15:41                 ` Oleksii Kurochko
2025-09-26 19:24               ` Stefano Stabellini
2025-09-28 14:38                 ` Jan Beulich
2025-09-29 16:59                   ` Stefano Stabellini
2025-09-29 17:04                     ` Stefano Stabellini
2025-09-10  7:38 ` [PATCH v2 19/26] xen/domctl: wrap set_global_virq_handler() " Penny Zheng
2025-09-11  2:40   ` Stefano Stabellini
2025-09-10  7:38 ` [PATCH v2 20/26] xen/domctl: wrap iommu-related domctl op " Penny Zheng
2025-09-11  3:12   ` Stefano Stabellini
2025-09-11 11:58   ` Jan Beulich
2025-09-26  9:45     ` Penny, Zheng
2025-09-10  7:38 ` [PATCH v2 21/26] xen/xsm: wrap xsm-iommu-related functions " Penny Zheng
2025-09-11 12:05   ` Jan Beulich
2025-09-10  7:38 ` [PATCH v2 22/26] xen/domctl: wrap arch_{get,set}_paging_mempool_size() " Penny Zheng
2025-09-11  3:18   ` Stefano Stabellini
2025-09-11 12:12   ` Jan Beulich
2025-09-10  7:38 ` [PATCH v2 23/26] xen/x86: make CONFIG_X86_PSR depend on CONFIG_MGMT_HYPERCALLS Penny Zheng
2025-09-11  3:22   ` Stefano Stabellini
2025-09-11 12:19     ` Jan Beulich
2025-09-10  7:38 ` [PATCH v2 24/26] xen/domctl: wrap arch-specific domctl-op with CONFIG_MGMT_HYPERCALLS Penny Zheng
2025-09-11 13:02   ` Jan Beulich
2025-10-11  6:44     ` Penny, Zheng
2025-10-13  6:41       ` Jan Beulich
2025-10-13  7:18         ` Penny, Zheng
2025-10-13  8:30           ` Jan Beulich
2025-10-13  9:25             ` Penny, Zheng
2025-09-10  7:38 ` [PATCH v2 25/26] xen/xsm: wrap xsm functions " Penny Zheng
2025-09-11 13:13   ` Jan Beulich
2025-09-10  7:38 ` [PATCH v2 26/26] xen/domctl: wrap common/domctl.c " Penny Zheng
2025-09-10 13:43   ` Jan Beulich
2025-09-11 13:26   ` Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.