All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/28] Disable domctl-op via CONFIG_MGMT_HYPERCALLS
@ 2025-10-13 10:15 Penny Zheng
  2025-10-13 10:15 ` [PATCH v3 01/28] xen/xsm: remove redundant xsm_iomem_mapping() Penny Zheng
                   ` (27 more replies)
  0 siblings, 28 replies; 68+ messages in thread
From: Penny Zheng @ 2025-10-13 10:15 UTC (permalink / raw)
  To: xen-devel, xen-devel
  Cc: ray.huang, oleksii.kurochko, Penny Zheng, Andrew Cooper,
	Anthony PERARD, Michal Orzel, Jan Beulich, Julien Grall,
	Roger Pau Monné, Stefano Stabellini, Stewart Hildebrand,
	Daniel P. Smith, Dario Faggioli, Juergen Gross, George Dunlap,
	Bertrand Marquis, Volodymyr Babchuk, Alistair Francis,
	Bob Eshleman, Connor Davis, Nathan Studer, Stewart Hildebrand,
	Tamas K Lengyel, Alexandru Isaila, Petre Pircalabu,
	Shawn Anastasio, 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 (28):
  xen/xsm: remove redundant xsm_iomem_mapping()
  xen/mem_sharing: wrap hvm_copy_context_and_params() with
    CONFIG_MEM_SHARING
  xen/altp2m: move p2m_set_suppress_ve_multi() forward
  xen/sched: remove vcpu_set_soft_affinity()
  xen/sysctl: replace CONFIG_SYSCTL with CONFIG_MGMT_DOMCTL
  xen/x86: move domctl.o out of PV_SHIM_EXCLUSIVE
  xen/domctl: make MGMT_HYPERCALLS transiently def_bool
  xen/vm_event: introduce vm_event_is_enabled()
  xen/vm_event: consolidate CONFIG_VM_EVENT
  xen/vm_event: 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 xsm_irq_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 iommu-related domctl op with CONFIG_MGMT_HYPERCALLS
  xen/domctl: wrap arch_{get,set}_paging_mempool_size() with
    CONFIG_MGMT_HYPERCALLS
  xen/domctl: make CONFIG_X86_PSR depend on CONFIG_MGMT_HYPERCALLS
  xen/domctl: avoid unreachable codes when both MGMT_HYPERCALLS and
    MEM_SHARING unset
  xen/domctl: wrap arch-specific domctl-op with CONFIG_MGMT_HYPERCALLS
  xen/domctl: make HVM_PARAM_IDENT_PT conditional upon
    CONFIG_MGMT_HYPERCALLS
  xen/domctl: wrap common/domctl.c with CONFIG_MGMT_HYPERCALLS

 xen/Kconfig.debug                           |   4 +-
 xen/arch/arm/Kconfig                        |   2 +-
 xen/arch/arm/Makefile                       |   4 +-
 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/ppc/stubs.c                        |   4 +
 xen/arch/riscv/stubs.c                      |  10 +-
 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/Kconfig                    |   1 -
 xen/arch/x86/hvm/Makefile                   |   4 +-
 xen/arch/x86/hvm/emulate.c                  |  67 +++++----
 xen/arch/x86/hvm/hvm.c                      |  57 +++++++-
 xen/arch/x86/hvm/pmtimer.c                  |   2 +
 xen/arch/x86/hvm/save.c                     | 154 ++++++++++----------
 xen/arch/x86/hvm/svm/intr.c                 |   2 +-
 xen/arch/x86/hvm/svm/svm.c                  |  66 +++++----
 xen/arch/x86/hvm/vmx/intr.c                 |   2 +-
 xen/arch/x86/hvm/vmx/vmx.c                  |  80 ++++++----
 xen/arch/x86/include/asm/hvm/hvm.h          |  17 ++-
 xen/arch/x86/include/asm/mem_access.h       |   9 ++
 xen/arch/x86/include/asm/monitor.h          |   9 ++
 xen/arch/x86/include/asm/p2m.h              |   2 +-
 xen/arch/x86/include/asm/paging.h           |   2 +-
 xen/arch/x86/include/asm/vm_event.h         |   9 ++
 xen/arch/x86/mm/altp2m.c                    |  34 ++---
 xen/arch/x86/mm/mem_sharing.c               |   7 +
 xen/arch/x86/mm/p2m-pod.c                   |   2 +
 xen/arch/x86/mm/p2m.c                       |   2 +
 xen/arch/x86/mm/paging.c                    |   4 +
 xen/arch/x86/psr.c                          |  18 ---
 xen/arch/x86/time.c                         |   2 +
 xen/common/Kconfig                          |  32 ++--
 xen/common/Makefile                         |   7 +-
 xen/common/argo.c                           |   2 +
 xen/common/device-tree/device-tree.c        |   2 +
 xen/common/domain.c                         |  10 ++
 xen/common/domctl.c                         |   2 +-
 xen/common/grant_table.c                    |   2 +
 xen/common/page_alloc.c                     |   8 +-
 xen/common/perfc.c                          |   4 +-
 xen/common/sched/arinc653.c                 |  11 +-
 xen/common/sched/core.c                     |  18 +--
 xen/common/sched/cpupool.c                  |  16 +-
 xen/common/sched/credit.c                   |  10 +-
 xen/common/sched/credit2.c                  |  10 +-
 xen/common/sched/private.h                  |  10 +-
 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    |   8 +
 xen/drivers/passthrough/arm/smmu-v3.c       |   4 +
 xen/drivers/passthrough/arm/smmu.c          |  10 ++
 xen/drivers/passthrough/device_tree.c       |   8 +
 xen/drivers/passthrough/iommu.c             |   2 +
 xen/drivers/passthrough/pci.c               |   6 +
 xen/drivers/passthrough/vtd/iommu.c         |   6 +
 xen/drivers/vpci/header.c                   |   2 +-
 xen/include/hypercall-defs.c                |  12 +-
 xen/include/xen/domain.h                    |   4 -
 xen/include/xen/mem_access.h                |  10 ++
 xen/include/xen/vm_event.h                  |   7 +
 xen/include/xsm/dummy.h                     |  33 +++--
 xen/include/xsm/xsm.h                       |  65 ++++-----
 xen/lib/x86/Makefile                        |   4 +-
 xen/xsm/dummy.c                             |  23 +--
 xen/xsm/flask/hooks.c                       |  58 ++++----
 79 files changed, 655 insertions(+), 395 deletions(-)

