]> xenbits.xensource.com Git - people/liuw/xen.git/commitdiff
xxx setup_m2p_table
authorWei Liu <wei.liu2@citrix.com>
Thu, 31 Jan 2019 19:04:23 +0000 (19:04 +0000)
committerWei Liu <wei.liu2@citrix.com>
Tue, 5 Feb 2019 14:32:53 +0000 (14:32 +0000)
xen/arch/x86/x86_64/mm.c

index de334d6ead3bd65b422be214786904985cf6cf97..c806aca872f350c24c61cb76d525c646a8f4bd41 100644 (file)
@@ -459,8 +459,13 @@ static int setup_m2p_table(struct mem_hotadd_info *info)
                   _PAGE_PSE));
             if ( l3e_get_flags(l3_ro_mpt[l3_table_offset(va)]) &
               _PAGE_PRESENT )
-                pl2e = l3e_to_l2e(l3_ro_mpt[l3_table_offset(va)]) +
-                  l2_table_offset(va);
+            {
+                unmap_xen_pagetable_new(l2_ro_mpt);
+                l2_ro_mpt_mfn = l3e_get_mfn(l3_ro_mpt[l3_table_offset(va)]);
+                l2_ro_mpt = map_xen_pagetable_new(l2_ro_mpt_mfn);
+                ASSERT(l2_ro_mpt);
+                pl2e = l2_ro_mpt + l2_table_offset(va);
+            }
             else
             {
                 unmap_xen_pagetable_new(l2_ro_mpt);