x86/MSR: Carve out bare minimum accessors
Add __rdmsr() and __wrmsr() which *only* read and write an MSR with exception handling. Those are going to be used in early code, like the microcode loader, which cannot stomach tracing code piggybacking on the MSR operation. While at it, get rid of __native_write_msr_notrace(). Signed-off-by: Borislav Petkov <bp@suse.de> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/20170120202955.4091-3-bp@alien8.de Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:

committed by
Thomas Gleixner

parent
c26665ab5c
commit
a585df8eda
@@ -195,7 +195,7 @@ static inline void native_apic_msr_write(u32 reg, u32 v)
|
||||
|
||||
static inline void native_apic_msr_eoi_write(u32 reg, u32 v)
|
||||
{
|
||||
wrmsr_notrace(APIC_BASE_MSR + (APIC_EOI >> 4), APIC_EOI_ACK, 0);
|
||||
__wrmsr(APIC_BASE_MSR + (APIC_EOI >> 4), APIC_EOI_ACK, 0);
|
||||
}
|
||||
|
||||
static inline u32 native_apic_msr_read(u32 reg)
|
||||
|
Reference in New Issue
Block a user