From: "Raj, Ashok" <ashok.raj@intel.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Johannes Erdfelt <johannes@erdfelt.com>,
Borislav Petkov <bp@alien8.de>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
Mihai Carabas <mihai.carabas@oracle.com>,
"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@redhat.com>,
Jon Grimm <Jon.Grimm@amd.com>,
kanth.ghatraju@oracle.com, konrad.wilk@oracle.com,
patrick.colp@oracle.com, Tom Lendacky <thomas.lendacky@amd.com>,
x86-ml <x86@kernel.org>,
linux-kernel@vger.kernel.org, Ashok Raj <ashok.raj@intel.com>
Subject: Re: [PATCH] x86/microcode: Add an option to reload microcode even if revision is unchanged
Date: Tue, 17 Sep 2019 07:29:50 -0700 [thread overview]
Message-ID: <20190917142949.GA28218@araj-mobl1.jf.intel.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1909170824220.2066@nanos.tec.linutronix.de>
Hi Thomas,
On Tue, Sep 17, 2019 at 08:37:10AM +0200, Thomas Gleixner wrote:
> > microode updates should be of 3 types.
> >
> > - Only loadable from BIOS (Only via FIT tables)
> > - Suitable for early load (things that take cpuid bits for e.g.)
> > - Suitable for late-load. (Where no cpuid bits should change etc).
> >
> > Today the way we load after a stop_machine() all threads in the system are
> > held hostage until all the cores have done the update. The thread sibling
> > is also in the rendezvous loop.
>
> I know. See below.
>
> > Do you think we still have that risk with a sibling thread?
> > (Assuming future ucodes don't do weird things like what happened in
> > that case where a cpuid was removed via an update)
>
> Well, yes. The sibling executes a limited set of instructions in a loop,
> but it might be hit by an NMI or MCE which executes even more instructions.
There is a plan to solve the NMI issue. Although there is one case we might
be showing as a spurious that might not be nice. If #MCE's showup there is
nothing we can do at that point. These are most likely unrecoverable.
But we want to make sure we could atleast follow through with a proper reset.
Let me gather my thoughts on that when i have the patch ready to handle
those senarios.
>
> So what happens if the ucode update "fixes" one of the executed
> instructions on the fly? Is that guaranteed to be safe? There is nothing
> which says so.
>
> A decade ago I experimented with putting the spinning CPUs into MWAIT,
> which caused havoc. Did neither have time nor the stomach to dig into that
> further, but the ucode update _did_ fix an issue with MWAIT according to
> the version history.
Excellent point.
>
> That's why I'm worried about instructions being "fixed" which are executed
> in parallel on the sibling.
>
> An authorative statement vs. that would be appreciated. Preferrably in form
> of an extension of the SDM, but an upfront statement in this thread would
> be a good start.
I have started the conversation internally. Once we have something solid
I'll share in the list, and also follow up with updates to SDM.
Cheers,
Ashok
next prev parent reply other threads:[~2019-09-17 14:29 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-29 5:33 Ashok Raj
2019-08-29 5:38 ` Raj, Ashok
2019-08-29 6:09 ` Borislav Petkov
2019-08-29 13:02 ` Raj, Ashok
2019-09-03 16:46 ` Borislav Petkov
2019-09-04 22:06 ` Boris Ostrovsky
2019-09-04 22:12 ` Boris Petkov
2019-09-05 0:21 ` Raj, Ashok
2019-09-05 7:20 ` Borislav Petkov
2019-09-05 10:51 ` Thomas Gleixner
2019-09-05 19:40 ` Raj, Ashok
2019-09-05 19:49 ` Borislav Petkov
2019-09-05 20:20 ` Raj, Ashok
2019-09-05 21:22 ` Thomas Gleixner
2019-09-05 22:27 ` Raj, Ashok
2019-09-06 7:46 ` Borislav Petkov
2019-09-06 12:51 ` Thomas Gleixner
2019-09-06 14:40 ` Johannes Erdfelt
2019-09-06 15:16 ` Borislav Petkov
2019-09-06 15:46 ` Johannes Erdfelt
2019-09-06 16:17 ` Borislav Petkov
2019-09-06 16:43 ` Konrad Rzeszutek Wilk
2019-09-06 17:10 ` Borislav Petkov
2019-09-06 16:52 ` Johannes Erdfelt
2019-09-06 17:17 ` Borislav Petkov
2019-09-06 21:16 ` Thomas Gleixner
2019-09-07 0:33 ` Raj, Ashok
2019-09-07 10:37 ` Thomas Gleixner
2019-09-16 10:36 ` Thomas Gleixner
2019-09-17 0:31 ` Raj, Ashok
2019-09-17 6:37 ` Thomas Gleixner
2019-09-17 6:46 ` Borislav Petkov
2019-09-17 14:29 ` Raj, Ashok [this message]
2019-09-19 19:48 ` Mihai Carabas
2019-09-06 16:55 ` Raj, Ashok
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=20190917142949.GA28218@araj-mobl1.jf.intel.com \
--to=ashok.raj@intel.com \
--cc=Jon.Grimm@amd.com \
--cc=boris.ostrovsky@oracle.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=johannes@erdfelt.com \
--cc=kanth.ghatraju@oracle.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mihai.carabas@oracle.com \
--cc=mingo@redhat.com \
--cc=patrick.colp@oracle.com \
--cc=tglx@linutronix.de \
--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
Powered by JetHome