From 2093efa638699d91aef343805ce098b0b3903be1 Mon Sep 17 00:00:00 2001 From: Juan Quintela <quintela@redhat.com> Date: Thu, 5 Mar 2009 23:20:08 +0100 Subject: [PATCH 1/2] Fix BZ483561: dmesg flooded with 'kvm: 14619: cpu1 unhandled wrmsr: 0xc0010117 data 0' errors Hi msr 0xc0010117 is MSR_VM_HSAVE_PA, and it is used in AMD hardware for svm nesting. Default msr handler upstream just ignore the MSR, and the AMD one save its value. As we are not going to support svm nesting in our qemu userland, we can just ignore the reads/writes altogether. This part of the code is identical to upstream Later, Juan. commit bec76078b609de84ba5b9b3626e28abc655ba6d2 Author: Avi Kivity <avi@redhat.com> Date: Mon Dec 29 17:32:28 2008 +0200 KVM: Fallback support for MSR_VM_HSAVE_PA Since we advertise MSR_VM_HSAVE_PA, userspace will attempt to read it even on Intel. Implement fake support for this MSR to avoid the warnings. Signed-off-by: Avi Kivity <avi@redhat.com> RH-Upstream-status: applied(kvm/master) Bugzilla: 483561 Acked-by: Eduardo Habkost <ehabkost@redhat.com> Acked-by: Avi Kivity <avi@redhat.com> --- arch/x86/kvm/x86.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 4c64655..73533a3 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -456,7 +456,7 @@ static u32 msrs_to_save[] = { MSR_CSTAR, MSR_KERNEL_GS_BASE, MSR_SYSCALL_MASK, MSR_LSTAR, #endif MSR_IA32_TIME_STAMP_COUNTER, MSR_KVM_SYSTEM_TIME, MSR_KVM_WALL_CLOCK, - MSR_IA32_PERF_STATUS, MSR_IA32_CR_PAT + MSR_IA32_PERF_STATUS, MSR_IA32_CR_PAT, MSR_VM_HSAVE_PA }; static unsigned num_msrs_to_save; @@ -722,6 +722,7 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 data) break; case MSR_IA32_UCODE_REV: case MSR_IA32_UCODE_WRITE: + case MSR_VM_HSAVE_PA: break; case 0x200 ... 0x2ff: return set_msr_mtrr(vcpu, msr, data); @@ -843,6 +844,7 @@ 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_VM_HSAVE_PA: data = 0; break; case MSR_MTRRcap: -- 1.6.1