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

Re: [Xen-devel] [PATCH] memop: adjust error checking in populate_physmap()


  • To: Jan Beulich <JBeulich@xxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxx>
  • From: Keir Fraser <keir@xxxxxxx>
  • Date: Thu, 06 Dec 2012 13:04:44 +0000
  • Delivery-date: Thu, 06 Dec 2012 13:05:04 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>
  • Thread-index: Ac3TskKu3qixRkXh5USKZI257948Dw==
  • Thread-topic: [Xen-devel] [PATCH] memop: adjust error checking in populate_physmap()

On 06/12/2012 12:54, "Jan Beulich" <JBeulich@xxxxxxxx> wrote:

> 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>

> --- a/xen/common/memory.c
> +++ b/xen/common/memory.c
> @@ -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-devel mailing list
> Xen-devel@xxxxxxxxxxxxx
> http://lists.xen.org/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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