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

BTW, one thing that is confusing looking at the code is :

ept_memory_type_changed() calls ept_invalidate_emt with PML4 mfn.
ept_invalidate_emt walks l4 entries checking for emt and doing
atomic_write_ept_entry on l4 entries. However, looking at latest 
intel SDM figure 28-1, vol 3b, it appears those bits are reserved?
EPT MT is only valid for L3, l2 and l1. What am I missing?

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