x86/MSR: Move native_* variants to msr.h
authorBorislav Petkov <bp@suse.de>
Thu, 1 Mar 2018 15:13:36 +0000 (16:13 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 8 Mar 2018 09:22:57 +0000 (10:22 +0100)
... where they belong.

No functional change.

Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Cc: kvm@vger.kernel.org
Link: https://lkml.kernel.org/r/20180301151336.12948-1-bp@alien8.de
arch/x86/include/asm/microcode.h
arch/x86/include/asm/msr.h
arch/x86/kvm/svm.c
arch/x86/kvm/vmx.c

index 7fb1047d61c7b5175906eddc903d23866e8a7bef..871714e2e4c66118238d4b50c153366de80b7034 100644 (file)
@@ -6,20 +6,6 @@
 #include <linux/earlycpio.h>
 #include <linux/initrd.h>
 
-#define native_rdmsr(msr, val1, val2)                  \
-do {                                                   \
-       u64 __val = __rdmsr((msr));                     \
-       (void)((val1) = (u32)__val);                    \
-       (void)((val2) = (u32)(__val >> 32));            \
-} while (0)
-
-#define native_wrmsr(msr, low, high)                   \
-       __wrmsr(msr, low, high)
-
-#define native_wrmsrl(msr, val)                                \
-       __wrmsr((msr), (u32)((u64)(val)),               \
-                      (u32)((u64)(val) >> 32))
-
 struct ucode_patch {
        struct list_head plist;
        void *data;             /* Intel uses only this one */
index 30df295f6d94c8ac6d87613acae8a32c50436c6d..77254c9c8f61e3bcd0bd343f44f9aa905913f353 100644 (file)
@@ -108,6 +108,20 @@ static inline void notrace __wrmsr(unsigned int msr, u32 low, u32 high)
                     : : "c" (msr), "a"(low), "d" (high) : "memory");
 }
 
+#define native_rdmsr(msr, val1, val2)                  \
+do {                                                   \
+       u64 __val = __rdmsr((msr));                     \
+       (void)((val1) = (u32)__val);                    \
+       (void)((val2) = (u32)(__val >> 32));            \
+} while (0)
+
+#define native_wrmsr(msr, low, high)                   \
+       __wrmsr(msr, low, high)
+
+#define native_wrmsrl(msr, val)                                \
+       __wrmsr((msr), (u32)((u64)(val)),               \
+                      (u32)((u64)(val) >> 32))
+
 static inline unsigned long long native_read_msr(unsigned int msr)
 {
        unsigned long long val;
index be9c839e2c89967d689485dbb8e51763980dd151..9d2043f94e299d352d16d9975526b9c31e20cefd 100644 (file)
@@ -49,7 +49,6 @@
 #include <asm/debugreg.h>
 #include <asm/kvm_para.h>
 #include <asm/irq_remapping.h>
-#include <asm/microcode.h>
 #include <asm/nospec-branch.h>
 
 #include <asm/virtext.h>
index 051dab74e4e928ac7bf90598c0b9a9a8d8855f13..ee5ed44bc284a0d2aa47d47a347ab28870dacf98 100644 (file)
@@ -51,7 +51,6 @@
 #include <asm/apic.h>
 #include <asm/irq_remapping.h>
 #include <asm/mmu_context.h>
-#include <asm/microcode.h>
 #include <asm/nospec-branch.h>
 
 #include "trace.h"