From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mukesh Rathor Subject: Re: [V11 PATCH 3/4] pvh dom0: Add and remove foreign pages Date: Tue, 6 May 2014 18:12:54 -0700 Message-ID: <20140506181254.6a0699ba@mantra.us.oracle.com> References: <1398995707-12657-1-git-send-email-mukesh.rathor@oracle.com> <1398995707-12657-4-git-send-email-mukesh.rathor@oracle.com> <53678A65020000780000EF38@mail.emea.novell.com> <20140505182142.62e5151e@mantra.us.oracle.com> <5368B09C020000780000F2EB@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WhqQ2-00041H-Jj for xen-devel@lists.xenproject.org; Wed, 07 May 2014 01:13:10 +0000 In-Reply-To: <5368B09C020000780000F2EB@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: George.Dunlap@eu.citrix.com, tim@xen.org, eddie.dong@intel.com, keir.xen@gmail.com, jun.nakajima@intel.com, xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On Tue, 06 May 2014 08:51:24 +0100 "Jan Beulich" wrote: > >>> On 06.05.14 at 03:21, wrote: > > "Jan Beulich" wrote: > >> >>> On 02.05.14 at 03:55, wrote: > >> > @@ -444,6 +451,10 @@ int p2m_alloc_table(struct p2m_domain *p2m) > >> > return rc; > >> > } > >> > > >> > +/* > >> > + * pvh fixme: when adding support for pvh non-hardware domains, > >> > this path must > >> > + * cleanup any foreign p2m types (release refcnts on them). > >> > + */ > >> > >> And I wonder whether you shouldn't enforce this by disallowing non- > >> hardware domains to create foreign mappings. > > > > Hmm... Tim wanted the enforcement. That will ensure the cleanup is > > implemented without falling thru the cracks. > > I'm confused - aren't you stating that Tim requested the same I did? > Or else, what "enforcement" are you referring to? Yes, Tim requested enforcement which I added in p2m_add_foreign(): + /* + * pvh fixme: until support is added to p2m teardown code to cleanup any + * foreign entries, limit this to hardware domain only. + */ + if ( !is_hardware_domain(tdom) ) + return -EPERM; Thus, non-hardware domains can't map foreign types. Not sure if there's anything worth enforcing in p2m_teardown with above. I'm not sure I understand what you think "I shouldn't enforce". Mukesh