diff options
author | Jing Zhang <jingzhangos@google.com> | 2021-06-18 22:27:03 +0000 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-06-24 11:47:56 -0400 |
commit | 0193cc908b5ae8aff2e2d2997ca5d4ae26ed24d4 (patch) | |
tree | 53fb0f7f5fee5b8d5d4555ce58a588c0a23fb142 /arch/mips | |
parent | 6c6e166b2c8513721d166c74060d26d3f4aecb48 (diff) | |
download | linux-0193cc908b5ae8aff2e2d2997ca5d4ae26ed24d4.tar.bz2 |
KVM: stats: Separate generic stats from architecture specific ones
Generic KVM stats are those collected in architecture independent code
or those supported by all architectures; put all generic statistics in
a separate structure. This ensures that they are defined the same way
in the statistics API which is being added, removing duplication among
different architectures in the declaration of the descriptors.
No functional change intended.
Reviewed-by: David Matlack <dmatlack@google.com>
Reviewed-by: Ricardo Koller <ricarkol@google.com>
Reviewed-by: Krish Sadhukhan <krish.sadhukhan@oracle.com>
Signed-off-by: Jing Zhang <jingzhangos@google.com>
Message-Id: <20210618222709.1858088-2-jingzhangos@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/include/asm/kvm_host.h | 9 | ||||
-rw-r--r-- | arch/mips/kvm/mips.c | 12 |
2 files changed, 8 insertions, 13 deletions
diff --git a/arch/mips/include/asm/kvm_host.h b/arch/mips/include/asm/kvm_host.h index 4245c082095f..696f6b009377 100644 --- a/arch/mips/include/asm/kvm_host.h +++ b/arch/mips/include/asm/kvm_host.h @@ -109,10 +109,11 @@ static inline bool kvm_is_error_hva(unsigned long addr) } struct kvm_vm_stat { - u64 remote_tlb_flush; + struct kvm_vm_stat_generic generic; }; struct kvm_vcpu_stat { + struct kvm_vcpu_stat_generic generic; u64 wait_exits; u64 cache_exits; u64 signal_exits; @@ -142,12 +143,6 @@ struct kvm_vcpu_stat { #ifdef CONFIG_CPU_LOONGSON64 u64 vz_cpucfg_exits; #endif - u64 halt_successful_poll; - u64 halt_attempted_poll; - u64 halt_poll_success_ns; - u64 halt_poll_fail_ns; - u64 halt_poll_invalid; - u64 halt_wakeup; }; struct kvm_arch_memory_slot { diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/mips.c index 4d4af97dcc88..2f2969aef60c 100644 --- a/arch/mips/kvm/mips.c +++ b/arch/mips/kvm/mips.c @@ -68,12 +68,12 @@ struct kvm_stats_debugfs_item debugfs_entries[] = { #ifdef CONFIG_CPU_LOONGSON64 VCPU_STAT("vz_cpucfg", vz_cpucfg_exits), #endif - VCPU_STAT("halt_successful_poll", halt_successful_poll), - VCPU_STAT("halt_attempted_poll", halt_attempted_poll), - VCPU_STAT("halt_poll_invalid", halt_poll_invalid), - VCPU_STAT("halt_wakeup", halt_wakeup), - VCPU_STAT("halt_poll_success_ns", halt_poll_success_ns), - VCPU_STAT("halt_poll_fail_ns", halt_poll_fail_ns), + VCPU_STAT("halt_successful_poll", generic.halt_successful_poll), + VCPU_STAT("halt_attempted_poll", generic.halt_attempted_poll), + VCPU_STAT("halt_poll_invalid", generic.halt_poll_invalid), + VCPU_STAT("halt_wakeup", generic.halt_wakeup), + VCPU_STAT("halt_poll_success_ns", generic.halt_poll_success_ns), + VCPU_STAT("halt_poll_fail_ns", generic.halt_poll_fail_ns), {NULL} }; |