2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
6 * KVM/MIPS: COP0 access histogram
8 * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
9 * Authors: Sanjay Lal <sanjayl@kymasys.com>
12 #include <linux/kvm_host.h>
14 char *kvm_mips_exit_types_str
[MAX_KVM_MIPS_EXIT_TYPES
] = {
35 char *kvm_cop0_str
[N_MIPS_COPROC_REGS
] = {
70 void kvm_mips_dump_stats(struct kvm_vcpu
*vcpu
)
72 #ifdef CONFIG_KVM_MIPS_DEBUG_COP0_COUNTERS
75 kvm_info("\nKVM VCPU[%d] COP0 Access Profile:\n", vcpu
->vcpu_id
);
76 for (i
= 0; i
< N_MIPS_COPROC_REGS
; i
++) {
77 for (j
= 0; j
< N_MIPS_COPROC_SEL
; j
++) {
78 if (vcpu
->arch
.cop0
->stat
[i
][j
])
79 kvm_info("%s[%d]: %lu\n", kvm_cop0_str
[i
], j
,
80 vcpu
->arch
.cop0
->stat
[i
][j
]);