From: Jaswinder Singh Rajput <jaswinder@kernel.org>
To: Huang Ying <ying.huang@intel.com>, Ingo Molnar <mingo@elte.hu>,
x86 maintainers <x86@kernel.org>
Cc: Avi Kivity <avi@redhat.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Andi Kleen <andi@firstfloor.org>
Subject: [PATCH -tip] x86: kvm/x86.c use MSR names in place of address
Date: Thu, 14 May 2009 11:00:10 +0530 [thread overview]
Message-ID: <1242279010.4574.6.camel@localhost.localdomain> (raw)
In-Reply-To: <1242032889.8213.32.camel@yhuang-dev.sh.intel.com>
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 <jaswinderrajput@gmail.com>
---
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;
--
1.6.0.6
next prev parent reply other threads:[~2009-05-14 5:31 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-11 8:48 [PATCH -v3] KVM: MCE: Add MCE support to KVM Huang Ying
2009-05-11 9:05 ` Jaswinder Singh Rajput
2009-05-11 9:08 ` Huang Ying
2009-05-14 5:30 ` Jaswinder Singh Rajput [this message]
2009-05-14 6:27 ` [PATCH -tip] x86: kvm replace MSR_IA32_TIME_STAMP_COUNTER with MSR_IA32_TSC of msr-index.h Jaswinder Singh Rajput
2009-05-15 13:12 ` Jaswinder Singh Rajput
2009-05-17 18:48 ` Avi Kivity
2009-05-20 8:12 ` Jaswinder Singh Rajput
2009-05-20 11:47 ` Avi Kivity
2009-05-15 13:13 ` [PATCH -tip] x86: kvm/x86.c use MSR names in place of address Jaswinder Singh Rajput
2009-05-17 18:57 ` Avi Kivity
2009-05-17 18:56 ` [PATCH -v3] KVM: MCE: Add MCE support to KVM Avi Kivity
2009-05-25 17:40 ` Jan Kiszka
2009-05-25 18:09 ` Avi Kivity
2009-05-25 18:15 ` Jan Kiszka
2009-05-25 18:20 ` Jan Kiszka
2009-05-26 8:11 ` Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1242279010.4574.6.camel@localhost.localdomain \
--to=jaswinder@kernel.org \
--cc=andi@firstfloor.org \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=x86@kernel.org \
--cc=ying.huang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox