From: "Jan Beulich" Subject: Re: [V10 PATCH 3/4] pvh dom0: Add and remove foreign pages Date: Fri, 02 May 2014 09:38:31 +0100 Message-ID: <536375A7020000780000E5C2@mail.emea.novell.com> References: <1398820008-9005-1-git-send-email-mukesh.rathor@oracle.com> <1398820008-9005-4-git-send-email-mukesh.rathor@oracle.com> <20140501161908.GI86038@deinos.phlegethon.org> <20140501184518.2ebccdb8@mantra.us.oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Wg8zJ-00076X-7L for xen-devel@lists.xenproject.org; Fri, 02 May 2014 08:38:33 +0000 In-Reply-To: <20140501184518.2ebccdb8@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 , Tim Deegan Cc: George.Dunlap@eu.citrix.com, xen-devel@lists.xenproject.org, keir.xen@gmail.com, eddie.dong@intel.com, jun.nakajima@intel.com List-Id: xen-devel@lists.xenproject.org >>> On 02.05.14 at 03:45, wrote: > On Thu, 1 May 2014 18:19:08 +0200 Tim Deegan wrote: >> > @@ -46,6 +44,46 @@ static inline bool_t is_epte_valid(ept_entry_t >> > *e) return (e->epte != 0 && e->sa_p2mt != p2m_invalid); >> > } >> > >> > +/* returns : 0 for success, -errno otherwise */ >> > +static int atomic_write_ept_entry(ept_entry_t *entryptr, >> > ept_entry_t new, >> > + int level) >> > +{ >> > + bool_t same_mfn = (new.mfn == entryptr->mfn); >> > + unsigned long oldmfn = INVALID_MFN; >> > + >> > + if ( level ) >> > + { >> >> ASSERT(!(new.sp && p2m_is_foreign(new.sa_p2mt))) here? > > Yeah, I debated adding p2m_is_foreign ASSERT, but didn't because iirc > Jan had said he wanted to use up the non-leaf bits for something else > in future. I suppose I can add it, it would be easy > to find it anyways.... BTW, there is no path allowing > superpage for foreign at present. But .sp set implies it being a leaf entry. Jan