From: Dongxiao Xu Date: Mon, 6 Oct 2014 10:44:23 +0000 (+0200) Subject: x86: add CMT related MSRs in allowed list X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~4258 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=758b3b4ac2c7967d80c952da943a1ebddc66d2a2;p=xen.git x86: add CMT related MSRs in allowed list 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 Signed-off-by: Chao Peng Reviewed-by: Andrew Cooper Acked-by: Jan Beulich Release-Acked-by: Konrad Rzeszutek Wilk --- diff --git a/xen/arch/x86/platform_hypercall.c b/xen/arch/x86/platform_hypercall.c index 82fbb02052..32f39b2213 100644 --- a/xen/arch/x86/platform_hypercall.c +++ b/xen/arch/x86/platform_hypercall.c @@ -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; } diff --git a/xen/include/asm-x86/msr-index.h b/xen/include/asm-x86/msr-index.h index 7214b40fe9..83f2f70587 100644 --- a/xen/include/asm-x86/msr-index.h +++ b/xen/include/asm-x86/msr-index.h @@ -324,6 +324,8 @@ #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 */