x86: add CMT related MSRs in allowed list
authorDongxiao Xu <dongxiao.xu@intel.com>
Mon, 6 Oct 2014 10:44:23 +0000 (12:44 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 6 Oct 2014 10:44:23 +0000 (12:44 +0200)
Tool stack will try to access the two MSRs to perform CMT
related operations, thus added them in the allowed list.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Chao Peng <chao.p.peng@linux.intel.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Release-Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
xen/arch/x86/platform_hypercall.c
xen/include/asm-x86/msr-index.h

index 82fbb020524e2f3fd736e10e98abec181f5faff4..32f39b221399fd539df1e1f6bbc4e9b3817929b0 100644 (file)
@@ -70,6 +70,14 @@ struct xen_resource_access {
 
 static bool_t allow_access_msr(unsigned int msr)
 {
+    switch ( msr )
+    {
+    /* MSR for CMT, refer to chapter 17.14 of Intel SDM. */
+    case MSR_IA32_CMT_EVTSEL:
+    case MSR_IA32_CMT_CTR:
+        return 1;
+    }
+
     return 0;
 }
 
index 7214b40fe9af8e24390d66323f64ca24f0e7e460..83f2f7058707b404d2440ccc23f837d2edbe77a4 100644 (file)
 #define MSR_IA32_ENERGY_PERF_BIAS      0x000001b0
 
 /* Platform Shared Resource MSRs */
+#define MSR_IA32_CMT_EVTSEL            0x00000c8d
+#define MSR_IA32_CMT_CTR               0x00000c8e
 #define MSR_IA32_PSR_ASSOC             0x00000c8f
 
 /* Intel Model 6 */