]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/kvm/paging_tmpl.h
KVM: MMU: flush remote TLBs on large->normal entry overwrite
[linux-2.6-omap-h63xx.git] / arch / x86 / kvm / paging_tmpl.h
index 6dd08e096e2492cb420e7f50afc7b11deb1db4d3..e9fbaa44d4445bc68dd2effdbeaef6918e7aebc7 100644 (file)
@@ -310,8 +310,11 @@ static int FNAME(shadow_walk_entry)(struct kvm_shadow_walk *_sw,
        if (is_shadow_present_pte(*sptep) && !is_large_pte(*sptep))
                return 0;
 
-       if (is_large_pte(*sptep))
+       if (is_large_pte(*sptep)) {
+               set_shadow_pte(sptep, shadow_trap_nonpresent_pte);
+               kvm_flush_remote_tlbs(vcpu->kvm);
                rmap_remove(vcpu->kvm, sptep);
+       }
 
        if (level == PT_DIRECTORY_LEVEL && gw->level == PT_DIRECTORY_LEVEL) {
                metaphysical = 1;