@@ -3601,6 +3601,10 @@ static int cf_check vmx_msr_write_intercept(
IA32_DEBUGCTLMSR_BTS_OFF_USR);
}
+ if (cp->basic.pmu_version >= 2 && cpu_has(¤t_cpu_data, X86_FEATURE_PDCM)) {
+ rsvd &= ~(IA32_DEBUGCTLMSR_FREEZE_LBRS_ON_PMI | IA32_DEBUGCTLMSR_FREEZE_PERFMON_ON_PMI);
+ }
+
if ( cp->feat.rtm )
rsvd &= ~IA32_DEBUGCTLMSR_RTM;
@@ -305,7 +305,9 @@
#define IA32_DEBUGCTLMSR_BTINT (1<<8) /* Branch Trace Interrupt */
#define IA32_DEBUGCTLMSR_BTS_OFF_OS (1<<9) /* BTS off if CPL 0 */
#define IA32_DEBUGCTLMSR_BTS_OFF_USR (1<<10) /* BTS off if CPL > 0 */
-#define IA32_DEBUGCTLMSR_RTM (1<<15) /* RTM debugging enable */
+#define IA32_DEBUGCTLMSR_FREEZE_LBRS_ON_PMI (1<<11) /* LBR stack frozen on PMI */
+#define IA32_DEBUGCTLMSR_FREEZE_PERFMON_ON_PMI (1<<12) /* Global counter control ENABLE bit frozen on PMI */
+#define IA32_DEBUGCTLMSR_RTM (1<<15) /* RTM debugging enable */
#define MSR_IA32_LASTBRANCHFROMIP 0x000001db
#define MSR_IA32_LASTBRANCHTOIP 0x000001dc