Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=62b9abaaf8423a3a38b938831b3b8431a6607ad8
Commit:     62b9abaaf8423a3a38b938831b3b8431a6607ad8
Parent:     722f6ecbcf3e53809236b36e6dfd9042924a2d51
Author:     Joerg Roedel <[EMAIL PROTECTED]>
AuthorDate: Tue Dec 11 15:36:57 2007 +0100
Committer:  Avi Kivity <[EMAIL PROTECTED]>
CommitDate: Wed Jan 30 17:53:22 2008 +0200

    KVM: SVM: support writing 0 to K8 performance counter control registers
    
    This lets SVM ignore writes of the value 0 to the performance counter 
control
    registers.  Thus enabling them will still fail in the guest, but a write of 0
    which keeps them disabled is accepted.  This is required to boot Windows
    Vista 64bit.
    
    [avi: avoid fall-thru in switch statement]
    
    Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]>
    Signed-off-by: Markus Rechberger <[EMAIL PROTECTED]>
    Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>
---
 drivers/kvm/svm.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c
index 442ca81..ef21804 100644
--- a/drivers/kvm/svm.c
+++ b/drivers/kvm/svm.c
@@ -1155,7 +1155,20 @@ static int svm_set_msr(struct kvm_vcpu *vcpu, unsigned 
ecx, u64 data)
        case MSR_IA32_SYSENTER_ESP:
                svm->vmcb->save.sysenter_esp = data;
                break;
+       case MSR_K7_EVNTSEL0:
+       case MSR_K7_EVNTSEL1:
+       case MSR_K7_EVNTSEL2:
+       case MSR_K7_EVNTSEL3:
+               /*
+                * only support writing 0 to the performance counters for now
+                * to make Windows happy. Should be replaced by a real
+                * performance counter emulation later.
+                */
+               if (data != 0)
+                       goto unhandled;
+               break;
        default:
+       unhandled:
                return kvm_set_msr_common(vcpu, ecx, data);
        }
        return 0;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to