active by default.
### ucode
-> `= List of [ <integer> | scan=<bool>, nmi=<bool> ]`
+> `= List of [ <integer> | scan=<bool>, nmi=<bool>, allow-same=<bool> ]`
Applicability: x86
Default: `nmi`
stop_machine context. In NMI handler, even NMIs are blocked, which is
considered safer. The default value is `true`.
+'allow-same' alters the default acceptance policy for new microcode to permit
+trying to reload the same version. Many CPUs will actually reload microcode
+of the same version, and this allows for easy testing of the late microcode
+loading path.
+
### unrestricted_guest (Intel)
> `= <boolean>`
if ( new_rev > old_rev )
return NEW_UCODE;
+ if ( opt_ucode_allow_same && new_rev == old_rev )
+ return NEW_UCODE;
+
return OLD_UCODE;
}
/* By default, ucode loading is done in NMI handler */
static bool ucode_in_nmi = true;
+bool __read_mostly opt_ucode_allow_same;
+
/* Protected by microcode_mutex */
static struct microcode_patch *microcode_cache;
if ( (val = parse_boolean("nmi", s, ss)) >= 0 )
ucode_in_nmi = val;
+ else if ( (val = parse_boolean("allow-same", s, ss)) >= 0 )
+ opt_ucode_allow_same = val;
else if ( !ucode_mod_forced ) /* Not forced by EFI */
{
if ( (val = parse_boolean("scan", s, ss)) >= 0 )
if ( new_rev > old_rev )
return NEW_UCODE;
+ if ( opt_ucode_allow_same && new_rev == old_rev )
+ return NEW_UCODE;
+
/*
* Treat pre-production as always applicable - anyone using pre-production
* microcode knows what they are doing, and can keep any resulting pieces.
#include <asm/microcode.h>
+extern bool opt_ucode_allow_same;
+
enum microcode_match_result {
OLD_UCODE, /* signature matched, but revision id is older or equal */
NEW_UCODE, /* signature matched, but revision id is newer */