From: "Jan Beulich" Subject: Re: [V11 PATCH 3/4] pvh dom0: Add and remove foreign pages Date: Wed, 07 May 2014 08:27:08 +0100 Message-ID: <5369FC6C020000780000FAE2@mail.emea.novell.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> <20140506181254.6a0699ba@mantra.us.oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WhwG2-0004jl-4C for xen-devel@lists.xenproject.org; Wed, 07 May 2014 07:27:14 +0000 In-Reply-To: <20140506181254.6a0699ba@mantra.us.oracle.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Mukesh Rathor 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 07.05.14 at 03:12, wrote: > 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 must have overlooked this - this is exactly what I was after. Sorry for the noise. Jan