-- 
2.34.1



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

end of thread, other threads:[~2025-11-20  4:10 UTC | newest]

Thread overview: 68+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-13 10:15 [PATCH v3 00/28] Disable domctl-op via CONFIG_MGMT_HYPERCALLS Penny Zheng
2025-10-13 10:15 ` [PATCH v3 01/28] xen/xsm: remove redundant xsm_iomem_mapping() Penny Zheng
2025-10-13 11:18   ` Jan Beulich
2025-10-13 10:15 ` [PATCH v3 02/28] xen/mem_sharing: wrap hvm_copy_context_and_params() with CONFIG_MEM_SHARING Penny Zheng
2025-10-14 14:43   ` Grygorii Strashko
2025-10-28 17:01   ` Jan Beulich
2025-10-13 10:15 ` [PATCH v3 03/28] xen/altp2m: move p2m_set_suppress_ve_multi() forward Penny Zheng
2025-10-28 17:03   ` Jan Beulich
2025-10-13 10:15 ` [PATCH v3 04/28] xen/sched: remove vcpu_set_soft_affinity() Penny Zheng
2025-10-13 10:24   ` Jürgen Groß
2025-10-13 10:15 ` [PATCH v3 05/28] xen/sysctl: replace CONFIG_SYSCTL with CONFIG_MGMT_DOMCTL Penny Zheng
2025-10-13 10:41   ` Jürgen Groß
2025-10-29 14:30   ` Jan Beulich
2025-10-29 21:26   ` Stewart Hildebrand
2025-11-19  6:33     ` Penny, Zheng
2025-10-13 10:15 ` [PATCH v3 06/28] xen/x86: move domctl.o out of PV_SHIM_EXCLUSIVE Penny Zheng
2025-10-29 14:33   ` Jan Beulich
2025-10-13 10:15 ` [PATCH v3 07/28] xen/domctl: make MGMT_HYPERCALLS transiently def_bool Penny Zheng
2025-10-29 14:37   ` Jan Beulich
2025-10-13 10:15 ` [PATCH v3 09/28] xen/vm_event: consolidate CONFIG_VM_EVENT Penny Zheng
2025-10-21 13:24   ` Grygorii Strashko
2025-10-29 15:57   ` Jan Beulich
2025-11-11  7:08     ` Penny, Zheng
2025-11-11  8:13       ` Jan Beulich
2025-11-11  9:46         ` Penny, Zheng
2025-10-13 10:15 ` [PATCH v3 10/28] xen/vm_event: make VM_EVENT depend on CONFIG_MGMT_HYPERCALLS Penny Zheng
2025-10-13 10:15 ` [PATCH v3 11/28] xen/xsm: wrap xsm_vm_event_control() with CONFIG_VM_EVENT Penny Zheng
2025-10-13 10:15 ` [PATCH v3 12/28] xen/domctl: wrap domain_pause_by_systemcontroller() with MGMT_HYPERCALLS Penny Zheng
2025-10-30 11:28   ` Jan Beulich
2025-10-13 10:15 ` [PATCH v3 13/28] xen/domctl: wrap domain_soft_reset() with CONFIG_MGMT_HYPERCALLS Penny Zheng
2025-10-30 12:14   ` Jan Beulich
2025-10-13 10:15 ` [PATCH v3 14/28] xen/domctl: wrap domain_resume() " Penny Zheng
2025-10-13 10:15 ` [PATCH v3 15/28] xen/domctl: wrap domain_kill() " Penny Zheng
2025-10-30 12:43   ` Jan Beulich
2025-11-12  8:58     ` Penny, Zheng
2025-11-12 10:02       ` Jan Beulich
2025-11-13  4:11         ` Penny, Zheng
2025-11-13  4:40     ` Penny, Zheng
2025-10-13 10:15 ` [PATCH v3 16/28] xen/domctl: wrap domain_set_node_affinity() " Penny Zheng
2025-10-13 10:15 ` [PATCH v3 17/28] xen/domctl: wrap vcpu_affinity_domctl() " Penny Zheng
2025-10-13 10:44   ` Jürgen Groß
2025-10-13 10:15 ` [PATCH v3 18/28] xen/domctl: wrap sched_adjust() " Penny Zheng
2025-10-13 11:03   ` Jürgen Groß
2025-10-13 11:13     ` Jan Beulich
2025-10-13 10:15 ` [PATCH v3 19/28] xen/domctl: wrap xsm_irq_permission " Penny Zheng
2025-10-13 10:15 ` [PATCH v3 20/28] xen/domctl: wrap arch-specific domain_set_time_offset() " Penny Zheng
2025-10-13 10:15 ` [PATCH v3 21/28] xen/domctl: wrap xsm_set_target() " Penny Zheng
2025-10-13 10:15 ` [PATCH v3 22/28] xen/domctl: wrap iommu-related domctl op " Penny Zheng
2025-10-30 13:09   ` Jan Beulich
2025-10-13 10:15 ` [PATCH v3 23/28] xen/domctl: wrap arch_{get,set}_paging_mempool_size() " Penny Zheng
2025-10-13 10:15 ` [PATCH v3 24/28] xen/domctl: make CONFIG_X86_PSR depend on CONFIG_MGMT_HYPERCALLS Penny Zheng
2025-10-13 10:15 ` [PATCH v3 25/28] xen/domctl: avoid unreachable codes when both MGMT_HYPERCALLS and MEM_SHARING unset Penny Zheng
2025-10-30 13:13   ` Jan Beulich
2025-10-13 10:15 ` [PATCH v3 26/28] xen/domctl: wrap arch-specific domctl-op with CONFIG_MGMT_HYPERCALLS Penny Zheng
2025-10-30 13:24   ` Jan Beulich
2025-10-13 10:15 ` [PATCH v3 27/28] xen/domctl: make HVM_PARAM_IDENT_PT conditional upon CONFIG_MGMT_HYPERCALLS Penny Zheng
2025-10-30 13:34   ` Jan Beulich
2025-11-18  6:45     ` Penny, Zheng
2025-11-18  7:12       ` Jan Beulich
2025-10-13 10:15 ` [PATCH v3 28/28] xen/domctl: wrap common/domctl.c with CONFIG_MGMT_HYPERCALLS Penny Zheng
2025-10-30 13:40   ` Jan Beulich
2025-11-18  6:43     ` Penny, Zheng
2025-11-18  7:14       ` Jan Beulich
2025-11-18  7:51         ` Penny, Zheng
2025-11-18 19:29           ` Jason Andryuk
2025-11-20  4:09             ` Penny, Zheng
     [not found] ` <20251013101540.3502842-9-Penny.Zheng@amd.com>
2025-10-29 15:02   ` [PATCH v3 08/28] xen/vm_event: introduce vm_event_is_enabled() Jan Beulich
2025-10-30 11:10     ` Grygorii Strashko

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.