summaryrefslogtreecommitdiff
path: root/virt
diff options
context:
space:
mode:
authorJing Zhang <jingzhangos@google.com>2021-08-17 00:26:39 +0000
committerPaolo Bonzini <pbonzini@redhat.com>2021-09-06 06:30:45 -0400
commit3cc4e148b96263313e3dce926eae569c942bb74e (patch)
tree5fad27d657f971485b97da0ee0c3970e996b539e /virt
parentfdde13c13f9012b22e1b3a1df8a108d147842f6f (diff)
downloadlinux-starfive-3cc4e148b96263313e3dce926eae569c942bb74e.tar.gz
linux-starfive-3cc4e148b96263313e3dce926eae569c942bb74e.tar.bz2
linux-starfive-3cc4e148b96263313e3dce926eae569c942bb74e.zip
KVM: stats: Add VM stat for remote tlb flush requests
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. Unlike remote_tlb_flush, this one applies to ARM's instruction-set-based TLB flush implementation, so apply it there too. Original-by: David Matlack <dmatlack@google.com> Signed-off-by: Jing Zhang <jingzhangos@google.com> Message-Id: <20210817002639.3856694-1-jingzhangos@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'virt')
-rw-r--r--virt/kvm/kvm_main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 140c7d311021..305956310174 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -318,6 +318,7 @@ void kvm_flush_remote_tlbs(struct kvm *kvm)
*/
long dirty_count = smp_load_acquire(&kvm->tlbs_dirty);
+ ++kvm->stat.generic.remote_tlb_flush_requests;
/*
* We want to publish modifications to the page tables before reading
* mode. Pairs with a memory barrier in arch-specific code.