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

[Xen-devel] [PATCH V4 3/4] x86/mm: Pull out the p2m specifics from p2m_init_altp2m_ept


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Alexandru Stefan ISAILA <aisaila@xxxxxxxxxxxxxxx>
  • Date: Tue, 17 Dec 2019 15:12:34 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bitdefender.com; dmarc=pass action=none header.from=bitdefender.com; dkim=pass header.d=bitdefender.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oQQcj/kCLuqhEOjPzK84oKJ2erIYwHMpYTAxWNLBGWk=; b=E6pimmRW2Xk6NXhv8fQkEsbdZfI93flSsEdqhhdYiXQY/6ZMPzK/sr6f9ITblpDFrhlmP4BtZkAYFo1xzzSd2s6ziav2lgYS75uEl/iiUJkFtOT5ORsA5JiwaSsp90ftLrchYoJk3idKNdGJaWNlXbPv9AGh5vwxLWfVmByCV5a0DN77OffXEedL/Y87K+kKtd2nj53EoxCIZqEK9xqRHDtDOLM5vHFKlTMuPyoe8FNdAVlNRovc6UwQu4mOkEnCy6v5Cw1oSE8LagCEQ/UZ9rE0aeAQf1HQmwveWAMA8GCkRSufPY38641qL0AUr2kA8br2R3Tvctz0uBZrGZ6z4A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UsqQ+JVzdelMk0G3Moh1xKAmfnKsezG16wWxRv/mqjT3V6s2GNwUqgNT+lpp4SZpq2doC/OIMysd4ppbyqYrx/VfZhprsIiHvlJGlOaRrL4lBtr6j4KY9+IosqGWAV1EuDzu70MfKSQ48uqiMHy41joCZpN7LjbP9JDokV1bQdeMKVZ8m+Y2M2KSKnc8fLYohKy9CD8n+/Y12lpTK1GC8jsV2WCVD6BJSCZ54lVS7H5gO4IsVWB3BtKDpBQX9I6i44cBm9lsYNgyy4d4dgRzz3ynS2JdAtjOqaP3w1sLmklcYS6yB5wPU9pCVl6Ne5hcEC1fYVxDLDbHAmjACglAJA==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=aisaila@xxxxxxxxxxxxxxx;
  • Cc: Kevin Tian <kevin.tian@xxxxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>, Wei Liu <wl@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Alexandru Stefan ISAILA <aisaila@xxxxxxxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Tue, 17 Dec 2019 15:12:52 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVtOxpSoGNE4L+skG6HNN4NefFyg==
  • Thread-topic: [PATCH V4 3/4] x86/mm: Pull out the p2m specifics from p2m_init_altp2m_ept

Signed-off-by: Alexandru Isaila <aisaila@xxxxxxxxxxxxxxx>
---
CC: Jun Nakajima <jun.nakajima@xxxxxxxxx>
CC: Kevin Tian <kevin.tian@xxxxxxxxx>
CC: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
CC: Jan Beulich <jbeulich@xxxxxxxx>
CC: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CC: Wei Liu <wl@xxxxxxx>
CC: "Roger Pau Monné" <roger.pau@xxxxxxxxxx>
---
 xen/arch/x86/mm/p2m-ept.c | 6 ------
 xen/arch/x86/mm/p2m.c     | 6 ++++++
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-ept.c
index e088a63f56..362f7079ab 100644
--- a/xen/arch/x86/mm/p2m-ept.c
+++ b/xen/arch/x86/mm/p2m-ept.c
@@ -1358,13 +1358,7 @@ void p2m_init_altp2m_ept(struct domain *d, unsigned int 
i)
     struct p2m_domain *hostp2m = p2m_get_hostp2m(d);
     struct ept_data *ept;
 
-    p2m->default_access = hostp2m->default_access;
-    p2m->domain = hostp2m->domain;
-
-    p2m->global_logdirty = hostp2m->global_logdirty;
     p2m->ept.ad = hostp2m->ept.ad;
-    p2m->min_remapped_gfn = gfn_x(INVALID_GFN);
-    p2m->max_mapped_pfn = p2m->max_remapped_gfn = 0;
     ept = &p2m->ept;
     ept->mfn = pagetable_get_pfn(p2m_get_pagetable(p2m));
     d->arch.altp2m_eptp[array_index_nospec(i, MAX_EPTP)] = ept->eptp;
diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c
index 253cab3458..d381f6877f 100644
--- a/xen/arch/x86/mm/p2m.c
+++ b/xen/arch/x86/mm/p2m.c
@@ -2559,6 +2559,12 @@ static int p2m_activate_altp2m(struct domain *d, 
unsigned int idx)
         goto out;
     }
 
+    p2m->default_access = hostp2m->default_access;
+    p2m->domain = hostp2m->domain;
+    p2m->global_logdirty = hostp2m->global_logdirty;
+    p2m->min_remapped_gfn = gfn_x(INVALID_GFN);
+    p2m->max_mapped_pfn = p2m->max_remapped_gfn = 0;
+
     p2m_init_altp2m_ept(d, idx);
 
  out:
-- 
2.17.1

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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