]> xenbits.xensource.com Git - people/dwmw2/xen.git/commitdiff
x86/mm: Pull vendor-independent altp2m code out of p2m-ept.c and into p2m.c
authorAlexandru Stefan ISAILA <aisaila@bitdefender.com>
Fri, 17 Jan 2020 13:31:31 +0000 (13:31 +0000)
committerGeorge Dunlap <george.dunlap@citrix.com>
Thu, 23 Jan 2020 14:24:56 +0000 (14:24 +0000)
No functional changes.

Requested-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Alexandru Isaila <aisaila@bitdefender.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Petre Pircalabu <ppircalabu@bitdefender.com>
Acked-by: George Dunlap <george.dunlap@citrix.com>
xen/arch/x86/mm/p2m-ept.c
xen/arch/x86/mm/p2m.c

index b078a9a59e10a8aba255f1e1983564288991c095..05a5526e080c805f86fdcbbbc9f26fe7f2c0e2a0 100644 (file)
@@ -1357,13 +1357,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;
index 3a2929c3650f0cd5b254951578eef3c7acddd0e6..696946697a909cdfc6eb32e3d71b981e214c9c4d 100644 (file)
@@ -2562,6 +2562,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: