From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: speck@linutronix.de
Subject: [MODERATED] Re: [PATCH v2.1 3/6] [PATCH v2.1 3/6] Patch #3
Date: Thu, 21 Jun 2018 09:55:05 -0400 [thread overview]
Message-ID: <20180621135505.GC28543@char.US.ORACLE.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1806210957420.1591@nanos.tec.linutronix.de>
On Thu, Jun 21, 2018 at 09:58:32AM +0200, speck for Thomas Gleixner wrote:
> On Wed, 20 Jun 2018, speck for Konrad Rzeszutek Wilk wrote:
> > > diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
> > > index 50500cea6eba..659963bf9a3c 100644
> > > --- a/arch/x86/kernel/cpu/bugs.c
> > > +++ b/arch/x86/kernel/cpu/bugs.c
> > > @@ -53,6 +53,13 @@ static u64 __ro_after_init x86_spec_ctrl_mask = SPEC_CTRL_IBRS;
> > > u64 __ro_after_init x86_amd_ls_cfg_base;
> > > u64 __ro_after_init x86_amd_ls_cfg_ssbd_mask;
> > >
> > > +/*
> > > + * Our boot-time value of the IA32_FLUSH_CMD MSR. We read it once so that
> > > + * any writes to the IA32_FLUSH_CMD contain whatever reserved bits have been
> > > + * set.
> > > + */
> > > +static u64 __ro_after_init x86_flush_cmd;
> > > +
> > > void __init check_bugs(void)
> > > {
> > > identify_boot_cpu();
> > > @@ -85,6 +92,10 @@ void __init check_bugs(void)
> > >
> > > l1tf_select_mitigation();
> > >
> > > + /* Similar to SPEC_CTRL MSR, read it to account for reserved bits. */
> > > + if (boot_cpu_has(X86_FEATURE_FLUSH_L1D))
> > > + rdmsrl(MSR_IA32_FLUSH_CMD, x86_flush_cmd);
> >
> >
> > The spec didn't mention it but the development microcode I am assuming looks to be a
> > write-only MSR, so I changed this to:
> >
> > (void)rdmsrl_safe(MSR_IA32_FLUSH_CMD, &x86_flush_cmd);
>
> Which is pointless as my version of that magic PDF clearly says:
>
> New MSR IA32_FLUSH_CMD (MSR 0x10B, Write-only) bit 0: L1D Flush
Duh. Indeed. <rips it out>
>
> Thanks,
>
> tglx
next prev parent reply other threads:[~2018-06-21 13:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-20 20:42 [MODERATED] [PATCH v2.1 3/6] [PATCH v2.1 3/6] Patch #3 konrad.wilk
2018-06-21 3:16 ` [MODERATED] " Konrad Rzeszutek Wilk
2018-06-21 7:58 ` Thomas Gleixner
2018-06-21 13:55 ` Konrad Rzeszutek Wilk [this message]
2018-06-21 11:51 ` [MODERATED] " Paolo Bonzini
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=20180621135505.GC28543@char.US.ORACLE.com \
--to=konrad.wilk@oracle.com \
--cc=speck@linutronix.de \
/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.