From: "Jan Beulich" Subject: Re: [V9 PATCH 4/8] pvh dom0: Add checks and restrictions for p2m_is_foreign Date: Wed, 16 Apr 2014 16:28:18 +0100 Message-ID: <534EBDB20200007800009A42@nat28.tlf.novell.com> References: <1397607172-32065-1-git-send-email-mukesh.rathor@oracle.com> <1397607172-32065-5-git-send-email-mukesh.rathor@oracle.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 1WaRl7-0000X6-Hg for xen-devel@lists.xenproject.org; Wed, 16 Apr 2014 15:28:21 +0000 In-Reply-To: <1397607172-32065-5-git-send-email-mukesh.rathor@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, xen-devel@lists.xenproject.org, keir.xen@gmail.com, tim@xen.org List-Id: xen-devel@lists.xenproject.org >>> On 16.04.14 at 02:12, wrote: > --- a/xen/arch/x86/mm/p2m-ept.c > +++ b/xen/arch/x86/mm/p2m-ept.c > @@ -657,6 +657,7 @@ static void ept_change_entry_type_global(struct > p2m_domain *p2m, > > BUG_ON(p2m_is_grant(ot) || p2m_is_grant(nt)); > BUG_ON(ot != nt && (ot == p2m_mmio_direct || nt == p2m_mmio_direct)); > + BUG_ON(p2m_is_foreign(nt) || (p2m_is_foreign(ot) && !p2m_is_invalid(nt))); So what would a p2m_foreign -> p2m_invalid (permitted by this) transition mean? Also, as I'm about to severely restrict the set of types that can be passed into this and the corresponding (generic) range functions, do you have any intended use case for this (making it so you need to permit that transition)? Jan