]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
KVM: SVM: reset mmu context in init_vmcb
authorMarcelo Tosatti <mtosatti@redhat.com>
Tue, 31 Aug 2010 22:13:13 +0000 (19:13 -0300)
committerAvi Kivity <avi@redhat.com>
Sun, 24 Oct 2010 08:51:50 +0000 (10:51 +0200)
Since commit aad827034e419fa no mmu reinitialization is performed
via init_vmcb.

Zero vcpu->arch.cr0 and pass the reset value as a parameter to
kvm_set_cr0.

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

index ff28f6521065dfd8e6ff700f8f973845b9f1d8e6..60bc1e53d2370ea8f36f27785af969d5ab8453e7 100644 (file)
@@ -827,8 +827,8 @@ static void init_vmcb(struct vcpu_svm *svm)
         * This is the guest-visible cr0 value.
         * svm_set_cr0() sets PG and WP and clears NW and CD on save->cr0.
         */
-       svm->vcpu.arch.cr0 = X86_CR0_NW | X86_CR0_CD | X86_CR0_ET;
-       (void)kvm_set_cr0(&svm->vcpu, svm->vcpu.arch.cr0);
+       svm->vcpu.arch.cr0 = 0;
+       (void)kvm_set_cr0(&svm->vcpu, X86_CR0_NW | X86_CR0_CD | X86_CR0_ET);
 
        save->cr4 = X86_CR4_PAE;
        /* rdx = ?? */