From patchwork Thu May 14 05:30:10 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaswinder Singh Rajput X-Patchwork-Id: 23693 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n4E5VOul018566 for ; Thu, 14 May 2009 05:31:24 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752538AbZENFbU (ORCPT ); Thu, 14 May 2009 01:31:20 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751425AbZENFbU (ORCPT ); Thu, 14 May 2009 01:31:20 -0400 Received: from hera.kernel.org ([140.211.167.34]:43879 "EHLO hera.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751058AbZENFbU (ORCPT ); Thu, 14 May 2009 01:31:20 -0400 Received: from [192.168.1.2] (triband-del-59.180.98.212.bol.net.in [59.180.98.212] (may be forged)) (authenticated bits=0) by hera.kernel.org (8.14.2/8.13.8) with ESMTP id n4E5UGhw014153 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Thu, 14 May 2009 05:30:19 GMT Subject: [PATCH -tip] x86: kvm/x86.c use MSR names in place of address From: Jaswinder Singh Rajput To: Huang Ying , Ingo Molnar , x86 maintainers Cc: Avi Kivity , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Andi Kleen In-Reply-To: <1242032889.8213.32.camel@yhuang-dev.sh.intel.com> References: <1242031695.8213.17.camel@yhuang-dev.sh.intel.com> <1242032701.3114.4.camel@localhost.localdomain> <1242032889.8213.32.camel@yhuang-dev.sh.intel.com> Date: Thu, 14 May 2009 11:00:10 +0530 Message-Id: <1242279010.4574.6.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.24.5 (2.24.5-1.fc10) X-Virus-Scanned: ClamAV 0.93.3/9357/Wed May 13 21:05:21 2009 on hera.kernel.org X-Virus-Status: Clean Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Mon, 2009-05-11 at 17:08 +0800, Huang Ying wrote: > On Mon, 2009-05-11 at 17:05 +0800, Jaswinder Singh Rajput wrote: > > On Mon, 2009-05-11 at 16:48 +0800, Huang Ying wrote: > > > +int kvm_get_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata) > > > +{ > > > + u64 data; > > > + > > > + switch (msr) { > > > + case 0xc0010010: /* SYSCFG */ > > > + case 0xc0010015: /* HWCR */ > > > > You can replace this with : > > > > + case MSR_K8_SYSCFG: > > + case MSR_K8_HWCR: > > > > I do not change this actually. So I think it should be changed in > another patch. > Here is the patch: [PATCH -tip] x86: kvm/x86.c use MSR names in place of address Replace 0xc0010010 with MSR_K8_SYSCFG and 0xc0010015 with MSR_K7_HWCR. Signed-off-by: Jaswinder Singh Rajput --- arch/x86/kvm/x86.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 7c1ce5a..8e4a0ef 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -866,8 +866,6 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata) u64 data; switch (msr) { - case 0xc0010010: /* SYSCFG */ - case 0xc0010015: /* HWCR */ case MSR_IA32_PLATFORM_ID: case MSR_IA32_P5_MC_ADDR: case MSR_IA32_P5_MC_TYPE: @@ -888,6 +886,8 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata) case MSR_IA32_LASTBRANCHTOIP: case MSR_IA32_LASTINTFROMIP: case MSR_IA32_LASTINTTOIP: + case MSR_K8_SYSCFG: + case MSR_K7_HWCR: case MSR_VM_HSAVE_PA: data = 0; break;