[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Penny Zheng <Penny.Zheng@xxxxxxx>
  • Date: Sun, 3 Aug 2025 17:47:38 +0800
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8+rKpnCb4beuXolnCadHRn5o8RnowLF7DFrmJ1YESoc=; b=bJXNbP+7uv/zV8B1RvhV1FRNtdDTqtbnHnzgOknftrJUrDeiP9FdO/E82A8iUYd3IG2HXEVLumUDx8CPuMeTklurZSxzyukMHo83d13k5BT/RFXzII3qmN3mRDcxgTnZMldXH7gjdZ4mRhERyieFNe6NVtD0nVLlTloo9zQVzEm1ZlbQ/R1rtCJhDIq/dUe/ZIb21YWWjA2PUQhXSDN8wU1nyJjwpjHjmlETKmfjTM6S/pbA81qK/yJOd3dtbIuGTw0ItAUdz5YHACy1yUOjV/4eupLIoqffpBLX5HHdu/6Nz4edavtk7fECOXqIOqnR+IGHrUgGzw+6BHBW0USNtQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=omLfdGw7d2lSPMugLx9+uCTo8rtZ3J6yphdWm7PlennD0rmfvfb9U1OvUeWLxnirAbqboxhjPU5dXxbjgRoPvVxttRcLrI6pKEUUE66lRN/fDE3ACEkHx/L/GxIgGPd+TQFb7rDoQHFFuL2qNJWuPGAHCdk30PPAzYMfvrx71BbAeKxRuUq2KLLGJgVl3cKO+RwX0P/sFo5mfHb0el4rYhgKc8jDpTb8PKqV9yIgrso7HbPzNdSU0XeKqbp3GwiURkXbx5r8nQPOmZYwasa+2nS5RZLTu94CsSWgrQ/c9oDCwgcbJ9u39Bx+gzocuV+qHSE8I0Mm29BZ3joqvT2b6A==
  • Cc: <ray.huang@xxxxxxx>, Penny Zheng <Penny.Zheng@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, "Julien Grall" <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Sun, 03 Aug 2025 09:50:51 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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 <Penny.Zheng@xxxxxxx>
---
 xen/arch/x86/configs/pvshim_defconfig | 1 +
 xen/common/Kconfig                    | 5 ++++-
 xen/common/Makefile                   | 2 +-
 xen/include/hypercall-defs.c          | 4 ++++
 4 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/configs/pvshim_defconfig 
b/xen/arch/x86/configs/pvshim_defconfig
index c58c29adb0..c100b84fa8 100644
--- a/xen/arch/x86/configs/pvshim_defconfig
+++ b/xen/arch/x86/configs/pvshim_defconfig
@@ -25,3 +25,4 @@ CONFIG_EXPERT=y
 # CONFIG_DEBUG is not set
 # CONFIG_GDBSX is not set
 # CONFIG_SYSCTL is not set
+# CONFIG_DOMCTL is not set
diff --git a/xen/common/Kconfig b/xen/common/Kconfig
index 24a7b83af9..31db3d448b 100644
--- a/xen/common/Kconfig
+++ b/xen/common/Kconfig
@@ -629,7 +629,10 @@ config SYSCTL
 
 config DOMCTL
        bool "Enable domctl hypercall"
-       def_bool y
+       default y
+       help
+         This option shall only be disabled on some dom0less systems, or
+         PV shim on x86, to reduce Xen footprint.
 
 endmenu
 
diff --git a/xen/common/Makefile b/xen/common/Makefile
index 756ddf52c3..fc83a45b60 100644
--- a/xen/common/Makefile
+++ b/xen/common/Makefile
@@ -11,7 +11,7 @@ obj-$(filter-out $(CONFIG_X86),$(CONFIG_ACPI)) += device.o
 obj-$(CONFIG_DEVICE_TREE_PARSE) += device-tree/
 obj-$(CONFIG_IOREQ_SERVER) += dm.o
 obj-y += domain.o
-obj-y += domctl.o
+obj-$(CONFIG_DOMCTL) += domctl.o
 obj-y += event_2l.o
 obj-y += event_channel.o
 obj-$(CONFIG_EVTCHN_FIFO) += event_fifo.o
diff --git a/xen/include/hypercall-defs.c b/xen/include/hypercall-defs.c
index c70f745ac2..ccc38e5e22 100644
--- a/xen/include/hypercall-defs.c
+++ b/xen/include/hypercall-defs.c
@@ -197,7 +197,9 @@ dm_op(domid_t domid, unsigned int nr_bufs, xen_dm_op_buf_t 
*bufs)
 #ifdef CONFIG_SYSCTL
 sysctl(xen_sysctl_t *u_sysctl)
 #endif
+#ifdef CONFIG_DOMCTL
 domctl(xen_domctl_t *u_domctl)
+#endif
 #if PG_log_dirty
 paging_domctl_cont(xen_domctl_t *u_domctl)
 #endif
@@ -280,7 +282,9 @@ hvm_op                             do       do       do     
  do       do
 #ifdef CONFIG_SYSCTL
 sysctl                             do       do       do       do       do
 #endif
+#ifdef CONFIG_DOMCTL
 domctl                             do       do       do       do       do
+#endif
 #ifdef CONFIG_KEXEC
 kexec_op                           compat   do       -        -        -
 #endif
-- 
2.34.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.