From: Janosch Frank <frankja@linux.ibm.com>
To: Andrew Donnellan <ajd@linux.ibm.com>,
kvm@vger.kernel.org, linux-s390@vger.kernel.org,
linux-kernel@vger.kernel.org,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Claudio Imbrenda <imbrenda@linux.ibm.com>,
Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>,
Sven Schnelle <svens@linux.ibm.com>
Cc: Nicholas Miehlbradt <nicholas@linux.ibm.com>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Andy Lutomirski <luto@kernel.org>,
David Hildenbrand <david@kernel.org>
Subject: Re: [PATCH v2 1/3] KVM: s390: Add signal_exits counter
Date: Wed, 26 Nov 2025 13:23:46 +0100 [thread overview]
Message-ID: <1c3ac2d9-d26d-44de-8d39-a33fbdcbc450@linux.ibm.com> (raw)
In-Reply-To: <20251126-s390-kvm-xfer-to-guest-work-v2-1-1b8767879235@linux.ibm.com>
On 11/26/25 06:33, Andrew Donnellan wrote:
> 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>
> ---
> arch/s390/include/asm/kvm_host.h | 1 +
> arch/s390/kvm/kvm-s390.c | 4 +++-
> 2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm/kvm_host.h
> index c2ba3d4398c5371526ddfd53b43607c00abc35a1..1b08a250fb341f7bd2d19810392c1c6e21673b64 100644
> --- a/arch/s390/include/asm/kvm_host.h
> +++ b/arch/s390/include/asm/kvm_host.h
> @@ -146,6 +146,7 @@ struct kvm_vcpu_stat {
> u64 instruction_diagnose_500;
> u64 instruction_diagnose_other;
> u64 pfault_sync;
> + u64 signal_exits;
> };
>
> #define PGM_OPERATION 0x01
> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
> index 16ba04062854a99ab7d48ac427b690006ea8e7eb..fa6b5150ca31e4d9f0bdafabc1fb1d90ef3f3d0d 100644
> --- a/arch/s390/kvm/kvm-s390.c
> +++ b/arch/s390/kvm/kvm-s390.c
> @@ -185,7 +185,8 @@ const struct _kvm_stats_desc kvm_vcpu_stats_desc[] = {
> STATS_DESC_COUNTER(VCPU, instruction_diagnose_308),
> STATS_DESC_COUNTER(VCPU, instruction_diagnose_500),
> STATS_DESC_COUNTER(VCPU, instruction_diagnose_other),
> - STATS_DESC_COUNTER(VCPU, pfault_sync)
> + STATS_DESC_COUNTER(VCPU, pfault_sync),
> + STATS_DESC_COUNTER(VCPU, signal_exits)
> };
>
> const struct kvm_stats_header kvm_vcpu_stats_header = {
> @@ -5364,6 +5365,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu)
>
> if (signal_pending(current) && !rc) {
> kvm_run->exit_reason = KVM_EXIT_INTR;
> + vcpu->stat.signal_exits++;
> rc = -EINTR;
> }
>
>
next prev parent reply other threads:[~2025-11-26 12:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-26 5:33 [PATCH v2 0/3] KVM: s390: Use generic VIRT_XFER_TO_GUEST_WORK entry helpers Andrew Donnellan
2025-11-26 5:33 ` [PATCH v2 1/3] KVM: s390: Add signal_exits counter Andrew Donnellan
2025-11-26 12:23 ` Janosch Frank [this message]
2025-11-26 5:33 ` [PATCH v2 2/3] KVM: s390: Enable and disable interrupts in entry code Andrew Donnellan
2025-11-26 12:31 ` Janosch Frank
2025-11-26 5:33 ` [PATCH v2 3/3] KVM: s390: Use generic VIRT_XFER_TO_GUEST_WORK functions Andrew Donnellan
2025-11-27 14:37 ` Janosch Frank
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1c3ac2d9-d26d-44de-8d39-a33fbdcbc450@linux.ibm.com \
--to=frankja@linux.ibm.com \
--cc=agordeev@linux.ibm.com \
--cc=ajd@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=david@kernel.org \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=luto@kernel.org \
--cc=nicholas@linux.ibm.com \
--cc=peterz@infradead.org \
--cc=svens@linux.ibm.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox