[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] memop: adjust error checking in populate_physmap()
# HG changeset patch # User Jan Beulich <jbeulich@xxxxxxxx> # Date 1354799955 -3600 # Node ID 51d2ae389383de3c6412a6cdc34ddcda1d0d0c8f # Parent 8f7bb944bcb6f736db8a9562e904628ec4629f67 memop: adjust error checking in populate_physmap() Checking that multi-page allocations are permitted is unnecessary for PoD population operations. Instead, the (loop invariant) check added for addressing XSA-31 can be moved here. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Acked-by: Keir Fraser <keir@xxxxxxx> --- diff -r 8f7bb944bcb6 -r 51d2ae389383 xen/common/memory.c --- a/xen/common/memory.c Thu Dec 06 14:13:51 2012 +0100 +++ b/xen/common/memory.c Thu Dec 06 14:19:15 2012 +0100 @@ -99,7 +99,8 @@ static void populate_physmap(struct memo a->nr_extents-1) ) return; - if ( !multipage_allocation_permitted(current->domain, a->extent_order) ) + if ( a->memflags & MEMF_populate_on_demand ? a->extent_order > MAX_ORDER : + !multipage_allocation_permitted(current->domain, a->extent_order) ) return; for ( i = a->nr_done; i < a->nr_extents; i++ ) @@ -115,8 +116,7 @@ static void populate_physmap(struct memo if ( a->memflags & MEMF_populate_on_demand ) { - if ( a->extent_order > MAX_ORDER || - guest_physmap_mark_populate_on_demand(d, gpfn, + if ( guest_physmap_mark_populate_on_demand(d, gpfn, a->extent_order) < 0 ) goto out; } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |