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

Re: [Xen-devel] [PATCH 5 of 9] x86/mm: Ensure maps used by nested hvm code cannot be paged out



At 10:10 +0000 on 30 Nov (1322647821), Jan Beulich wrote:
>  >>> On 29.11.11 at 21:21, Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx> 
> wrote:
> > --- a/xen/arch/x86/hvm/hvm.c
> > +++ b/xen/arch/x86/hvm/hvm.c
> > @@ -1828,7 +1831,12 @@ static void *__hvm_map_guest_frame(unsig
> >      if ( writable )
> >          paging_mark_dirty(d, mfn);
> >  
> > -    return map_domain_page(mfn);
> > +    pg = mfn_to_page(mfn);
> > +    page_get_owner_and_reference(pg);
> 
> This can (at least theoretically) fail, and you must handle failure (or
> explain in a comment why not).

Also, you should probably be using get_page(pg, d); is there any
reason to skip the ownership check?

Tim.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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