aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/svm.c
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@amd.com>2009-06-12 16:01:29 -0400
committerAvi Kivity <avi@redhat.com>2009-09-10 01:32:54 -0400
commit71db602322b1197e7951655c46339324b6208bf9 (patch)
tree202daeb54a853ea09775d0f66c62a58c025a9997 /arch/x86/kvm/svm.c
parent2920d7285740582d6101f32c37d8d54f82531e1e (diff)
KVM: Move performance counter MSR access interception to generic x86 path
The performance counter MSRs are different for AMD and Intel CPUs and they are chosen mainly by the CPUID vendor string. This patch catches writes to all addresses (regardless of VMX/SVM path) and handles them in the generic MSR handler routine. Writing a 0 into the event select register is something we perfectly emulate ;-), so don't print out a warning to dmesg in this case. This fixes booting a 64bit Windows guest with an AMD CPUID on an Intel host. Signed-off-by: Andre Przywara <andre.przywara@amd.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/svm.c')
-rw-r--r--arch/x86/kvm/svm.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 28b981409a8f..060aa9f5571e 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -2142,22 +2142,6 @@ static int svm_set_msr(struct kvm_vcpu *vcpu, unsigned ecx, u64 data)
2142 else 2142 else
2143 svm_disable_lbrv(svm); 2143 svm_disable_lbrv(svm);
2144 break; 2144 break;
2145 case MSR_K7_EVNTSEL0:
2146 case MSR_K7_EVNTSEL1:
2147 case MSR_K7_EVNTSEL2:
2148 case MSR_K7_EVNTSEL3:
2149 case MSR_K7_PERFCTR0:
2150 case MSR_K7_PERFCTR1:
2151 case MSR_K7_PERFCTR2:
2152 case MSR_K7_PERFCTR3:
2153 /*
2154 * Just discard all writes to the performance counters; this
2155 * should keep both older linux and windows 64-bit guests
2156 * happy
2157 */
2158 pr_unimpl(vcpu, "unimplemented perfctr wrmsr: 0x%x data 0x%llx\n", ecx, data);
2159
2160 break;
2161 case MSR_VM_HSAVE_PA: 2145 case MSR_VM_HSAVE_PA:
2162 svm->hsave_msr = data; 2146 svm->hsave_msr = data;
2163 break; 2147 break;