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

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



On Fri, 25 Apr 2014 07:49:31 +0100
"Jan Beulich" <JBeulich@xxxxxxxx> wrote:

> >>> On 25.04.14 at 04:09, <mukesh.rathor@xxxxxxxxxx> wrote:
> > Ok, how about something like shown further below?  (I think
> > it would be more simpler to have one atomic_write ops, instead of
> > two)
> 
> That's an understandable desire, but ...
> 
> > +/* returns : 0 for success, -errno otherwise */
> > +static int atomic_write_ept_entry(ept_entry_t *entryptr,
> > ept_entry_t new) +{
> > +    unsigned long oldmfn;
> > +    struct domain *fdom;
> > +    bool_t new_foreign = p2m_is_foreign(new.sa_p2mt);
> > +    bool_t old_foreign = p2m_is_foreign(entryptr->sa_p2mt);
> 
> ... these aren't really valid for intermediate entries (they just end
> up getting p2m_ram_rw put into them right now, but that's in no way

Right, I see by virtue of setting the entry to 0, and p2m_ram_rw =0.
Hmm... time for a new type, p2mt == p2m_intermed (just kidding :))... 

> explicit, and hence not set in stone). As said before, I can see the
> need to use these fields eventually, so this would end up being a
> latent problem. Hence minimally I'd want you to explicitly set the
> field in ept_set_middle_entry() to make clear that we now depend on
> it having a certain value.

Correct that would work for now, but would make the bits unusable for
intermediate entries.... Hmmm.. let me think and look more at the code
and get back.

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