From mboxrd@z Thu Jan 1 00:00:00 1970 From: Raghavendra Rao Ananta Date: Mon, 17 Jul 2023 09:28:58 -0700 Subject: [PATCH v6 02/11] KVM: arm64: Use kvm_arch_flush_remote_tlbs() In-Reply-To: References: <20230715005405.3689586-1-rananta@google.com> <20230715005405.3689586-3-rananta@google.com> Message-ID: List-Id: To: kvm-riscv@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi Philippe, On Mon, Jul 17, 2023 at 1:13?AM Philippe Mathieu-Daud? wrote: > > Hi Raghavendra, David, > > On 15/7/23 02:53, Raghavendra Rao Ananta wrote: > > From: David Matlack > > > > 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 > > Signed-off-by: Raghavendra Rao Ananta > > Reviewed-by: Zenghui Yu > > Acked-by: Oliver Upton > > Reviewed-by: Gavin Shan > > --- > > 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? > Thanks for the suggestion. I guess that makes sense. I'll split the patch in two for v7. - Raghavendra > Regards, > > Phil. >