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

Re: [Xen-devel] [V5 PATCH 6/7] pvh dom0: Add and remove foreign pages



On Thu, 5 Dec 2013 17:57:17 -0800
Mukesh Rathor <mukesh.rathor@xxxxxxxxxx> wrote:

> On Thu, 05 Dec 2013 13:12:57 +0000
> Julien Grall <julien.grall@xxxxxxxxxx> wrote:
> 
> > On 12/05/2013 02:05 AM, Mukesh Rathor wrote:
> 
> ......
> 
> > > -        page = get_page_from_gfn(d, xrfp.gpfn, NULL, P2M_ALLOC);
> > > -        if ( page )
> > > +        /*
> > > +         * if PVH, the gfn could be mapped to a mfn from foreign
> > > domain by the
> > > +         * user space tool during domain creation. We need to
> > > check for that,
> > > +         * free it up from the p2m, and release refcnt on it. In
> > > such a case,
> > > +         * page would be NULL and the following call would not
> > > have refcnt'd
> > > +         * the page. See also xenmem_add_foreign_to_p2m().
> > > +         */
> > > +        page = get_page_from_gfn(d, xrfp.gpfn, &p2mt, P2M_ALLOC);
> > 
> > Actually, on debug build, get_page_from_gfn on ARM will crash Xen.
> > For now we have an ASSERT to check if the type (p2m_type_t *) is
> > NULL.
> 
> Thanks for noticing that. Wish you had also mentioned if it'd be OK to
> remove the assert from arm to save a day, George is closing the
> checking window on me :). If not OK to remove the assert, I'll ifdef
> the get_page_from_gfn, or rework the logic. May be I'll try that
> anyways... 

Never mind, I reworked the logic so that p2mt is now being passed NULL
in the common code as before. See V6.

thanks
Mukesh


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