|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [V15 PATCH 1/2] pvh dom0: Add and remove foreign pages
On Fri, 23 May 2014 21:05:34 +0200
Tim Deegan <tim@xxxxxxx> wrote:
> At 16:30 -0700 on 22 May (1400772630), Mukesh Rathor wrote:
> > In this patch, a new function, p2m_add_foreign(), is added
> > to map pages from a foreign guest into dom0 for various purposes
> > like domU creation, running xentrace, etc... Such pages are
> > typed p2m_map_foreign. Note, it is the nature of such pages
> > that a refcnt is held during their stay in the p2m. The
> > refcnt is added and released in the low level ept function
> > atomic_write_ept_entry. That macro is converted to a function to
> > allow for such refcounting, which only applies to leaf entries in
> > the ept. Furthermore, please note that paging/sharing is disabled
> > if the controlling or hardware domain is pvh. Any enabling of those
> > features would need to ensure refcnt are properly maintained for
> > foreign types, or paging/sharing is skipped for foreign types.
> >
> > Also, we change get_pg_owner so it allows foreign mappings for pvh.
>
> But you no longer actually call get_pg_owner() for PVH domains, right?
> So that hunk should go away. With that done,
Hi Tim,
We actually need get_pg_owner for the mmuext call by the toolstack
when building a PV domain, doing pinning operations on the guest table.
Alternates would be to call rcu directly in do_mmuext_op:
if ( pvh )
if ( DOMID_SELF )
rcu_lock_current_domain
else if ( DOMID_IO || DOMID_XEN )
error
else
rcu_lock_domain_by_id
else
get_pg_owner
OR, if you prefer in get_pg_owner():
..
case DOMID_IO:
if ( !is_pvh_domain(curr) )
pg_owner = rcu_lock_domain(dom_io);
break;
...
Please lmk asap: leave as is, first suggestion above, or second
suggestion above.
thanks a lot,
mukesh
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |