From: Borislav Petkov <bp@alien8.de>
To: Mihai Carabas <mihai.carabas@oracle.com>
Cc: linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Jonathan Corbet <corbet@lwn.net>,
linux-doc@vger.kernel.org
Subject: Re: [PATCH RFC 3/3] Documentation: x86: microcode: add description for metadata file
Date: Mon, 4 May 2020 16:09:40 +0200 [thread overview]
Message-ID: <20200504140940.GF15046@zn.tnic> (raw)
In-Reply-To: <1587972479-10971-4-git-send-email-mihai.carabas@oracle.com>
On Mon, Apr 27, 2020 at 10:27:59AM +0300, Mihai Carabas wrote:
> +Here is an example of content for the metadata file::
> + m + 0x00000122
> + m - 0x00000120
That's not enough. Imagine a blob adds the MSR and a subsequent blob
adds *another* bit in that MSR. You need to be able express that.
IOW, I think it would be easier if each line describes exactly *one*
software-visible change brought by the microcode.
Also, what is the use case to say that you're adding a new MSR?
This would require to patch all the code that *potentially* might use
that MSR, to be able to handle a *change* in that MSR or it appearing
all of a sudden. Yuck.
I mean, an easy way to handle it is to say, "Hmm, nope, won't load that
ucode."
> + c + 0x00000007 0x00 0x00000000 0x021cbfbb 0x00000000 0x00000000
> + c - 0x00000007 0x00 0x00000000 0x021cbfbb 0x00000000 0x00000000
I don't think this'll work with the vendors as depending on the
configuration, CPUID on the different platforms could be different.
And then you might gonna have to specify CPUID for this particular
{family,model,stepping, ... } tuple which identifies the platform
uniquely so the c-line is insufficient.
IOW, I think it would be easier to be able to specify one CPUID bit per
line of being added/removed so that the post-load callback can handle
this properly. And this specification needs to be complete: i.e.
"I'm adding this CPUID bit for this family,model,stepping configurations
under this and that conditions".
And that needs to be describable by the "language" of the metadata.
So think of actual examples and then try to represent them with this
format.
But all of this is moot if you don't get a vendor buy-in into this. IOW,
microcode vendors need to agree to this format and adhere to the format
when allowing microcode to late-load.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
next prev parent reply other threads:[~2020-05-04 14:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-27 7:27 [PATCH RFC] Microcode late loading feature identification Mihai Carabas
2020-04-27 7:27 ` [PATCH RFC 1/3] x86: microcode: intel: read microcode metadata file Mihai Carabas
2020-05-04 14:12 ` Borislav Petkov
2020-04-27 7:27 ` [PATCH RFC 2/3] x86: microcode: intel: process microcode metadata Mihai Carabas
2020-04-27 7:27 ` [PATCH RFC 3/3] Documentation: x86: microcode: add description for metadata file Mihai Carabas
2020-05-04 14:09 ` Borislav Petkov [this message]
2020-05-11 14:11 ` [PATCH RFC] Microcode late loading feature identification Mihai Carabas
2020-05-11 15:23 ` 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=20200504140940.GF15046@zn.tnic \
--to=bp@alien8.de \
--cc=corbet@lwn.net \
--cc=hpa@zytor.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mihai.carabas@oracle.com \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--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).