From: "Woodhouse, David" <dwmw@amazon.co.uk>
To: Liran Alon <liran.alon@oracle.com>, <karahmed@amazon.de>
Cc: <labbott@redhat.com>, <luto@kernel.org>,
<Janakarajan.Natarajan@amd.com>, <bp@suse.de>,
<torvalds@linux-foundation.org>, <asit.k.mallick@intel.com>,
<rkrcmar@redhat.com>, <dave.hansen@intel.com>, <hpa@zytor.com>,
<mingo@redhat.com>, <jun.nakajima@intel.com>, <x86@kernel.org>,
<ashok.raj@intel.com>, <arjan.van.de.ven@intel.com>,
<tim.c.chen@linux.intel.com>, <pbonzini@redhat.com>,
<linux-kernel@vger.kernel.org>, <ak@linux.intel.com>,
<peterz@infradead.org>, <tglx@linutronix.de>,
<gregkh@linuxfoundation.org>, <mhiramat@kernel.org>,
<arjan@linux.intel.com>, <thomas.lendacky@amd.com>,
<dan.j.williams@intel.com>, <joro@8bytes.org>,
<kvm@vger.kernel.org>, <aarcange@redhat.com>
Subject: Re: [RFC 02/10] x86/kvm: Add IBPB support
Date: Sat, 20 Jan 2018 20:36:20 +0000 [thread overview]
Message-ID: <1516480580.9814.14.camel@amazon.co.uk> (raw)
In-Reply-To: <ef1899de-bba6-4c60-8cdb-2ed2e4e6ee0f@default>
[-- Attachment #1: Type: text/plain, Size: 961 bytes --]
On Sat, 2018-01-20 at 12:28 -0800, Liran Alon wrote:
> Isn't it cleaner to check for "boot_cpu_has(X86_FEATURE_IBPB)" both
> in svm_vcpu_init_msrpm() and hardware_setup()?
Strictly speaking that's a different check. That's checking if we're
*using* IBPB, not if it exists.
Now that's probably OK here, since we need it for retpoline *and* IBRS-
based mitigations. And we *might* argue that 'nospectre_v2' on the host
kernel command line should indeed stop us exposing the features to
guests. Maybe.
But next comes IBRS support, and we definitely *won't* want to make
exposing that to guests conditional on X86_FEATURE_IBRS, because in the
retpoline case that won't be set and we probably *will* still want to
expose it to guests based merely on the fact that it exists.
So I think Karim has it right here (modulo the change I already made).
If we want a separate control for "don't expose these to guests", we
should do that explicitly.
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5210 bytes --]
next prev parent reply other threads:[~2018-01-20 20:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-20 20:28 [RFC 02/10] x86/kvm: Add IBPB support Liran Alon
2018-01-20 20:36 ` Woodhouse, David [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-01-20 19:22 [RFC 00/10] Speculation Control feature support KarimAllah Ahmed
2018-01-20 19:22 ` [RFC 02/10] x86/kvm: Add IBPB support KarimAllah Ahmed
2018-01-20 20:18 ` Woodhouse, David
2018-01-22 18:56 ` Jim Mattson
2018-01-22 19:31 ` Jim Mattson
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=1516480580.9814.14.camel@amazon.co.uk \
--to=dwmw@amazon.co.uk \
--cc=Janakarajan.Natarajan@amd.com \
--cc=aarcange@redhat.com \
--cc=ak@linux.intel.com \
--cc=arjan.van.de.ven@intel.com \
--cc=arjan@linux.intel.com \
--cc=ashok.raj@intel.com \
--cc=asit.k.mallick@intel.com \
--cc=bp@suse.de \
--cc=dan.j.williams@intel.com \
--cc=dave.hansen@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=joro@8bytes.org \
--cc=jun.nakajima@intel.com \
--cc=karahmed@amazon.de \
--cc=kvm@vger.kernel.org \
--cc=labbott@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=liran.alon@oracle.com \
--cc=luto@kernel.org \
--cc=mhiramat@kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterz@infradead.org \
--cc=rkrcmar@redhat.com \
--cc=tglx@linutronix.de \
--cc=thomas.lendacky@amd.com \
--cc=tim.c.chen@linux.intel.com \
--cc=torvalds@linux-foundation.org \
--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;
as well as URLs for NNTP newsgroup(s).