@@ -5955,7 +5955,12 @@ static void x86_cpu_reset(DeviceState *dev)
env->tsc = 0;
}
- env->msr_ia32_misc_enable = MSR_IA32_MISC_ENABLE_DEFAULT;
+ /* Disable BTS feature which is unsupported on KVM */
+ env->msr_ia32_misc_enable = MSR_IA32_MISC_ENABLE_DEFAULT |
+ MSR_IA32_MISC_ENABLE_BTS_UNAVAIL;
+ if (cpu->enable_pmu) {
+ env->msr_ia32_misc_enable |= MSR_IA32_MISC_ENABLE_EMON;
+ }
if (env->features[FEAT_1_ECX] & CPUID_EXT_MONITOR) {
env->msr_ia32_misc_enable |= MSR_IA32_MISC_ENABLE_MWAIT;
}
@@ -434,8 +434,10 @@ typedef enum X86Seg {
#define MSR_IA32_MISC_ENABLE 0x1a0
/* Indicates good rep/movs microcode on some processors: */
-#define MSR_IA32_MISC_ENABLE_DEFAULT 1
-#define MSR_IA32_MISC_ENABLE_MWAIT (1ULL << 18)
+#define MSR_IA32_MISC_ENABLE_DEFAULT (1ULL << 0)
+#define MSR_IA32_MISC_ENABLE_EMON (1ULL << 7)
+#define MSR_IA32_MISC_ENABLE_BTS_UNAVAIL (1ULL << 11)
+#define MSR_IA32_MISC_ENABLE_MWAIT (1ULL << 18)
#define MSR_MTRRphysBase(reg) (0x200 + 2 * (reg))
#define MSR_MTRRphysMask(reg) (0x200 + 2 * (reg) + 1)