Re: [PATCH v6 02/11] KVM: arm64: Use kvm_arch_flush_remote_tlbs()
From: Philippe Mathieu-Daudé <hidden>
Date: 2023-07-17 08:13:14
Also in:
kvm, kvm-riscv, kvmarm, linux-mips, linux-riscv, lkml
Hi Raghavendra, David, On 15/7/23 02:53, Raghavendra Rao Ananta wrote:
From: David Matlack <dmatlack@google.com> Use kvm_arch_flush_remote_tlbs() instead of CONFIG_HAVE_KVM_ARCH_TLB_FLUSH_ALL. The two mechanisms solve the same problem, allowing architecture-specific code to provide a non-IPI implementation of remote TLB flushing. Dropping CONFIG_HAVE_KVM_ARCH_TLB_FLUSH_ALL allows KVM to standardize all architectures on kvm_arch_flush_remote_tlbs() instead of maintaining two mechanisms. Opt to standardize on kvm_arch_flush_remote_tlbs() since it avoids duplicating the generic TLB stats across architectures that implement their own remote TLB flush. This adds an extra function call to the ARM64 kvm_flush_remote_tlbs() path, but that is a small cost in comparison to flushing remote TLBs. In addition, instead of just incrementing remote_tlb_flush_requests stat, the generic interface would also increment the remote_tlb_flush stat. Signed-off-by: David Matlack <dmatlack@google.com> Signed-off-by: Raghavendra Rao Ananta <redacted> Reviewed-by: Zenghui Yu <redacted> Acked-by: Oliver Upton <redacted> Reviewed-by: Gavin Shan <redacted> --- arch/arm64/include/asm/kvm_host.h | 3 +++ arch/arm64/kvm/Kconfig | 1 - arch/arm64/kvm/mmu.c | 6 +++--- virt/kvm/Kconfig | 3 --- virt/kvm/kvm_main.c | 2 -- 5 files changed, 6 insertions(+), 9 deletions(-)
You are doing 2 changes in the same patch: - Have ARM use kvm_arch_flush_remote_tlbs() instead of HAVE_KVM_ARCH_TLB_FLUSH_ALL, - Drop the now unused HAVE_KVM_ARCH_TLB_FLUSH_ALL. Commits should be atomic, to allow partial revert or cherry-pick. Preferably splitting this patch in 2: Reviewed-by: Philippe Mathieu-Daudé <redacted> Regards, Phil. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel