From: Paolo Bonzini <pbonzini@redhat.com>
To: Liran Alon <liran.alon@oracle.com>, dwmw@amazon.co.uk
Cc: konrad.wilk@oracle.com, jmattson@google.com, x86@kernel.org,
bp@alien8.de, nadav.amit@gmail.com, thomas.lendacky@amd.com,
aliguori@amazon.com, arjan@linux.intel.com, rkrcmar@redhat.com,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH 3/8] kvm: vmx: pass MSR_IA32_SPEC_CTRL and MSR_IA32_PRED_CMD down to the guest
Date: Wed, 10 Jan 2018 17:27:47 +0100 [thread overview]
Message-ID: <65578664-e3ec-f894-4e94-ff9fe6d7d6b3@redhat.com> (raw)
In-Reply-To: <c687a8eb-663d-48c1-9dc3-7f6b22973f81@default>
I can answer (2) only.
On 10/01/2018 17:19, Liran Alon wrote:
> (2) On VMExit, Intel recommends to always save guest SPEC_CTRL value,
> set IBRS to 1 (even if it is already set by guest) and stuff RSB. What
> exactly does this write of 1 to IBRS do?
> * a) Does it keep all currently existing BTB/BHB entries created by
> less-privileged prediction-mode and marks them as were created in
> less-privileged prediction-mode such that they won't be used in current
> prediction-mode?
> * b) Or does it, as Paolo has mentioned multiple times, disables the
> branch predictor to never consult the BTB/BHB at all as long as IBRS=1?
> If (b) is true, why is setting IBRS=1 better than just issue an IBPB that clears all entries? At least in that case the > host kernel could still benefict branch prediction performance boost.
Arjan said (b) is not true on all processor generations. But even if it
were true, setting IBRS=1 is much, much faster than IBPB.
> If (a) is true, does "IBRS ALL THE TIME" usage is basically a CPU
> change to just create all BTB/BHB entries to be tagged with
> prediction-mode at creation-time and that tag to be compared to current
> prediction-mode when CPU attempts to use BTB/BHB?
I hope so, and I hope said prediction mode includes PCID/VPID too.
While I agree with David that "we have other things to work on for now
before we support hypothetical future hardware", I'd like to make sure
that Intel gets it right...
Paolo
next prev parent reply other threads:[~2018-01-10 16:28 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-10 16:19 Liran Alon
2018-01-10 16:27 ` Paolo Bonzini [this message]
2018-01-10 17:14 ` Jim Mattson
2018-01-10 17:16 ` Paolo Bonzini
2018-01-10 17:23 ` Nadav Amit
2018-01-10 17:32 ` Jim Mattson
2018-01-10 16:47 ` David Woodhouse
-- strict thread matches above, loose matches on Subject: below --
2018-01-10 16:51 Liran Alon
2018-01-10 17:07 ` David Woodhouse
2018-01-10 0:33 Liran Alon
2018-01-09 16:48 Liran Alon
2018-01-09 16:57 ` Paolo Bonzini
2018-01-10 5:03 ` Nadav Amit
2018-01-10 13:20 ` Paolo Bonzini
2018-01-10 14:06 ` Arjan van de Ven
2018-01-10 14:28 ` Paolo Bonzini
2018-01-10 15:41 ` Konrad Rzeszutek Wilk
2018-01-10 15:45 ` Paolo Bonzini
2018-01-10 15:48 ` Woodhouse, David
2018-01-10 15:56 ` Paolo Bonzini
2018-01-10 16:05 ` David Woodhouse
2018-01-12 23:17 ` Jim Mattson
2018-01-12 23:19 ` Nadav Amit
2018-01-09 16:06 Liran Alon
2018-01-09 12:03 [PATCH v2 0/8] KVM: x86: expose CVE-2017-5715 ("Spectre variant 2") mitigations to guest Paolo Bonzini
2018-01-09 12:03 ` [PATCH 3/8] kvm: vmx: pass MSR_IA32_SPEC_CTRL and MSR_IA32_PRED_CMD down to the guest Paolo Bonzini
2018-01-13 10:16 ` Longpeng (Mike)
2018-01-15 9:23 ` Paolo Bonzini
2018-01-15 9:34 ` Thomas Gleixner
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=65578664-e3ec-f894-4e94-ff9fe6d7d6b3@redhat.com \
--to=pbonzini@redhat.com \
--cc=aliguori@amazon.com \
--cc=arjan@linux.intel.com \
--cc=bp@alien8.de \
--cc=dwmw@amazon.co.uk \
--cc=jmattson@google.com \
--cc=konrad.wilk@oracle.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liran.alon@oracle.com \
--cc=nadav.amit@gmail.com \
--cc=rkrcmar@redhat.com \
--cc=thomas.lendacky@amd.com \
--cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®