diff options
Diffstat (limited to 'arch/x86/include/asm/processor.h')
-rw-r--r-- | arch/x86/include/asm/processor.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index 5ca01e383269..091cd8855f2e 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h | |||
@@ -110,6 +110,7 @@ struct cpuinfo_x86 { | |||
110 | /* Index into per_cpu list: */ | 110 | /* Index into per_cpu list: */ |
111 | u16 cpu_index; | 111 | u16 cpu_index; |
112 | #endif | 112 | #endif |
113 | unsigned int x86_hyper_vendor; | ||
113 | } __attribute__((__aligned__(SMP_CACHE_BYTES))); | 114 | } __attribute__((__aligned__(SMP_CACHE_BYTES))); |
114 | 115 | ||
115 | #define X86_VENDOR_INTEL 0 | 116 | #define X86_VENDOR_INTEL 0 |
@@ -123,6 +124,9 @@ struct cpuinfo_x86 { | |||
123 | 124 | ||
124 | #define X86_VENDOR_UNKNOWN 0xff | 125 | #define X86_VENDOR_UNKNOWN 0xff |
125 | 126 | ||
127 | #define X86_HYPER_VENDOR_NONE 0 | ||
128 | #define X86_HYPER_VENDOR_VMWARE 1 | ||
129 | |||
126 | /* | 130 | /* |
127 | * capabilities of CPUs | 131 | * capabilities of CPUs |
128 | */ | 132 | */ |
@@ -752,6 +756,19 @@ extern void switch_to_new_gdt(void); | |||
752 | extern void cpu_init(void); | 756 | extern void cpu_init(void); |
753 | extern void init_gdt(int cpu); | 757 | extern void init_gdt(int cpu); |
754 | 758 | ||
759 | static inline unsigned long get_debugctlmsr(void) | ||
760 | { | ||
761 | unsigned long debugctlmsr = 0; | ||
762 | |||
763 | #ifndef CONFIG_X86_DEBUGCTLMSR | ||
764 | if (boot_cpu_data.x86 < 6) | ||
765 | return 0; | ||
766 | #endif | ||
767 | rdmsrl(MSR_IA32_DEBUGCTLMSR, debugctlmsr); | ||
768 | |||
769 | return debugctlmsr; | ||
770 | } | ||
771 | |||
755 | static inline void update_debugctlmsr(unsigned long debugctlmsr) | 772 | static inline void update_debugctlmsr(unsigned long debugctlmsr) |
756 | { | 773 | { |
757 | #ifndef CONFIG_X86_DEBUGCTLMSR | 774 | #ifndef CONFIG_X86_DEBUGCTLMSR |