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

[PATCH] device-tree: Move Arm's static-evtchn feature to common


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Tue, 27 May 2025 10:21:17 +0200
  • 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=W0Z01jTySH/EuzySEtYep7TaxXxwh8oPDWV487W9Gjo=; b=XcupaXMNCZ1Jsf3KKG+bmyuWvwzfe4dbhpV17E7KvmXDqnzS/SP552RvBZj90u01MNvKNcwa9N54uIgCKtlc1062C9e7AQNJG0dx2551SxJAeDZenBPHeX+zaWODYbV7zunTqDorgMZ/TYkx4l5EmeWPwEqynmwlfx6h1ax1/Hrpp5DLUwo3X/9H7AdiJ7es6UYENPgB531Xpj3tWprI/jglIQrZi9yMCj/zOeqMCDdcw0zPYb20BiDT2ULKwE6U7AJBRwzVFne7ENiZ+o0Jlxso23LGw2rlYXVZF476b7r3KMh2Id8pSpyr9WPkAYABr9qbQu6+obDOebGSXzhkbQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=uPfW6FHIi0EOMa1iJwafhJivyP2sCXK7bYjaqWBerQ3Ege+2upNOSG9dGG4n4Hn9tOu17A2bdOHPRwlNi+KfNB+DlE1uZXKsrH1rM6kdMuwrGGuigGQMaVtcd/xQ/eq4mOhDXmURM5vbXk0VIJWawkZM3nbCMWtvHDqe6BkhmMzzYeX72iO22Rb9s2y8fQnIK7DyxI75Scj5XJt5hAfI8YAczhBJkVhG7EMVmvUr2d6DDUpyYO3lecuCF4sieZsp7gkpqZ7ctj3tElPssGY+KKJKunCj1l9umlMgCNf0oegiLBSJ4DkzPP4wJLXHbW428Tw/cflrPYhAATICgvo67A==
  • Cc: Michal Orzel <michal.orzel@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Tue, 27 May 2025 08:21:50 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

There's nothing Arm specific about this feature. Move it to common as
part of a larger activity to commonalize device tree related features.
For now, select it only for ARM until others (e.g. RISC-V) verify it
works for them too.

Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>
---
Other candidates: static memory, shared memory
---
 xen/arch/arm/Kconfig                                      | 8 --------
 xen/arch/arm/Makefile                                     | 1 -
 xen/arch/arm/setup.c                                      | 2 +-
 xen/common/Kconfig                                        | 8 ++++++++
 xen/common/device-tree/Makefile                           | 1 +
 xen/{arch/arm => common/device-tree}/static-evtchn.c      | 3 +--
 xen/{arch/arm/include/asm => include/xen}/static-evtchn.h | 6 +++---
 7 files changed, 14 insertions(+), 15 deletions(-)
 rename xen/{arch/arm => common/device-tree}/static-evtchn.c (99%)
 rename xen/{arch/arm/include/asm => include/xen}/static-evtchn.h (77%)

diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
index a5aad97a688e..57919d8b3ac8 100644
--- a/xen/arch/arm/Kconfig
+++ b/xen/arch/arm/Kconfig
@@ -253,14 +253,6 @@ config STATIC_SHM
        help
          This option enables statically shared memory on a dom0less system.
 
-config STATIC_EVTCHN
-       bool "Static event channel support on a dom0less system"
-       depends on DOM0LESS_BOOT
-       default y
-       help
-         This option enables establishing static event channel communication
-         between domains on a dom0less system (domU-domU as well as domU-dom0).
-
 config PARTIAL_EMULATION
        bool "Enable partial emulation of system/coprocessor registers"
        default y
diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile
index 129a109d6ec5..eeeac4e653ec 100644
--- a/xen/arch/arm/Makefile
+++ b/xen/arch/arm/Makefile
@@ -51,7 +51,6 @@ obj-y += setup.o
 obj-y += shutdown.o
 obj-y += smp.o
 obj-y += smpboot.o
