KVM: SVM: init_vmcb should reset vcpu->efer
authorMarcelo Tosatti <mtosatti@redhat.com>
Tue, 31 Aug 2010 22:13:14 +0000 (19:13 -0300)
committerAvi Kivity <avi@redhat.com>
Sun, 24 Oct 2010 08:51:51 +0000 (10:51 +0200)
Otherwise EFER_LMA bit is retained across a SIPI reset.

Fixes guest cpu onlining.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/svm.c

index 60bc1e53d2370ea8f36f27785af969d5ab8453e7..a1a83b955ed7e1c2a06a30b493ae0fd868365161 100644 (file)
@@ -816,7 +816,7 @@ static void init_vmcb(struct vcpu_svm *svm)
        init_sys_seg(&save->ldtr, SEG_TYPE_LDT);
        init_sys_seg(&save->tr, SEG_TYPE_BUSY_TSS16);
 
-       save->efer = EFER_SVME;
+       svm_set_efer(&svm->vcpu, 0);
        save->dr6 = 0xffff0ff0;
        save->dr7 = 0x400;
        save->rflags = 2;