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

[RFC PATCH v6 35/43] x86/altp2m: Add altp2m_activate_altp2m declaration to arch header


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Rose Spangler <Rose.Spangler@xxxxxxxxxxxxxx>
  • Date: Mon, 20 Apr 2026 17:31:58 -0400
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.4.14) smtp.rcpttodomain=citrix.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=QEvCOJ/znG1Y9sl6sTHGiqT4+0IS7dn5KAJvNg29AXA=; b=MxWUlEfcrpVoYzqNVVPHCZzZO75ITKUQlao7Ek6Uacs0FKGk4GfBqcBRCmXVkbW0Hp5pCbCkswRj9m4V1eLfglg0bGoetCCm3+MVHTYI0AwWkps5nNijowwL+uL9Z0hln1ip1SAQu+cfbKoABKLShY8eUKZSwGRQ9av7kwkOXGr9ELeulGUVW85N0H1WOUJzNDULENoTcWuO+mnX4ToTHMZsF4u6Kpqv3cuWEJi5U//ET/HUrNNtCqMx/EB3ESzLLeigXvNGgCTBjDCyt3LJZBF5iAmu3gLH1l3FBRpX9YEwqCf72VQG0WU9Of1Mvfyn1DMaO3B4XDgeMIWsMNcsMA==
  • 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=QEvCOJ/znG1Y9sl6sTHGiqT4+0IS7dn5KAJvNg29AXA=; b=W2chBkhQGzqDK7ZOi5GANLLfXMFIge4Xcd8GjcRSjlx0KCsxbTCSqezt7Ek/2+sUFMQDGkpTqWQkx+J066tiOwwv5xI9ajHwl9RbrvYh35q6rEglq3RyPst59Ky20hI9kWzsOxqwHB0BOXQlrNiyeMKRnB8cusMFRYFlreGk3J3hb2KRpToLgLanjGtRfgQF64SO4FrTomqfVHxwFikj/F6XtznF38b6JUk+Oe8ckYc74FBkOv4SU+7elGI0A2DI+w/tQ6gfz5Oh8sFCsWCQnc0eJgUjO/0ZqU21kc5ZUml+Y9dUh0BRM8JgljF+K+Xz6RyAwxDvM4itTSUPEqTiPw==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=lLcQhj/cooPYNVDOhU8AHbM2Jk2L6WGxDQ0qBn1NSyJQsabo4Eg4BdAIvhpneo6lLVYEGYjOlstvewbv+lsAgxsn9pVI9FHkJMKuZXN6Yz6eQpeBMsONKZxSklcmpBqo8WKlKX5/78LUKJHDUquXGHkHJfVRmU6gwlPIVSBmbvCyJQ/lcV6l2HQPqcZrbr36c8KW4nbQxlyiRcGqIm4G1jHDVWbYla99Az3XHSKkh1BUoru2aElskEBTDHCP6eKr5+bfpL60ByWJe5dwBdOPSEllf1ohXsxDZpX8SwZAttVABcyOoc2oW4qWTuTgU9WTZYbSZQE1aMeE4ogHrcL8MA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=v2mqqgVdbMoQfn8/kR8qFsSIBGW5aXDzoO2yWM5hVgDzKRp8/EIqZydLsnV4bFxWQK/iomL7tFtLUwzm50/0H3RM3y82kLKr3egpoRr/s4B1nsJXoR1DVyoldJDlMqJ19jYYLxIAkIjY2nalZXl/Y4+BloqaS639T4wwyL/XltCLQwHL1eOAWFQ9MQISN9Js8ONKy2NB5JEH/zf2mgNixtoSQPs0VvX9QfIGhoOhsdi2V+/Ufz5nlU3mLObcqo7M6wjNo0Ba3Wz7pTyBd+FYMKqwChtNjljgbNJHPEduoO6HDjsRCBDl9rq6jx8WvPfVXngdMfwYVCjVeC/Q1GgMNw==
  • 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>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Teddy Astie <teddy.astie@xxxxxxxxxx>
  • Delivery-date: Mon, 20 Apr 2026 21:34:05 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

This commit adds a declaration for altp2m_activate_altp2m to the x86
asm/altp2m.h header. This makes it possible to call the function in common
altp2m routines (namely, altp2m_init_by_id).

This is commit 1/2 of the altp2m_activate_altp2m phase.

Signed-off-by: Rose Spangler <Rose.Spangler@xxxxxxxxxxxxxx>
---
v6: Introduced this patch.
---
 xen/arch/x86/include/asm/altp2m.h | 4 ++++
 xen/arch/x86/mm/altp2m.c          | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/include/asm/altp2m.h 
b/xen/arch/x86/include/asm/altp2m.h
index 99c4cfa5a68b..203dba44e2bf 100644
--- a/xen/arch/x86/include/asm/altp2m.h
+++ b/xen/arch/x86/include/asm/altp2m.h
@@ -95,6 +95,10 @@ int altp2m_init_next_available(struct domain *d, uint16_t 
*idx,
 /* Make a specific alternate p2m invalid */
 int altp2m_destroy_by_id(struct domain *d, unsigned int idx);
 
+/* Activate an altp2m view */
+int altp2m_activate_altp2m(struct domain *d, unsigned int idx,
+                           p2m_access_t hvmmem_default_access);
+
 /* Switch alternate p2m for entire domain */
 int altp2m_switch_domain_altp2m_by_id(struct domain *d, unsigned int idx);
 
diff --git a/xen/arch/x86/mm/altp2m.c b/xen/arch/x86/mm/altp2m.c
index 8672b8c061d3..40c6ea72a621 100644
--- a/xen/arch/x86/mm/altp2m.c
+++ b/xen/arch/x86/mm/altp2m.c
@@ -274,8 +274,8 @@ void altp2m_flush(struct domain *d)
     altp2m_unlock(d);
 }
 
-static int altp2m_activate_altp2m(struct domain *d, unsigned int idx,
-                                  p2m_access_t hvmmem_default_access)
+int altp2m_activate_altp2m(struct domain *d, unsigned int idx,
+                           p2m_access_t hvmmem_default_access)
 {
     struct p2m_domain *hostp2m, *p2m;
     int rc;
-- 
2.34.1




 


Rackspace

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