[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, 2013-12-05 at 17:32 -0800, Mukesh Rathor wrote:
> > > Why is page NULL in this case? I'd have thought that
> > > get_page_from_gfn could handle the p2m_foreign case internally and
> > > still return the page, with the ref count taken too.
> > > 
> > > Doing that would cause a lot of the magic, and in particular the
> > > ifdef, in the following code to disappear.
> > 
> > I had brought this up earlier this year (that's how old this patch
> > is). get_page_from_gfn can't be used because the mfn owner is foreign
> > domain and not domain "d", and get_page() will barf.
> 
> Rephrase: get_page_from_gfn can't be changed to handle p2m_foreign because...

Even with that my original reply stands. In the case of a p2m_foreign
get_page_from_gfn shouldn't be calling get_page, but should be doing the
same dance as you are currently doing in this function to get at the
page's original owner and take whatever ref is needed etc etc instead.

Ian.


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