diff mbox

[-tip] x86: kvm/x86.c use MSR names in place of address

Message ID 1242279010.4574.6.camel@localhost.localdomain (mailing list archive)
State New, archived
Headers show

Commit Message

Jaswinder Singh Rajput May 14, 2009, 5:30 a.m. UTC
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(-)

Comments

Jaswinder Singh Rajput May 15, 2009, 1:13 p.m. UTC | #1
On Thu, 2009-05-14 at 11:00 +0530, Jaswinder Singh Rajput wrote:

> 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>
> ---

This patch can also apply to kvm tree without any changes.

Thanks,

--
JSR

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Avi Kivity May 17, 2009, 6:57 p.m. UTC | #2
Jaswinder Singh Rajput wrote:
> [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.
>
>   

Applied, thanks.
diff mbox

Patch

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;