]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/x86/kvm/svm.c
KVM: svm: do not call kvm_set_cr0 from init_vmcb
[karo-tx-linux.git] / arch / x86 / kvm / svm.c
index fdb8cb63a6c0da7c8ba0585360646d7aa0c54f32..94b7d15db3fc91f3a70d665892f6f41832145c22 100644 (file)
@@ -202,6 +202,7 @@ module_param(npt, int, S_IRUGO);
 static int nested = true;
 module_param(nested, int, S_IRUGO);
 
+static void svm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0);
 static void svm_flush_tlb(struct kvm_vcpu *vcpu);
 static void svm_complete_interrupts(struct vcpu_svm *svm);
 
@@ -1263,7 +1264,8 @@ static void init_vmcb(struct vcpu_svm *svm, bool init_event)
         * svm_set_cr0() sets PG and WP and clears NW and CD on save->cr0.
         * It also updates the guest-visible cr0 value.
         */
-       (void)kvm_set_cr0(&svm->vcpu, X86_CR0_NW | X86_CR0_CD | X86_CR0_ET);
+       svm_set_cr0(&svm->vcpu, X86_CR0_NW | X86_CR0_CD | X86_CR0_ET);
+       kvm_mmu_reset_context(&svm->vcpu);
 
        save->cr4 = X86_CR4_PAE;
        /* rdx = ?? */