]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/kvm/mmu.c
Merge branch 'for-2.6.28' of git://linux-nfs.org/~bfields/linux
[linux-2.6-omap-h63xx.git] / arch / x86 / kvm / mmu.c
index cb391d629af2a0bf23f2b207b3f6e99648107eb4..2a5e64881d9bf2476bfef280ca309ffe086e52e1 100644 (file)
@@ -70,6 +70,9 @@ static int dbg = 0;
 module_param(dbg, bool, 0644);
 #endif
 
+static int oos_shadow = 1;
+module_param(oos_shadow, bool, 0644);
+
 #ifndef MMU_DEBUG
 #define ASSERT(x) do { } while (0)
 #else
@@ -1424,7 +1427,7 @@ static int mmu_need_write_protect(struct kvm_vcpu *vcpu, gfn_t gfn,
                        return 1;
                if (shadow->unsync)
                        return 0;
-               if (can_unsync)
+               if (can_unsync && oos_shadow)
                        return kvm_unsync_page(vcpu, shadow);
                return 1;
        }
@@ -2631,6 +2634,7 @@ static int kvm_pv_mmu_write(struct kvm_vcpu *vcpu,
 static int kvm_pv_mmu_flush_tlb(struct kvm_vcpu *vcpu)
 {
        kvm_x86_ops->tlb_flush(vcpu);
+       set_bit(KVM_REQ_MMU_SYNC, &vcpu->requests);
        return 1;
 }