host side TLB flush can be merged together if multiple
spte need to be write-protected.

Signed-off-by: Yaozu (Eddie) Dong <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c
index 92ac0d1..749db46 100644
--- a/drivers/kvm/mmu.c
+++ b/drivers/kvm/mmu.c
@@ -524,9 +524,9 @@ static void rmap_write_protect(struct kvm *kvm, u64
gfn)
                rmap_printk("rmap_write_protect: spte %p %llx\n", spte,
*spte);
                if (is_writeble_pte(*spte))
                        set_shadow_pte(spte, *spte & ~PT_WRITABLE_MASK);
-               kvm_flush_remote_tlbs(kvm);
                spte = rmap_next(kvm, rmapp, spte);
        }
+       kvm_flush_remote_tlbs(kvm);
 }
 
 #ifdef MMU_DEBUG

Attachment: tlb-clean1.patch
Description: tlb-clean1.patch

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to