diff options
Diffstat (limited to 'drivers/kvm/mmu.c')
-rw-r--r-- | drivers/kvm/mmu.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c index d4de988d1828..ad50cfda5ac1 100644 --- a/drivers/kvm/mmu.c +++ b/drivers/kvm/mmu.c | |||
@@ -441,7 +441,7 @@ 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_arch_ops->tlb_flush(vcpu); | 444 | kvm_flush_remote_tlbs(vcpu->kvm); |
445 | set_shadow_pte(spte, *spte & ~PT_WRITABLE_MASK); | 445 | set_shadow_pte(spte, *spte & ~PT_WRITABLE_MASK); |
446 | } | 446 | } |
447 | } | 447 | } |
@@ -656,7 +656,7 @@ static void kvm_mmu_page_unlink_children(struct kvm_vcpu *vcpu, | |||
656 | rmap_remove(vcpu, &pt[i]); | 656 | rmap_remove(vcpu, &pt[i]); |
657 | pt[i] = 0; | 657 | pt[i] = 0; |
658 | } | 658 | } |
659 | kvm_arch_ops->tlb_flush(vcpu); | 659 | kvm_flush_remote_tlbs(vcpu->kvm); |
660 | return; | 660 | return; |
661 | } | 661 | } |
662 | 662 | ||
@@ -669,6 +669,7 @@ static void kvm_mmu_page_unlink_children(struct kvm_vcpu *vcpu, | |||
669 | ent &= PT64_BASE_ADDR_MASK; | 669 | ent &= PT64_BASE_ADDR_MASK; |
670 | mmu_page_remove_parent_pte(vcpu, page_header(ent), &pt[i]); | 670 | mmu_page_remove_parent_pte(vcpu, page_header(ent), &pt[i]); |
671 | } | 671 | } |
672 | kvm_flush_remote_tlbs(vcpu->kvm); | ||
672 | } | 673 | } |
673 | 674 | ||
674 | static void kvm_mmu_put_page(struct kvm_vcpu *vcpu, | 675 | static void kvm_mmu_put_page(struct kvm_vcpu *vcpu, |
@@ -1093,6 +1094,7 @@ static void mmu_pte_write_zap_pte(struct kvm_vcpu *vcpu, | |||
1093 | } | 1094 | } |
1094 | } | 1095 | } |
1095 | *spte = 0; | 1096 | *spte = 0; |
1097 | kvm_flush_remote_tlbs(vcpu->kvm); | ||
1096 | } | 1098 | } |
1097 | 1099 | ||
1098 | static void mmu_pte_write_new_pte(struct kvm_vcpu *vcpu, | 1100 | static void mmu_pte_write_new_pte(struct kvm_vcpu *vcpu, |
@@ -1308,7 +1310,7 @@ void kvm_mmu_zap_all(struct kvm_vcpu *vcpu) | |||
1308 | } | 1310 | } |
1309 | 1311 | ||
1310 | mmu_free_memory_caches(vcpu); | 1312 | mmu_free_memory_caches(vcpu); |
1311 | kvm_arch_ops->tlb_flush(vcpu); | 1313 | kvm_flush_remote_tlbs(vcpu->kvm); |
1312 | init_kvm_mmu(vcpu); | 1314 | init_kvm_mmu(vcpu); |
1313 | } | 1315 | } |
1314 | 1316 | ||