All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: David Vrabel <dvrabel@cantab.net>,
	David Vrabel <david.vrabel@citrix.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Kevin Tian <kevin.tian@intel.com>,
	Jun Nakajima <jun.nakajima@intel.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCHv1 1/3] x86/ept: remove unnecessary sync after resolving misconfigured entries
Date: Thu, 12 Nov 2015 09:30:20 -0700	[thread overview]
Message-ID: <5644CCAD02000078000B4606@prv-mh.provo.novell.com> (raw)
In-Reply-To: <5644BBDE.3000007@cantab.net>

>>> On 12.11.15 at 17:18, <dvrabel@cantab.net> wrote:

> 
> On 10/11/2015 12:22, Jan Beulich wrote:
>>>>> On 06.11.15 at 18:37, <david.vrabel@citrix.com> 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.

Again - if there was an error, how do you know it's unnecessary?
But anyway - I'll let the VM maintainers decide.

Jan

  reply	other threads:[~2015-11-12 16:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-06 17:37 [RFC PATCHv1 0/3]: x86/ept: reduce translation invalidation impact David Vrabel
2015-11-06 17:37 ` [PATCHv1 1/3] x86/ept: remove unnecessary sync after resolving misconfigured entries David Vrabel
2015-11-06 18:29   ` Andrew Cooper
2015-11-10 12:22   ` Jan Beulich
2015-11-12 16:18     ` David Vrabel
2015-11-12 16:30       ` Jan Beulich [this message]
2015-11-06 17:37 ` [PATCHv1 2/3] mm: don't free pages until mm locks are released David Vrabel
2015-11-06 17:37 ` [PATCHv1 3/3] x86/ept: defer the invalidation until the p2m lock is released David Vrabel
2015-11-06 18:39   ` Andrew Cooper
2015-11-09 14:13   ` Jan Beulich
2015-11-10 13:35   ` Tim Deegan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5644CCAD02000078000B4606@prv-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=david.vrabel@citrix.com \
    --cc=dvrabel@cantab.net \
    --cc=jun.nakajima@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.