mirror of https://gitee.com/openkylin/linux.git
x86/MSR: Move native_* variants to msr.h
... 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
This commit is contained in:
parent
1b88accf6a
commit
c996f38020
|
@ -6,20 +6,6 @@
|
||||||
#include <linux/earlycpio.h>
|
#include <linux/earlycpio.h>
|
||||||
#include <linux/initrd.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 ucode_patch {
|
||||||
struct list_head plist;
|
struct list_head plist;
|
||||||
void *data; /* Intel uses only this one */
|
void *data; /* Intel uses only this one */
|
||||||
|
|
|
@ -108,6 +108,20 @@ static inline void notrace __wrmsr(unsigned int msr, u32 low, u32 high)
|
||||||
: : "c" (msr), "a"(low), "d" (high) : "memory");
|
: : "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)
|
static inline unsigned long long native_read_msr(unsigned int msr)
|
||||||
{
|
{
|
||||||
unsigned long long val;
|
unsigned long long val;
|
||||||
|
|
|
@ -49,7 +49,6 @@
|
||||||
#include <asm/debugreg.h>
|
#include <asm/debugreg.h>
|
||||||
#include <asm/kvm_para.h>
|
#include <asm/kvm_para.h>
|
||||||
#include <asm/irq_remapping.h>
|
#include <asm/irq_remapping.h>
|
||||||
#include <asm/microcode.h>
|
|
||||||
#include <asm/nospec-branch.h>
|
#include <asm/nospec-branch.h>
|
||||||
|
|
||||||
#include <asm/virtext.h>
|
#include <asm/virtext.h>
|
||||||
|
|
|
@ -51,7 +51,6 @@
|
||||||
#include <asm/apic.h>
|
#include <asm/apic.h>
|
||||||
#include <asm/irq_remapping.h>
|
#include <asm/irq_remapping.h>
|
||||||
#include <asm/mmu_context.h>
|
#include <asm/mmu_context.h>
|
||||||
#include <asm/microcode.h>
|
|
||||||
#include <asm/nospec-branch.h>
|
#include <asm/nospec-branch.h>
|
||||||
|
|
||||||
#include "trace.h"
|
#include "trace.h"
|
||||||
|
|
Loading…
Reference in New Issue