x86/ucode: Drop the sanity check for interrupts being disabled
PATCH 1/1 x86/ucode: Drop the sanity check for interrupts being disabled
Of the substantial number of things which can go wrong during microcode load, this is not one. Loading occurs entirely within the boundary of a single WRMSR instruction. Its certainly not a BUG()-worthy condition.
Xen has legitimate reasons to not want interrupts enabled at this point, but that is to do with organising the system rendezvous. As these are private low level helpers invoked only from the microcode core logic, forgo the check entirely.
While dropping system.h, clean up the processor.h include which was an oversight in the previous header cleanup.
---
CC: Jan Beulich <[email protected]>
CC: Wei Liu <[email protected]>
CC: Roger Pau Monné <[email protected]>
An ASSERT() would be one option, but I'd prefer to remove the include.
--- xen/arch/x86/cpu/microcode/amd.c | 4 ---- xen/arch/x86/cpu/microcode/intel.c | 4 ---- 2 files changed, 8 deletions(-)
xen/arch/x86/cpu/microcode/amd.c +0 -4
@@ -20,8 +20,6 @@#include <asm/hvm/svm/svm.h> #include <asm/msr.h> -#include <asm/processor.h> -#include <asm/system.h> #include "private.h"
@@ -237,8 +235,6 @@ static int apply_microcode(const struct microcode_patch *patch) hdr = patch->mpb; -BUG_ON (local_irq_is_enabled ()); - hw_err =wrmsr_safe (MSR_AMD_PATCHLOADER , (unsigned long )hdr);/* get patch id after patching */
xen/arch/x86/cpu/microcode/intel.c +0 -4
@@ -25,8 +25,6 @@#include <xen/init.h> #include <asm/msr.h> -#include <asm/processor.h> -#include <asm/system.h> #include "private.h"
@@ -304,8 +302,6 @@ static int apply_microcode(const struct microcode_patch *patch)if ( !match_cpu (patch) )return -EINVAL ; -BUG_ON (local_irq_is_enabled ()); -/* write microcode via MSR 0x79 */ wrmsrl (MSR_IA32_UCODE_WRITE , (unsigned long )patch->data);
Signature · 1 line
2.11.0
Quoted 9 lines · Andrew Cooper
Of the substantial number of things which can go wrong during microcode load, this is not one. Loading occurs entirely within the boundary of a single WRMSR instruction. Its certainly not a BUG()-worthy condition.
Xen has legitimate reasons to not want interrupts enabled at this point, but that is to do with organising the system rendezvous. As these are private low level helpers invoked only from the microcode core logic, forgo the check entirely.
Quoted 4 lines
While dropping
system.h, clean up theprocessor.hinclude which was an oversight in the previous header cleanup.Signed-off-by Andrew Cooper <[email protected]>