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

[RFC PATCH v6 06/43] arm/altp2m: Add template arch-specific altp2m.c/altp2m.h


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Rose Spangler <Rose.Spangler@xxxxxxxxxxxxxx>
  • Date: Mon, 20 Apr 2026 17:31:29 -0400
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.10.100) smtp.rcpttodomain=amd.com smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=pass (signature was verified) header.d=elektrobit.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=elektrobit.com] dmarc=[1,1,header.from=elektrobit.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 213.95.148.172) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=elektrobit.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=elektrobit.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=2; 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=jRLoxsuohqR21r1f42+aEEmWEGpw45nncUOaZm3GjeU=; b=c5DkqDZoYTKO5tmso894USC4bJ/pHGtBEm8h1wKAQOfxjTO07WNahOtAOZAR8xOiZ7dpL1N+/5XPWI8Ze2+PT5KQaKpnOTIu45CiSdRWGpbHJYtzwBO1TckR/UKZvp+cyRmuQutq8XdWevpXaL0FwdB4ChcVl6ImhpyH6451GZiGYAyubWeG8UOdgTLrnopmRHLwRADN53eM1bQjWYaFwSZTfEZ2044OFo9SvkQnnJbqpXxaN73/v2wjib+Ilmgs/692noJ1ONsW8kYM5L2R79Quf+cR1Roh0a1T7U9FlT6UrE7/8yxdRlVX0EGx28egz7p9iAmMom4M2NJpjvI6AQ==
  • 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=jRLoxsuohqR21r1f42+aEEmWEGpw45nncUOaZm3GjeU=; b=q1yF3KDZwMkseeI5H+kHAV5Gqk9lj7gh4JukVIV0QLzhJ52TFPBC6MXkwJsx+bbF0ldMPFX+MUimPZLXsc/AQEpfksh1FFXgf1VD+jY/brdhPS7dSbxOGfgYHjF9xkl4zukgNwpbcJQ3CC6Ow0d4EYpor0zAQvq/Kl41QJKqsXzA9pFgwMnhkXuxoAHjBFiawJvmZ/FUY6BNZchZVGFeTJaFQMsNZQgFK0AAGj2a+11Nd48JdTSSGWyFTCDZexjHh2REUzEsbphjtJIcsw5NlTjOFD+09yfAJdfEGKaaXXBssrjIjH/QV6QpxUBL+pv9KKHvtBOJVlM2IN6GcnOuKg==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=CBku/OO9uCZfYzgquT9ALW8Jvi2QBUxOMb6L8RjFanCvZxlDeyiJlB86FjO9yZs177+UtS++9JCICv816RPNQZZC/Nz/JtaVMyGZlYIE7+xDrEaFuI56e5lft3aev35/Be722lXlr+o5J9nJuCqUGZpHerDEk6XKSnpLWS/S5NmUAR/05S/m+dhGdnlHdQLvEODfqZeajVQxtLzEqzkVH8cnLJ6rRfRhvDRRl4ZzRgOAhLagBNHpFLLW0poUePgkQC8atOXmxuLfc8MrgJOUowe/VybrEj9j21wmGh1mLkcF/YaG6WGBisqMmNSHWMQADXJUgdlrKHFGrTEkE4CMfQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jAm8tTt5RUhiro3ZwwmjvZTP+sBGxTJbVh4XB+9qYrtaapYcx4oUSDjW4P4ygFEf/FNdrygb7LjJ9PLk2Tajb04WRIFTb8SIHcD7ahx3G4wP0FRVGP/aQu+F/w4j/2ztWCI30mg5nyX1yYYKPbRJZ7YPCsoRkinw2z70KF7eVeD/sjt5z7vY73yNlTW+heiFQ3naEF1nSAsXSPvtquJFSzJ0vm95QFi3K8YYbmAQWrC5d+vSqmQW6/A1TabxRpLzMqohzTOoFsq3zCF8HHZoFU1Q+ADDNs9MfpFlKSBzvoQiqpzH0Tdz2DViVLiFbvAHy+gDMahr5IN5CsxzJnLFUg==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=elektrobit.com header.i="@elektrobit.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Cc: Rose Spangler <Rose.Spangler@xxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, "Volodymyr Babchuk" <Volodymyr_Babchuk@xxxxxxxx>, Aqib Javaid <Aqib.Javaid@xxxxxxxxxxxxxx>
  • Delivery-date: Mon, 20 Apr 2026 21:32:52 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Similarly to the earlier common altp2m.c/altp2m.h commit, this commit adds
