linamh/app-emulation/kvm/files/kvm-kernel-msr.patch

28 lines
785 B
Diff
Raw Normal View History

Index: kvm-75/kernel/x86/x86.c
===================================================================
--- kvm-75.orig/kernel/x86/x86.c
+++ kvm-75/kernel/x86/x86.c
@@ -874,7 +874,11 @@ static int set_msr_mtrr(struct kvm_vcpu
int kvm_set_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 data)
{
+printk(KERN_INFO "MSR write: 0x%lx = 0x%llx\n", msr, data);
switch (msr) {
+ case 0xe2:
+ printk(KERN_INFO "CState MSR write: 0x%llx\n", data);
+ break;
case MSR_EFER:
set_efer(vcpu, data);
break;
@@ -1025,6 +1029,10 @@ int kvm_get_msr_common(struct kvm_vcpu *
case MSR_EFER:
data = vcpu->arch.shadow_efer;
break;
+ case 0xe2:
+ printk(KERN_INFO "CState MSR read: 0x0\n");
+ data = 0;
+ break;
case MSR_KVM_WALL_CLOCK:
data = vcpu->kvm->arch.wall_clock;
break;