[PATCH V5 9/10] KVM/MMU: Flush tlb directly in the kvm_set_pte_rmapp()

2018-11-08 Thread ltykernel
From: Lan Tianyu This patch is to flush tlb directly in the kvm_set_pte_rmapp() and return 0. Signed-off-by: Lan Tianyu --- arch/x86/kvm/mmu.c | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index b13b419166c4..39e0e2572710 100644 --- a/arch/x86

[PATCH V5 8/10] KVM/MMU: Move tlb flush in kvm_set_pte_rmapp() to kvm_mmu_notifier_change_pte()

2018-11-08 Thread ltykernel
From: Lan Tianyu This patch is to move tlb flush in kvm_set_pte_rmapp() to kvm_mmu_notifier_change_pte() in order to avoid redundant tlb flush. Signed-off-by: Lan Tianyu --- arch/x86/kvm/mmu.c | 8 ++-- virt/kvm/kvm_main.c | 5 - 2 files changed, 6 insertions(+), 7 deletions(-) diff

[PATCH V5 10/10] KVM/MMU: Flush tlb directly in the kvm_zap_gfn_range()

2018-11-08 Thread ltykernel
From: Lan Tianyu Originally, flush tlb is done by slot_handle_level_range(). This patch is to flush tlb directly in the kvm_zap_gfn_range() when range flush is available. Signed-off-by: Lan Tianyu --- Change since v4: Move operation of setting flush_tlb out of for loop. --- arch/x86/kv

[PATCH] KVM/VMX: Check ept_pointer before flushing ept tlb

2018-11-06 Thread ltykernel
From: Lan Tianyu This patch is to initialize ept_pointer to INVALID_PAGE and check it before flushing ept tlb. If ept_pointer is invalidated, bypass the flush request. Signed-off-by: Lan Tianyu --- arch/x86/kvm/vmx.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff