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

[PATCH v4 24/24] xen: move MGMT_HYPERCALLS out of PV_SHIM_EXCLUSIVE


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Penny Zheng <Penny.Zheng@xxxxxxx>
  • Date: Fri, 21 Nov 2025 18:58:01 +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=ZHVEQoOxexn5927jgQl87XVwlTFpequA1CFs0WVDAOc=; b=T9Y9cUQSSOorL3qysJ5IkttF68oK8RMtbW/toLJzV1YmWCm+yOOOw2h3PFp4pYyS8+VHHjymFN6DfqJ58cHboET95Ai51Uph+PqXWgHTfn/JNZqyYBMY7xXZ7I6v6NFwyyDYdiBVCfT7jBb6RZecuiB0uk00FgG5StVDtOyEbmzYKwLt+GFB4sqflN7BGBUz7kHz2I8tDznJeNtS9j3Kqd9iljKmLN9zaPjKr1i++iiLwWB6EIH4NJrMYVTYRDbtIUiofKE8cVOqu+G55DK3bxvm1UdpwmO6b9BtXR1y9/qZNE0/oc9/9rgGAX1ewrI79nId6zniKX5BxIkWlGBeaA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Y795LHqaRSkPETI0WU1hZJvzWj9hi6uvR6B3XZmSLsVw8kUioNCtCBUBzTVuA4t+my7F7f3TX1PiIpvNM8hx+DljU5s15NK7OP/PKtMcydw5RTNG0S4hHYGZGQjegZeRZN0fYO/GEMaUynjX8ezir1HqqwmVthKSE+J3CAEEHOCVkhhPU0Y4Zb5fIknWwnEonv+SFCSMXsw+djh5mFNOHfqM4FDMdUiOfqHbe5yTIJT2QdWzRa91JlKX2rm3A1bGfbB3zKbsiyv0WeQ+vqhBh+BSJ0KaCSi2TFA7WUjT00xWuaaNnP+IJTHl7At1VJRlCdo8gmh9OXCPm6+E+8m2iQ==
  • Cc: <ray.huang@xxxxxxx>, <grygorii_strashko@xxxxxxxx>, 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: Fri, 21 Nov 2025 11:01:28 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

As we're aiming at moving away from PV_SHIM_EXCLUSIVE=y, we are
moving MGMT_HYPERCALLS out of it.

Signed-off-by: Penny Zheng <Penny.Zheng@xxxxxxx>
---
v3 -> v4:
- new commit
---
 xen/arch/x86/Makefile             |  2 +-
 xen/arch/x86/hvm/Kconfig          |  1 -
 xen/arch/x86/include/asm/paging.h |  2 +-
 xen/common/Kconfig                |  1 -
 xen/common/Makefile               |  5 +----
 xen/include/hypercall-defs.c      | 10 ++--------
 xen/include/xen/domain.h          |  4 ----
 7 files changed, 5 insertions(+), 20 deletions(-)

diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
index 006a6e56d3..3aea179838 100644
--- a/xen/arch/x86/Makefile
+++ b/xen/arch/x86/Makefile
@@ -30,6 +30,7 @@ obj-bin-y += dmi_scan.init.o
 obj-y += domain.o
 obj-bin-y += dom0_build.init.o
 obj-y += domain_page.o
+obj-$(CONFIG_MGMT_HYPERCALLS) += domctl.o
 obj-y += e820.o
 obj-y += emul-i8254.o
 obj-y += extable.o
@@ -79,7 +80,6 @@ obj-$(CONFIG_VM_EVENT) += vm_event.o
 obj-y += xstate.o
 
 ifneq ($(CONFIG_PV_SHIM_EXCLUSIVE),y)
-obj-$(CONFIG_MGMT_HYPERCALLS) += domctl.o
 obj-y += platform_hypercall.o
 obj-$(CONFIG_COMPAT) += x86_64/platform_hypercall.o
 endif
diff --git a/xen/arch/x86/hvm/Kconfig b/xen/arch/x86/hvm/Kconfig
index 52b22e5d17..3351afc5a1 100644
--- a/xen/arch/x86/hvm/Kconfig
+++ b/xen/arch/x86/hvm/Kconfig
@@ -1,6 +1,5 @@
 menuconfig HVM
        bool "HVM support"
-       depends on !PV_SHIM_EXCLUSIVE
        default !PV_SHIM
        select COMPAT
        select IOREQ_SERVER
diff --git a/xen/arch/x86/include/asm/paging.h 
b/xen/arch/x86/include/asm/paging.h
index ba5ba7324e..db3e5b8f31 100644
--- a/xen/arch/x86/include/asm/paging.h
+++ b/xen/arch/x86/include/asm/paging.h
@@ -55,7 +55,7 @@
 #define PG_translate   0
 #define PG_external    0
 #endif
-#if defined(CONFIG_PAGING) && !defined(CONFIG_PV_SHIM_EXCLUSIVE) && 
defined(CONFIG_MGMT_HYPERCALLS)
+#if defined(CONFIG_PAGING) && defined(CONFIG_MGMT_HYPERCALLS)
 /* Enable log dirty mode */
 #define PG_log_dirty   (XEN_DOMCTL_SHADOW_ENABLE_LOG_DIRTY << PG_mode_shift)
 #else
diff --git a/xen/common/Kconfig b/xen/common/Kconfig
index 5aecb88680..d396ac94ab 100644
--- a/xen/common/Kconfig
+++ b/xen/common/Kconfig
@@ -653,7 +653,6 @@ menu "Supported hypercall interfaces"
 
 config MGMT_HYPERCALLS
        bool "Enable privileged hypercalls for system management"
-       depends on !PV_SHIM_EXCLUSIVE
        help
          Management hypercalls provide the means for dom0 to manage the
          overall Xen system and other domains, including sysctl, domctl, etc.
diff --git a/xen/common/Makefile b/xen/common/Makefile
index e0afc89591..45c0bda000 100644
--- a/xen/common/Makefile
+++ b/xen/common/Makefile
@@ -11,6 +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-$(CONFIG_MGMT_HYPERCALLS) += domctl.o
 obj-y += domid.o
 obj-y += event_2l.o
 obj-y += event_channel.o
@@ -70,10 +71,6 @@ obj-bin-$(CONFIG_X86) += $(foreach n,decompress bunzip2 unxz 
unlzma lzo unlzo un
 
 obj-$(CONFIG_COMPAT) += $(addprefix compat/,domain.o memory.o multicall.o 
xlat.o)
 
-ifneq ($(CONFIG_PV_SHIM_EXCLUSIVE),y)
-obj-$(CONFIG_MGMT_HYPERCALLS) += domctl.o
-endif
-
 extra-y := symbols-dummy.o
 
 obj-$(CONFIG_COVERAGE) += coverage/
diff --git a/xen/include/hypercall-defs.c b/xen/include/hypercall-defs.c
index 5343fd7a6f..ae56383bf7 100644
--- a/xen/include/hypercall-defs.c
+++ b/xen/include/hypercall-defs.c
@@ -196,13 +196,11 @@ dm_op(domid_t domid, unsigned int nr_bufs, 
xen_dm_op_buf_t *bufs)
 #endif
 #ifdef CONFIG_MGMT_HYPERCALLS
 sysctl(xen_sysctl_t *u_sysctl)
-#if defined(CONFIG_X86) && defined(CONFIG_PAGING) && 
!defined(CONFIG_PV_SHIM_EXCLUSIVE)
+#if defined(CONFIG_X86) && defined(CONFIG_PAGING)
 paging_domctl_cont(xen_domctl_t *u_domctl)
 #endif
-#ifndef CONFIG_PV_SHIM_EXCLUSIVE
 domctl(xen_domctl_t *u_domctl)
 #endif
-#endif
 #ifndef CONFIG_PV_SHIM_EXCLUSIVE
 platform_op(xen_platform_op_t *u_xenpf_op)
 #endif
@@ -281,10 +279,8 @@ hvm_op                             do       do       do    
   do       do
 #endif
 #ifdef CONFIG_MGMT_HYPERCALLS
 sysctl                             do       do       do       do       do
-#ifndef CONFIG_PV_SHIM_EXCLUSIVE
 domctl                             do       do       do       do       do
 #endif
-#endif
 #ifdef CONFIG_KEXEC
 kexec_op                           compat   do       -        -        -
 #endif
@@ -300,10 +296,8 @@ dm_op                              compat   do       
compat   do       do
 hypfs_op                           do       do       do       do       do
 #endif
 mca                                do       do       -        -        -
-#if defined(CONFIG_X86) && defined(CONFIG_PAGING) && 
!defined(CONFIG_PV_SHIM_EXCLUSIVE)
-#ifdef CONFIG_MGMT_HYPERCALLS
+#if defined(CONFIG_X86) && defined(CONFIG_PAGING) && 
defined(CONFIG_MGMT_HYPERCALLS)
 paging_domctl_cont                 do       do       do       do       -
 #endif
-#endif
 
 #endif /* !CPPCHECK */
diff --git a/xen/include/xen/domain.h b/xen/include/xen/domain.h
index aa86a9f460..6d8cb9690c 100644
--- a/xen/include/xen/domain.h
+++ b/xen/include/xen/domain.h
@@ -185,11 +185,7 @@ struct vnuma_info {
     struct xen_vmemrange *vmemrange;
 };
 
-#ifndef CONFIG_PV_SHIM_EXCLUSIVE
 void vnuma_destroy(struct vnuma_info *vnuma);
-#else
-static inline void vnuma_destroy(struct vnuma_info *vnuma) { ASSERT(!vnuma); }
-#endif
 
 #ifdef CONFIG_VMTRACE
 extern bool vmtrace_available;
-- 
2.34.1




 


Rackspace

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