]> xenbits.xensource.com Git - people/dwmw2/xen.git/commitdiff
EPT/PoD: fix interaction with 1Gb pages
authorJan Beulich <jbeulich@suse.com>
Thu, 16 Aug 2012 16:38:05 +0000 (17:38 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 16 Aug 2012 16:38:05 +0000 (17:38 +0100)
When PoD got enabled to support 1Gb pages, ept_get_entry() didn't get
updated to match - the assertion in there triggered, indicating that
the call to p2m_pod_demand_populate() needed adjustment.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
xen/arch/x86/mm/p2m-ept.c

index 49c044e59f334c65d10c2fe6650d28d83225c551..c964f542b45e7250f36b86ff743a063f0b35563b 100644 (file)
@@ -521,13 +521,12 @@ static mfn_t ept_get_entry(struct p2m_domain *p2m,
             }
 
             /* Populate this superpage */
-            ASSERT(i == 1);
+            ASSERT(i <= 2);
 
             index = gfn_remainder >> ( i * EPT_TABLE_ORDER);
             ept_entry = table + index;
 
-            if ( !p2m_pod_demand_populate(p2m, gfn, 
-                                            PAGE_ORDER_2M, q) )
+            if ( !p2m_pod_demand_populate(p2m, gfn, i * EPT_TABLE_ORDER, q) )
                 goto retry;
             else
                 goto out;