From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chao Peng Subject: [PATCH v19 08/10] x86: add CMT related MSRs in allowed list Date: Thu, 2 Oct 2014 19:35:33 +0800 Message-ID: <1412249735-4215-9-git-send-email-chao.p.peng@linux.intel.com> References: <1412249735-4215-1-git-send-email-chao.p.peng@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1412249735-4215-1-git-send-email-chao.p.peng@linux.intel.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: keir@xen.org, Ian.Campbell@citrix.com, stefano.stabellini@eu.citrix.com, George.Dunlap@eu.citrix.com, andrew.cooper3@citrix.com, Ian.Jackson@eu.citrix.com, JBeulich@suse.com, dgdegra@tycho.nsa.gov List-Id: xen-devel@lists.xenproject.org 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 --- xen/arch/x86/platform_hypercall.c | 8 ++++++++ xen/include/asm-x86/msr-index.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/xen/arch/x86/platform_hypercall.c b/xen/arch/x86/platform_hypercall.c index 35d9cbe..cf4b9b6 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 7214b40..83f2f70 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 */ -- 1.7.9.5