-obj-$(CONFIG_STATIC_EVTCHN) += static-evtchn.init.o
 obj-$(CONFIG_STATIC_MEMORY) += static-memory.init.o
 obj-$(CONFIG_STATIC_SHM) += static-shmem.init.o
 obj-y += sysctl.o
diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index 10b46d068405..734e23da4408 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -31,6 +31,7 @@
 #include <xen/version.h>
 #include <xen/vmap.h>
 #include <xen/stack-protector.h>
+#include <xen/static-evtchn.h>
 #include <xen/trace.h>
 #include <xen/libfdt/libfdt-xen.h>
 #include <xen/acpi.h>
@@ -39,7 +40,6 @@
 #include <asm/alternative.h>
 #include <asm/dom0less-build.h>
 #include <asm/page.h>
-#include <asm/static-evtchn.h>
 #include <asm/current.h>
 #include <asm/setup.h>
 #include <asm/gic.h>
diff --git a/xen/common/Kconfig b/xen/common/Kconfig
index 3d66d0939738..0951d4c2f286 100644
--- a/xen/common/Kconfig
+++ b/xen/common/Kconfig
@@ -162,6 +162,14 @@ config STATIC_MEMORY
 
          If unsure, say N.
 
+config STATIC_EVTCHN
+       bool "Static event channel support on a dom0less system"
+       depends on DOM0LESS_BOOT && ARM
+       default y
+       help
+         This option enables establishing static event channel communication
+         between domains on a dom0less system (domU-domU as well as domU-dom0).
+
 menu "Speculative hardening"
 
 config INDIRECT_THUNK
diff --git a/xen/common/device-tree/Makefile b/xen/common/device-tree/Makefile
index 831b91399b74..2df7eb27222e 100644
--- a/xen/common/device-tree/Makefile
+++ b/xen/common/device-tree/Makefile
@@ -6,3 +6,4 @@ obj-$(CONFIG_DOM0LESS_BOOT) += dom0less-build.o
 obj-$(CONFIG_OVERLAY_DTB) += dt-overlay.o
 obj-y += intc.o
 obj-$(CONFIG_DOMAIN_BUILD_HELPERS) += kernel.o
+obj-$(CONFIG_STATIC_EVTCHN) += static-evtchn.init.o
diff --git a/xen/arch/arm/static-evtchn.c 
b/xen/common/device-tree/static-evtchn.c
similarity index 99%
rename from xen/arch/arm/static-evtchn.c
rename to xen/common/device-tree/static-evtchn.c
index 49db08d5c6fc..8b82e6b3d8a6 100644
--- a/xen/arch/arm/static-evtchn.c
+++ b/xen/common/device-tree/static-evtchn.c
@@ -1,8 +1,7 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 
 #include <xen/event.h>
-
-#include <asm/static-evtchn.h>
+#include <xen/static-evtchn.h>
 
 #define STATIC_EVTCHN_NODE_SIZE_CELLS 2
 
diff --git a/xen/arch/arm/include/asm/static-evtchn.h 
b/xen/include/xen/static-evtchn.h
similarity index 77%
rename from xen/arch/arm/include/asm/static-evtchn.h
rename to xen/include/xen/static-evtchn.h
index f964522f6a62..31ae92741aad 100644
--- a/xen/arch/arm/include/asm/static-evtchn.h
+++ b/xen/include/xen/static-evtchn.h
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 
-#ifndef __ASM_STATIC_EVTCHN_H_
-#define __ASM_STATIC_EVTCHN_H_
+#ifndef XEN_STATIC_EVTCHN_H
+#define XEN_STATIC_EVTCHN_H
 
 #ifdef CONFIG_STATIC_EVTCHN
 
@@ -13,7 +13,7 @@ static inline void alloc_static_evtchn(void) {};
 
 #endif /* CONFIG_STATIC_EVTCHN */
 
-#endif /* __ASM_STATIC_EVTCHN_H_ */
+#endif /* XEN_STATIC_EVTCHN_H */
 
 /*
  * Local variables:
-- 
2.25.1




 


Rackspace

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