Commit efa67e0d authored by Chris Lalancette's avatar Chris Lalancette Committed by Avi Kivity

KVM: VMX: Fake emulate Intel perfctr MSRs

Older linux guests (in this case, 2.6.9) can attempt to
access the performance counter MSRs without a fixup section, and injecting
a GPF kills the guest.  Work around by allowing the guest to write those MSRs.

Tested by me on RHEL-4 i386 and x86_64 guests, as well as F-9 guests.
Signed-off-by: default avatarChris Lalancette <clalance@redhat.com>
Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
parent 65267ea1
...@@ -920,6 +920,18 @@ static int vmx_set_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 data) ...@@ -920,6 +920,18 @@ static int vmx_set_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 data)
break; break;
case MSR_IA32_TIME_STAMP_COUNTER: case MSR_IA32_TIME_STAMP_COUNTER:
guest_write_tsc(data); guest_write_tsc(data);
break;
case MSR_P6_PERFCTR0:
case MSR_P6_PERFCTR1:
case MSR_P6_EVNTSEL0:
case MSR_P6_EVNTSEL1:
/*
* Just discard all writes to the performance counters; this
* should keep both older linux and windows 64-bit guests
* happy
*/
pr_unimpl(vcpu, "unimplemented perfctr wrmsr: 0x%x data 0x%llx\n", msr_index, data);
break; break;
default: default:
vmx_load_host_state(vmx); vmx_load_host_state(vmx);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment