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

Re: [Xen-devel] mem_sharing: summarized problems when domain is dying



At 16:41 +0000 on 21 Jan (1295628107), George Dunlap wrote:
> Tim / Xiaoyun, do you think something like this might work?

Worth a try.  I don't think it will do much harm -- there should be no
cases where dom0 really must map a dying domain's memory. 

Tim.

> On Fri, Jan 21, 2011 at 4:32 PM, George Dunlap <dunlapg@xxxxxxxxx> wrote:
> > [sorry, accidentally sent too early]
> >
> > On Fri, Jan 21, 2011 at 4:29 PM, George Dunlap <dunlapg@xxxxxxxxx> wrote:
> >> I'm not sure the exact rationale behind the "cannot fail" flag; but it
> >> looks like in grant_table.c, both callers of gfn_to_mfn_unshare()
> >> handle the case where the returned p2m entry is just
> >
> > ...invalid.  I wonder if "unsharing" the page, but marking the entry
> > invalid during death would help.
> >
> > I suppose the problem there is that if you're keeping the VM around
> > but paused for analysis, you'll have holes in your address space.  But
> > just returning an invalid entry to the callers who try to unshare
> > pages might work.
> >
> >  -George
> >

> diff -r 9ca9331c9780 xen/include/asm-x86/p2m.h
> --- a/xen/include/asm-x86/p2m.h       Fri Jan 21 15:37:36 2011 +0000
> +++ b/xen/include/asm-x86/p2m.h       Fri Jan 21 16:41:58 2011 +0000
> @@ -390,7 +390,14 @@
>                                        must_succeed 
>                                        ? MEM_SHARING_MUST_SUCCEED : 0) )
>          {
> -            BUG_ON(must_succeed);
> +            if ( must_succeed
> +                 && p2m->domain->is_dying )
> +            {
> +                mfn = INVALID_MFN;
> +                *p2mt=p2m_invalid;
> +            }
> +            else
> +                BUG_ON(must_succeed);
>              return mfn;
>          }
>          mfn = gfn_to_mfn(p2m, gfn, p2mt);


-- 
Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Principal Software Engineer, Xen Platform Team
Citrix Systems UK Ltd.  (Company #02937203, SL9 0BG)

_______________________________________________
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®.