aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLan Tianyu <Tianyu.Lan@microsoft.com>2018-12-06 08:21:12 -0500
committerPaolo Bonzini <pbonzini@redhat.com>2018-12-21 05:28:42 -0500
commit3cc5ea94de5f71dff0d3353f610e729308583e6b (patch)
tree6823b691f82628220b5f9adcc79e29a999e14f92
parent0cf853c5e238edf503ebda2fe541e6f4a3d5bd40 (diff)
KVM/MMU: Flush tlb directly in kvm_set_pte_rmapp()
This patch is to flush tlb directly in kvm_set_pte_rmapp() function when Hyper-V remote TLB flush is available, returning 0 so that kvm_mmu_notifier_change_pte() does not flush again. Signed-off-by: Lan Tianyu <Tianyu.Lan@microsoft.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--arch/x86/kvm/mmu.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 5a046f93a41a..fd61d715ebd6 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -1776,6 +1776,11 @@ restart:
1776 } 1776 }
1777 } 1777 }
1778 1778
1779 if (need_flush && kvm_available_flush_tlb_with_range()) {
1780 kvm_flush_remote_tlbs_with_address(kvm, gfn, 1);
1781 return 0;
1782 }
1783
1779 return need_flush; 1784 return need_flush;
1780} 1785}
1781 1786