diff options
author | QingFeng Hao <haoqf@linux.vnet.ibm.com> | 2018-03-02 11:56:47 +0100 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2018-03-14 20:21:17 +0100 |
commit | 32de0749097ea5be5af7f06bc26cf4e06958ac0f (patch) | |
tree | 71dfbecd1fd55309a5a2f4ba3166dddad6d6d14e | |
parent | s390/setup: enable display support for KVM guest (diff) | |
download | linux-32de0749097ea5be5af7f06bc26cf4e06958ac0f.tar.xz linux-32de0749097ea5be5af7f06bc26cf4e06958ac0f.zip |
KVM: add machine check counter to kvm_stat
This counter can be used for administration, debug or test purposes.
Suggested-by: Vladislav Mironov <mironov@de.ibm.com>
Signed-off-by: QingFeng Hao <haoqf@linux.vnet.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
-rw-r--r-- | arch/s390/include/asm/kvm_host.h | 1 | ||||
-rw-r--r-- | arch/s390/kvm/interrupt.c | 1 | ||||
-rw-r--r-- | arch/s390/kvm/kvm-s390.c | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm/kvm_host.h index 22615af0b6e6..77a49de9c511 100644 --- a/arch/s390/include/asm/kvm_host.h +++ b/arch/s390/include/asm/kvm_host.h @@ -320,6 +320,7 @@ struct kvm_vcpu_stat { u64 deliver_restart_signal; u64 deliver_program_int; u64 deliver_io_int; + u64 deliver_machine_check; u64 exit_wait_state; u64 instruction_epsw; u64 instruction_gs; diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c index b04616b57a94..bde04a6191ca 100644 --- a/arch/s390/kvm/interrupt.c +++ b/arch/s390/kvm/interrupt.c @@ -595,6 +595,7 @@ static int __must_check __deliver_machine_check(struct kvm_vcpu *vcpu) trace_kvm_s390_deliver_interrupt(vcpu->vcpu_id, KVM_S390_MCHK, mchk.cr14, mchk.mcic); + vcpu->stat.deliver_machine_check++; rc = __write_machine_check(vcpu, &mchk); } return rc; diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index 41adcfe169a9..41615c900348 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c @@ -88,6 +88,7 @@ struct kvm_stats_debugfs_item debugfs_entries[] = { { "deliver_restart_signal", VCPU_STAT(deliver_restart_signal) }, { "deliver_program_interruption", VCPU_STAT(deliver_program_int) }, { "deliver_io_interrupt", VCPU_STAT(deliver_io_int) }, + { "deliver_machine_check", VCPU_STAT(deliver_machine_check) }, { "exit_wait_state", VCPU_STAT(exit_wait_state) }, { "instruction_epsw", VCPU_STAT(instruction_epsw) }, { "instruction_gs", VCPU_STAT(instruction_gs) }, |