Re: [PATCH 3/2] x86/microcode/intel: Add a helper which gives the microcode revision

From: Boris Ostrovsky
Date: Wed Dec 28 2016 - 14:27:55 EST




On 12/28/2016 07:53 AM, Borislav Petkov wrote:
On Wed, Dec 28, 2016 at 12:21:20PM +0100, Borislav Petkov wrote:
From: Borislav Petkov <bp@xxxxxxx>

Intel supplies the microcode revision value in MSR 0x8b
(IA32_BIOS_SIGN_ID) after CPUID(1) has been executed. Execute it each
time before reading that MSR.

And then, we can go a step further and even do a separate helper which does the
required steps to read out the microcode revision so that we don't forget them
next time we change the code.

Provided that works for xen, though, because I need to do the native
variants but early_init_intel() can call the paravirt *msr() versions
and I have no idea whether that's kosher on xen pv.

Boris, any objections?

I think this should work. MSR_IA32_UCODE_REV can be natively read and written with zero without any side effects.

-boris