Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

KVM: s390: Add signal_exits counter

Add a signal_exits counter for s390, as exists on arm64, loongarch, mips,
powerpc, riscv and x86.

This is used by kvm_handle_signal_exit(), which we will use when we
later enable CONFIG_VIRT_XFER_TO_GUEST_WORK.

Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>

authored by

Andrew Donnellan and committed by
Janosch Frank
c067847c 44acac00

+4 -1
+1
arch/s390/include/asm/kvm_host.h
··· 146 146 u64 instruction_diagnose_500; 147 147 u64 instruction_diagnose_other; 148 148 u64 pfault_sync; 149 + u64 signal_exits; 149 150 }; 150 151 151 152 #define PGM_OPERATION 0x01
+3 -1
arch/s390/kvm/kvm-s390.c
··· 185 185 STATS_DESC_COUNTER(VCPU, instruction_diagnose_308), 186 186 STATS_DESC_COUNTER(VCPU, instruction_diagnose_500), 187 187 STATS_DESC_COUNTER(VCPU, instruction_diagnose_other), 188 - STATS_DESC_COUNTER(VCPU, pfault_sync) 188 + STATS_DESC_COUNTER(VCPU, pfault_sync), 189 + STATS_DESC_COUNTER(VCPU, signal_exits) 189 190 }; 190 191 191 192 const struct kvm_stats_header kvm_vcpu_stats_header = { ··· 5252 5251 5253 5252 if (signal_pending(current) && !rc) { 5254 5253 kvm_run->exit_reason = KVM_EXIT_INTR; 5254 + vcpu->stat.signal_exits++; 5255 5255 rc = -EINTR; 5256 5256 } 5257 5257