From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: [PATCHv1 1/3] x86/ept: remove unnecessary sync after resolving misconfigured entries Date: Thu, 12 Nov 2015 16:18:38 +0000 Message-ID: <5644BBDE.3000007@cantab.net> References: <1446831437-5897-1-git-send-email-david.vrabel@citrix.com> <1446831437-5897-2-git-send-email-david.vrabel@citrix.com> <5641EF9D02000078000B35B4@prv-mh.provo.novell.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 1ZwuaG-0005ZK-Bn for xen-devel@lists.xenproject.org; Thu, 12 Nov 2015 16:18:48 +0000 In-Reply-To: <5641EF9D02000078000B35B4@prv-mh.provo.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 , David Vrabel Cc: Andrew Cooper , Kevin Tian , Jun Nakajima , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On 10/11/2015 12:22, Jan Beulich wrote: >>>> On 06.11.15 at 18:37, wrote: >> --- a/xen/arch/x86/mm/p2m-ept.c >> +++ b/xen/arch/x86/mm/p2m-ept.c >> @@ -644,7 +644,6 @@ bool_t ept_handle_misconfig(uint64_t gpa) >> spurious = curr->arch.hvm_vmx.ept_spurious_misconfig; >> rc = resolve_misconfig(p2m, PFN_DOWN(gpa)); >> curr->arch.hvm_vmx.ept_spurious_misconfig = 0; >> - ept_sync_domain(p2m); >> >> p2m_unlock(p2m); >> >> @@ -692,12 +691,7 @@ ept_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn, >> /* Carry out any eventually pending earlier changes first. */ >> ret = resolve_misconfig(p2m, gfn); >> if ( ret < 0 ) >> - { >> - ept_sync_domain(p2m); > > Is avoiding this sync really a win? It shouldn't be needed according > to your analysis, I agree, but if it doesn't do any harm I'd prefer it > to be kept (and the deletion above to be converted to a similar, > conditional sync too). After all there also shouldn't be any error > here, yet if there was one, wanting to be on the safe side calls for > doing a sync imo. Unnecessary calls to ept_domain_sync() are confusing. David