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

[PATCH v3 03/28] xen/altp2m: move p2m_set_suppress_ve_multi() forward


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Penny Zheng <Penny.Zheng@xxxxxxx>
  • Date: Mon, 13 Oct 2025 18:15:15 +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=Mql/dsfaYIKIOGvkNWnbjlJZEqTDwvDfgY4DWzwyQkk=; b=bsOrAtrTcDWg6rY9MHtfgy6ywgSVRymTPgNP/OArCd+4N8yvvsm6aHAx9qtSpWBFvTZIGs8Y9/aizgJ2akdfF2D7UOkq0xwEb7Qfy274RVmYCc5p1it7ZPVBNjTMBF+ZTKAkdpnewgSvcqs4+J8ANJowSMjOxnopYebMPUOM1HqjC0qfHC0KNFJog4zOHrVfd5GDmcXsKjm0oeUD4ajJPTKKEVFlL5vc2QZgV6cbo6PS8hctq2gkc8gBC9vrvUOz2GcnQb2zoYPjq/u5pFtsWb6JrfpYNKGN6dM8ur5Z2toze+obGtQ71NW5kVWnmK7KpoIr6Dd0k6wxzFMZ3x3pEA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=DDNrXw4NO1ytbAkC1dKDJNq7Z5lDZhMsZb4JJrF4zLHspnacHRCa71jpv9rudCQ2rrE6DxYze2VJLzFDOwfqWaGD3lTGPJA5NxofVv315n0cJ5UVo6i/KA9sjQEJgSbQSzlSWiYxUksk5k2fkiYAKw/8111p8UCoDDuXU1CTlgm/3XFG1XXtshYeDvbwNFufreXTWtRZf/rTL8TWFAsPDqG2/3StqZMU6t1VqtYbUrJf0OEVeJnTTG4ny9eX+2YO8+Jo3uLZTPCTq0xS2kQ0VZkCYV3/u8OayroGdEn6Rbn/0BQfGdF/dUi3h66zZTHQw+k1/EguvMC2jAmp4TL1EA==
  • Cc: <ray.huang@xxxxxxx>, <oleksii.kurochko@xxxxxxxxx>, Penny Zheng <Penny.Zheng@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Mon, 13 Oct 2025 10:16:43 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

The declaration of p2m_set_suppress_ve_multi() is in <asm/mem_access.h> and
hasn't been included on compiling altp2m.o when VM_EVENT=n, resulting in
undefined error.
To fix it, we could simply move p2m_set_suppress_ve_multi() forward.

Signed-off-by: Penny Zheng <Penny.Zheng@xxxxxxx>
---
v2 -> v3:
- new commit
---
 xen/arch/x86/mm/altp2m.c | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/xen/arch/x86/mm/altp2m.c b/xen/arch/x86/mm/altp2m.c
index 0261360aae..962111fbb0 100644
--- a/xen/arch/x86/mm/altp2m.c
+++ b/xen/arch/x86/mm/altp2m.c
@@ -640,23 +640,6 @@ int p2m_altp2m_propagate_change(struct domain *d, gfn_t 
gfn,
     return ret;
 }
 
-/*
- * Set/clear the #VE suppress bit for a page.  Only available on VMX.
- */
-int p2m_set_suppress_ve(struct domain *d, gfn_t gfn, bool suppress_ve,
-                        unsigned int altp2m_idx)
-{
-    int rc;
-    struct xen_hvm_altp2m_suppress_ve_multi sve = {
-        altp2m_idx, suppress_ve, 0, 0, gfn_x(gfn), gfn_x(gfn), 0
-    };
-
-    if ( !(rc = p2m_set_suppress_ve_multi(d, &sve)) )
-        rc = sve.first_error;
-
-    return rc;
-}
-
 /*
  * Set/clear the #VE suppress bit for multiple pages.  Only available on VMX.
  */
@@ -725,6 +708,23 @@ int p2m_set_suppress_ve_multi(struct domain *d,
     return rc;
 }
 
+/*
+ * Set/clear the #VE suppress bit for a page.  Only available on VMX.
+ */
+int p2m_set_suppress_ve(struct domain *d, gfn_t gfn, bool suppress_ve,
+                        unsigned int altp2m_idx)
+{
+    int rc;
+    struct xen_hvm_altp2m_suppress_ve_multi sve = {
+        altp2m_idx, suppress_ve, 0, 0, gfn_x(gfn), gfn_x(gfn), 0
+    };
+
+    if ( !(rc = p2m_set_suppress_ve_multi(d, &sve)) )
+        rc = sve.first_error;
+
+    return rc;
+}
+
 int p2m_get_suppress_ve(struct domain *d, gfn_t gfn, bool *suppress_ve,
                         unsigned int altp2m_idx)
 {
-- 
2.34.1




 


Rackspace

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