From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mukesh Rathor Subject: Re: [V9 PATCH 6/8] pvh dom0: Add and remove foreign pages Date: Fri, 25 Apr 2014 16:23:53 -0700 Message-ID: <20140425162353.70ab387d@mantra.us.oracle.com> References: <1397607172-32065-1-git-send-email-mukesh.rathor@oracle.com> <1397607172-32065-7-git-send-email-mukesh.rathor@oracle.com> <534EC5430200007800009ADD@nat28.tlf.novell.com> <20140416183742.50a98472@mantra.us.oracle.com> <534F95E00200007800009D40@nat28.tlf.novell.com> <20140417123653.GA25395@deinos.phlegethon.org> <534FFA32020000780000A077@nat28.tlf.novell.com> <20140423192151.0b05a91b@mantra.us.oracle.com> <20140424094641.GA48969@deinos.phlegethon.org> <20140424190925.62843681@mantra.us.oracle.com> <535A219B020000780000C247@nat28.tlf.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 1WdpTV-0001EW-Cs for xen-devel@lists.xenproject.org; Fri, 25 Apr 2014 23:24:09 +0000 In-Reply-To: <535A219B020000780000C247@nat28.tlf.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 Deegan , 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 Fri, 25 Apr 2014 07:49:31 +0100 "Jan Beulich" wrote: > >>> On 25.04.14 at 04:09, wrote: > > Ok, how about something like shown further below? (I think > > it would be more simpler to have one atomic_write ops, instead of > > two) > > That's an understandable desire, but ... > > > +/* returns : 0 for success, -errno otherwise */ > > +static int atomic_write_ept_entry(ept_entry_t *entryptr, > > ept_entry_t new) +{ > > + unsigned long oldmfn; > > + struct domain *fdom; > > + bool_t new_foreign = p2m_is_foreign(new.sa_p2mt); > > + bool_t old_foreign = p2m_is_foreign(entryptr->sa_p2mt); > > ... these aren't really valid for intermediate entries (they just end > up getting p2m_ram_rw put into them right now, but that's in no way Right, I see by virtue of setting the entry to 0, and p2m_ram_rw =0. Hmm... time for a new type, p2mt == p2m_intermed (just kidding :))... > explicit, and hence not set in stone). As said before, I can see the > need to use these fields eventually, so this would end up being a > latent problem. Hence minimally I'd want you to explicitly set the > field in ept_set_middle_entry() to make clear that we now depend on > it having a certain value. Correct that would work for now, but would make the bits unusable for intermediate entries.... Hmmm.. let me think and look more at the code and get back. thanks mukesh