From: David Woodhouse <dwmw2@infradead.org>
To: Jim Mattson <jmattson@google.com>
Cc: "Thomas Gleixner" <tglx@linutronix.de>,
"KarimAllah Ahmed" <karahmed@amazon.de>,
"the arch/x86 maintainers" <x86@kernel.org>,
"kvm list" <kvm@vger.kernel.org>,
"Linus Torvalds" <torvalds@linux-foundation.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
LKML <linux-kernel@vger.kernel.org>,
"Borislav Petkov" <bp@alien8.de>,
"Peter Zijlstra" <peterz@infradead.org>,
"Radim Krčmář" <rkrcmar@redhat.com>,
"Van De Ven, Arjan" <arjan.van.de.ven@intel.com>,
"Dave Hansen" <dave.hansen@intel.com>,
mingo@kernel.org
Subject: Re: [PATCH v2 1/4] x86/speculation: Use IBRS if available before calling into firmware
Date: Thu, 15 Feb 2018 09:21:56 +0000 [thread overview]
Message-ID: <1518686516.12890.165.camel@infradead.org> (raw)
In-Reply-To: <CALMp9eRk8WvcALB4wHKo+P=dv2Xs9os6=15g_bL2Uy5+4uPTJA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1627 bytes --]
On Wed, 2018-02-14 at 16:46 -0800, Jim Mattson wrote:
> On Wed, Feb 14, 2018 at 3:29 PM, David Woodhouse <dwmw@amazon.co.uk> wrote:
>
> > +#define alternative_msr_write(_msr, _val, _feature) \
> > + asm volatile(ALTERNATIVE("", \
> > + "movl %[msr], %%ecx\n\t" \
> > + "movl %[val], %%eax\n\t" \
> > + "movl $0, %%edx\n\t" \
> > + "wrmsr", \
> > + _feature) \
> > + : : [msr] "i" (_msr), [val] "i" (_val) \
> > + : "eax", "ecx", "edx", "memory")
> > +
>
> It's not needed now, but this would be more generally useful if the
> high 32 bits of the MSR value could also be specified.
Yeah, if we ever do want to make it completely generic then we could
move it from nospec-branch.h to alternative.h and make it possible to
set the high word. But for now I'm inclined not to overengineer it.
The idea *was* that Boris was going to bikeshed it away into some other
form, but having just reverted two of those patches I am less inclined
to accept any more of that kind of change that doesn't actually fix a
real bug.
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5213 bytes --]
next prev parent reply other threads:[~2018-02-15 9:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-14 23:29 [PATCH v2 0/4] Speculation control improvements David Woodhouse
2018-02-14 23:29 ` [PATCH v2 1/4] x86/speculation: Use IBRS if available before calling into firmware David Woodhouse
2018-02-15 0:46 ` Jim Mattson
2018-02-15 9:21 ` David Woodhouse [this message]
2018-02-14 23:29 ` [PATCH v2 2/4] x86/speculation: Support "Enhanced IBRS" on future CPUs David Woodhouse
2018-02-14 23:29 ` [PATCH v2 3/4] Revert "x86/retpoline: Simplify vmexit_fill_RSB()" David Woodhouse
2018-02-14 23:29 ` [PATCH v2 4/4] x86/retpoline: Support retpoline build with Clang David Woodhouse
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=1518686516.12890.165.camel@infradead.org \
--to=dwmw2@infradead.org \
--cc=arjan.van.de.ven@intel.com \
--cc=bp@alien8.de \
--cc=dave.hansen@intel.com \
--cc=jmattson@google.com \
--cc=karahmed@amazon.de \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=pbonzini@redhat.com \
--cc=peterz@infradead.org \
--cc=rkrcmar@redhat.com \
--cc=tglx@linutronix.de \
--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
all inboxes | Powered by JetHome®