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

Re: [Xen-devel] [V10 PATCH 3/4] pvh dom0: Add and remove foreign pages



At 16:35 -0700 on 02 May (1399044956), Mukesh Rathor wrote:
> > Oh yes -- sorry, I got confused between this and the case where you do
> > use get_pg_owner().  But actually on this subject ISTR objecting to
> > exporting get_pg_owner() from mm.c before.  Oh yes, here it is:
> > 
> > http://lists.xenproject.org/archives/html/xen-devel/2014-01/msg02612.html
> > 
> > So can you use rcu_lock_live_remote_domain_by_id() here instead?
> 
> 
> In p2m_add_foreign() we already get the rcu lock, still do it here? 

I don't know what you mean by that.  p2m_add_foreign() currently
implicitly takes the rcu lock by calling get_pg_owner(); I was
suggecting that you use rcu_lock_live_remote_domain_by_id() instead.

> And, btw, that function, p2m_add_foreign(), went from 
> 
> +    if ( (fdid == DOMID_XEN && (fdom = rcu_lock_domain(dom_xen)) == NULL) ||
> +         (fdid != DOMID_XEN && (fdom = rcu_lock_domain_by_id(fdid)) == NULL) 
> )
> +        goto out;
> 
> to 
> 
> +    fdom = get_pg_owner(foreigndom);
> 
> (causing get_pg_owner to be exported) at Jan's comment/suggestion in v8.

Unless Jan particularly wants to defend that, please don't export
get_pg_owner().  As I said in the link above it doesn't do what you want
anyway (e.g around DOMID_IO).

Tim.

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