aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/mmu.c
diff options
context:
space:
mode:
authorShaohua Li <shaohua.li@intel.com>2007-06-20 05:13:26 -0400
committerAvi Kivity <avi@qumranet.com>2007-07-16 05:05:48 -0400
commit88a97f0b2fe1cd08d06390dc2669b709ea96e11a (patch)
treef6b3db226a0253ae3e2689b09c5f084bba24c967 /drivers/kvm/mmu.c
parent75880a01124c6aa5d428bdc14163039a87618be1 (diff)
KVM: MMU: Fix Wrong tlb flush order
Need to flush the tlb after updating a pte, not before. Signed-off-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/mmu.c')
-rw-r--r--drivers/kvm/mmu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c
index ad50cfda5ac1..49ffbd3da749 100644
--- a/drivers/kvm/mmu.c
+++ b/drivers/kvm/mmu.c
@@ -441,8 +441,8 @@ static void rmap_write_protect(struct kvm_vcpu *vcpu, u64 gfn)
441 BUG_ON(!(*spte & PT_WRITABLE_MASK)); 441 BUG_ON(!(*spte & PT_WRITABLE_MASK));
442 rmap_printk("rmap_write_protect: spte %p %llx\n", spte, *spte); 442 rmap_printk("rmap_write_protect: spte %p %llx\n", spte, *spte);
443 rmap_remove(vcpu, spte); 443 rmap_remove(vcpu, spte);
444 kvm_flush_remote_tlbs(vcpu->kvm);
445 set_shadow_pte(spte, *spte & ~PT_WRITABLE_MASK); 444 set_shadow_pte(spte, *spte & ~PT_WRITABLE_MASK);
445 kvm_flush_remote_tlbs(vcpu->kvm);
446 } 446 }
447} 447}
448 448