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>
This commit is contained in:
Lan Tianyu 2018-12-06 21:21:12 +08:00 committed by Paolo Bonzini
parent 0cf853c5e2
commit 3cc5ea94de

View File

@ -1776,6 +1776,11 @@ restart:
}
}
if (need_flush && kvm_available_flush_tlb_with_range()) {
kvm_flush_remote_tlbs_with_address(kvm, gfn, 1);
return 0;
}
return need_flush;
}