On Tue, 17 Aug 2021 01:26:39 +0100,
Jing Zhang <[email protected]> wrote:
> 
> Add a new stat that counts the number of times a remote TLB flush is
> requested, regardless of whether it kicks vCPUs out of guest mode. This
> allows us to look at how often flushes are initiated.

nit: this is a very x86-centric view of things. On arm64, TLB
invalidation is broadcast in HW, and does not interrupt the guest
execution.

> 
> Original-by: David Matlack <[email protected]>
> Signed-off-by: Jing Zhang <[email protected]>
> ---
>  arch/arm64/kvm/mmu.c      | 1 +
>  include/linux/kvm_host.h  | 3 ++-
>  include/linux/kvm_types.h | 1 +
>  virt/kvm/kvm_main.c       | 1 +
>  4 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c
> index 0625bf2353c2..f5bb235bbb59 100644
> --- a/arch/arm64/kvm/mmu.c
> +++ b/arch/arm64/kvm/mmu.c
> @@ -80,6 +80,7 @@ static bool memslot_is_logging(struct kvm_memory_slot 
> *memslot)
>   */
>  void kvm_flush_remote_tlbs(struct kvm *kvm)
>  {
> +     ++kvm->stat.generic.remote_tlb_flush_requests;
>       kvm_call_hyp(__kvm_tlb_flush_vmid, &kvm->arch.mmu);
>  }

We already have this queued for 5.15 [1].

Thanks,

        M.

[1] https://lore.kernel.org/r/[email protected]

-- 
Without deviation from the norm, progress is not possible.
_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Reply via email to