All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <sean.j.christopherson@intel.com>
To: Jim Mattson <jmattson@google.com>
Cc: kvm list <kvm@vger.kernel.org>,
	Liran Alon <liran.alon@oracle.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Dan Cross <dcross@google.com>, Peter Shier <pshier@google.com>
Subject: Re: [PATCH v4] KVM: nVMX: Don't leak L1 MMIO regions to L2
Date: Tue, 15 Oct 2019 10:32:17 -0700	[thread overview]
Message-ID: <20191015173217.GH15015@linux.intel.com> (raw)
In-Reply-To: <CALMp9eQ-xcQSESs7et3voPU7-Jbs6X14S1U74_izYCSpyNbstg@mail.gmail.com>

On Tue, Oct 15, 2019 at 10:13:06AM -0700, Jim Mattson wrote:
> On Mon, Oct 14, 2019 at 6:07 PM Sean Christopherson
> <sean.j.christopherson@intel.com> wrote:
> > KVM doesn't usually add (un)likely annotations for things that are under
> > L1's control.  The "unlikely(vmx->fail)" in nested_vmx_exit_reflected() is
> > there because it's true iff KVM missed a VM-Fail condition that was caught
> > by hardware.
> 
> I would argue that it makes sense to optimize for the success path in
> this case. If L1 is taking the failure path more frequently than the
> success path, something is wrong. Moreover, you have already indicated
> that the success path should be statically predicted taken by asking
> me to move the failure path out-of-line. (Forward conditional branches
> are statically predicted not taken, per section 3.4.1.3 of the Intel
> 64 and IA-32 Architectures Optimization Reference Manual.) I'm just
> asking the compiler not to undo that hint.

Fair enough.

      reply	other threads:[~2019-10-15 17:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-15  0:13 [PATCH v4] KVM: nVMX: Don't leak L1 MMIO regions to L2 Jim Mattson
2019-10-15  1:07 ` Sean Christopherson
2019-10-15 17:13   ` Jim Mattson
2019-10-15 17:32     ` Sean Christopherson [this message]

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=20191015173217.GH15015@linux.intel.com \
    --to=sean.j.christopherson@intel.com \
    --cc=dcross@google.com \
    --cc=jmattson@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=liran.alon@oracle.com \
    --cc=pbonzini@redhat.com \
    --cc=pshier@google.com \
    /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.