a template altp2m.c and altp2m.h file for ARM to be added to in later
commits.  Creating a commit with just the template file additions makes it
easier to reorder later commits which add to these files.

This commit can be squashed into the first commit which actually adds
something to altp2m.c/altp2m.h for the actual submission if that would be
preferred.

This is commit 6/8 of the preparation phase.

Signed-off-by: Rose Spangler <Rose.Spangler@xxxxxxxxxxxxxx>
Signed-off-by: Aqib Javaid <Aqib.Javaid@xxxxxxxxxxxxxx>
---
v6: Introduced this patch.
---
 xen/arch/arm/Makefile             |  1 +
 xen/arch/arm/altp2m.c             | 16 +++++++++++++
 xen/arch/arm/include/asm/Makefile |  1 -
 xen/arch/arm/include/asm/altp2m.h | 37 +++++++++++++++++++++++++++++++
 4 files changed, 54 insertions(+), 1 deletion(-)
 create mode 100644 xen/arch/arm/altp2m.c
 create mode 100644 xen/arch/arm/include/asm/altp2m.h

diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile
index 69200b27280d..d995d4ff7aa1 100644
--- a/xen/arch/arm/Makefile
+++ b/xen/arch/arm/Makefile
@@ -12,6 +12,7 @@ obj-$(CONFIG_TEE) += tee/
 obj-$(CONFIG_HAS_VPCI) += vpci.o
 
 obj-$(CONFIG_HAS_ALTERNATIVE) += alternative.o
+obj-$(CONFIG_ALTP2M) += altp2m.o
 obj-y += cpuerrata.o
 obj-y += cpufeature.o
 obj-y += decode.o
diff --git a/xen/arch/arm/altp2m.c b/xen/arch/arm/altp2m.c
new file mode 100644
index 000000000000..2bd1ff4df223
--- /dev/null
+++ b/xen/arch/arm/altp2m.c
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * altp2m.c: Alternate p2m
+ *
+ * Copyright (c) 2016 Sergej Proskurin <proskurin@xxxxxxxxxxxxx>
+ */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff --git a/xen/arch/arm/include/asm/Makefile 
b/xen/arch/arm/include/asm/Makefile
index 4565baca6a4d..fef4dd42b6cb 100644
--- a/xen/arch/arm/include/asm/Makefile
+++ b/xen/arch/arm/include/asm/Makefile
@@ -1,5 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0-only
-generic-y += altp2m.h
 generic-y += device.h
 generic-y += hardirq.h
 generic-y += iocap.h
diff --git a/xen/arch/arm/include/asm/altp2m.h 
b/xen/arch/arm/include/asm/altp2m.h
new file mode 100644
index 000000000000..ca836bae7330
--- /dev/null
+++ b/xen/arch/arm/include/asm/altp2m.h
@@ -0,0 +1,37 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * altp2m.h: Alternate p2m
+ *
+ * Copyright (c) 2014, Intel Corporation.
+ * Copyright (c) 2016, Sergej Proskurin <proskurin@xxxxxxxxxxxxx>.
+ */
+
+#ifndef __ASM_ARM_ALTP2M_H
+#define __ASM_ARM_ALTP2M_H
+
+#include <xen/sched.h>
+
+static inline bool altp2m_supported(void)
+{
+    /* Not implemented yet */
+    return false;
+}
+
+/* Alternate p2m VCPU */
+static inline uint16_t altp2m_vcpu_idx(const struct vcpu *v)
+{
+    /* Not implemented yet */
+    BUG();
+    return 0;
+}
+
+#endif /* __ASM_ARM_ALTP2M_H */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
-- 
2.34.1




 


Rackspace

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