]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/kvm/svm.c
KVM: SVM: fix guest global tlb flushes with NPT
[linux-2.6-omap-h63xx.git] / arch / x86 / kvm / svm.c
index d1106cddab0dfac2a70251f10b4ea067f2a919e0..8233b86c778cfd0a01b2ca96dbe7d27776381037 100644 (file)
@@ -879,6 +879,10 @@ set:
 static void svm_set_cr4(struct kvm_vcpu *vcpu, unsigned long cr4)
 {
        unsigned long host_cr4_mce = read_cr4() & X86_CR4_MCE;
+       unsigned long old_cr4 = to_svm(vcpu)->vmcb->save.cr4;
+
+       if (npt_enabled && ((old_cr4 ^ cr4) & X86_CR4_PGE))
+               force_new_asid(vcpu);
 
        vcpu->arch.cr4 = cr4;
        if (!npt_enabled)