Commit 0c12d18a authored by Borislav Petkov's avatar Borislav Petkov Committed by Thomas Gleixner

x86/microcode: Convert to bare minimum MSR accessors

Having tracepoints to the MSR accessors makes them unsuitable for early
microcode loading: think 32-bit before paging is enabled and us chasing
pointers to test whether a tracepoint is enabled or not. Results in a
reliable triple fault.

Convert to the bare ones.
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Link: http://lkml.kernel.org/r/20170120202955.4091-4-bp@alien8.deSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent a585df8e
...@@ -7,18 +7,17 @@ ...@@ -7,18 +7,17 @@
#define native_rdmsr(msr, val1, val2) \ #define native_rdmsr(msr, val1, val2) \
do { \ do { \
u64 __val = native_read_msr((msr)); \ u64 __val = __rdmsr((msr)); \
(void)((val1) = (u32)__val); \ (void)((val1) = (u32)__val); \
(void)((val2) = (u32)(__val >> 32)); \ (void)((val2) = (u32)(__val >> 32)); \
} while (0) } while (0)
#define native_wrmsr(msr, low, high) \ #define native_wrmsr(msr, low, high) \
native_write_msr(msr, low, high) __wrmsr(msr, low, high)
#define native_wrmsrl(msr, val) \ #define native_wrmsrl(msr, val) \
native_write_msr((msr), \ __wrmsr((msr), (u32)((u64)(val)), \
(u32)((u64)(val)), \ (u32)((u64)(val) >> 32))
(u32)((u64)(val) >> 32))
struct ucode_patch { struct ucode_patch {
struct list_head plist; struct list_head plist;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment