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

[RFC PATCH v6 39/43] x86/altp2m: Add altp2m_reset_altp2m declaration to arch header


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Rose Spangler <Rose.Spangler@xxxxxxxxxxxxxx>
  • Date: Mon, 20 Apr 2026 17:32:02 -0400
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 40.93.1.110) 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=+XnwEw2LkEZsqrQt7TCPVOkF1Np7ZHiylY2Nnd/lA20=; b=YosoNoBUx/1PByQi96zDzHPdjtE0qhu3dOB+G6wGpHNoPWo2qCIAbKNn06h+53cxl1pmx4cAWd+dK9V4edtimHeyMcOA+nO4E3juynjRHD3H0scF8Snj2xqxLwJfv+nhPWm9+YalcGbuabQPOvPFOonposDTQFOZvONb5a3S5no6AXLaX3go7H76yiEfKgJg0U/DBE5DjkRhVM8h7dI4ZAWFj6xwhOHAbUOPc8/4pB8PIpeV8zLE8+3VEd6lUZykiEZBGfZ3czdIAFkooHcb+vU1gzyUtMIdVHiXS7Qs+y1HDR2s1d7WA4w8I62c6DS0lO9+nboZBwqpajhwNoh8Cw==
  • 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=+XnwEw2LkEZsqrQt7TCPVOkF1Np7ZHiylY2Nnd/lA20=; b=jG5/hAnuJK7rRtpZFBzH3MbvyLJzgmcmPOF9/M4jFlVOsi5dUWbrjMsFnbUontAd0XMCpl1XCP6V/+ZaQri2aKEtbtJap6xeb8LcGlA6RQeFXwJ5l+O261Iq0Ark4kv4S7d8mz8mAmv4FfUMKPfmqU8weycri1BRlugVKd8QtiOeA8hd9rBwTfsIy5gG1rwXLgBjluHuP8dOTQnclNQYXF2HcyQ5rbRDJTAKUMWCi3vGNh8GDNYibej6kZ/LbyWmBXEXPFhz6EJDKK8teFAZvN66HaRYW79ynrnlPPGA71pLo/Bk0ZHP/ILS6h4dZt2dbn7Q2VvGhAeLYn2iNhgqWg==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=qy7UIJL/oN9FpqFvzzZX+5OdMbiJFhvoafWRadBDZTleAPIPY3HIfHAKDepSmpxwZMFGjOPb9/94NDEUX+lEElIZdBS0Mz4KfHafrDt27XCu8YSDIzp0YrAxlbbmJZgHT9M5NLty5YG3REnS7oxcEePWnxaMLaLEMbJBJqCe56jRuvuXRy4bwUbERNrk79WkepqrTUVeqFcpYXN0I8lbwBhKOXY85le7fqYd/X4EVC9wS4U7c7vhgawDAMV8oIjUAqfgzpqxw156yO11Ax1vjnSTWiLW2h4tLiZmf7yDYGbcHAgL3qnp4TzLOMDB5myCFABsXPYI9arkOlpqYBMPSw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=CTALkUp0W1HYpm/ttqRs3aAkLj/U7l9l6Ho1hmYAK6Z2t6r84G6g8/I4u9tQIzr0gKWny/L6sI/nE3mjNkMHuSE8SqWdkftJTw4zZMJSx0J0LnvDdaWYZhwTyddXihrqueyXLZoWkxJG6r5lNZsdbh1PTszn61bWmazaO9ECQ6kHdv/6dzbn0dxPhmQaRZcOAdqFKc31p5zIVRAeN2kAybuoxaJRje1iX4Vr1XhmBuQHOKNX1MqWICkcdGix6RdsbqKDV5/8UIBq2qGepLKYj66NgK/61WRrA/sJp3iGOi/LPsp9wNOW15l/4CEzI2i+Fof7UwWnyAqfhsvq5iS/ew==
  • 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:00 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

This commit makes altp2m_reset_altp2m non-static and adds a declaration to
the asm/altp2m.h header. This makes it possible to call this function in
common altp2m routines. The altp2m_reset_type enum (which is the type of
one of the parameters of altp2m_reset) is also moved to the asm/altp2m.h
header.

This is commit 1/2 of the altp2m_reset_altp2m phase.

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

diff --git a/xen/arch/x86/include/asm/altp2m.h 
b/xen/arch/x86/include/asm/altp2m.h
index e7239326c71d..02b5e1a11220 100644
--- a/xen/arch/x86/include/asm/altp2m.h
+++ b/xen/arch/x86/include/asm/altp2m.h
@@ -92,6 +92,14 @@ 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);
 
+/* Reset an altp2m view */
+enum altp2m_reset_type {
+    ALTP2M_RESET,
+    ALTP2M_DEACTIVATE
+};
+void altp2m_reset_altp2m(struct domain *d, unsigned int idx,
+                         enum altp2m_reset_type reset_type);
+
 /* Activate an altp2m view */
 int altp2m_activate_altp2m(struct domain *d, unsigned int idx,
                            p2m_access_t hvmmem_default_access);
diff --git a/xen/arch/x86/mm/altp2m.c b/xen/arch/x86/mm/altp2m.c
index edbaf54c3761..18f8a71f1682 100644
--- a/xen/arch/x86/mm/altp2m.c
+++ b/xen/arch/x86/mm/altp2m.c
@@ -228,13 +228,8 @@ bool altp2m_get_or_propagate(struct p2m_domain *ap2m, 
unsigned long gfn_l,
     return true;
 }
 
-enum altp2m_reset_type {
-    ALTP2M_RESET,
-    ALTP2M_DEACTIVATE
-};
-
-static void altp2m_reset_altp2m(struct domain *d, unsigned int idx,
-                                enum altp2m_reset_type reset_type)
+void altp2m_reset_altp2m(struct domain *d, unsigned int idx,
+                         enum altp2m_reset_type reset_type)
 {
     struct p2m_domain *p2m;
 
-- 
2.34.1




 


Rackspace

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