From: Paolo Bonzini <pbonzini@redhat.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>,
KVM <kvm@vger.kernel.org>
Cc: Cornelia Huck <cohuck@redhat.com>,
Janosch Frank <frankja@linux.ibm.com>,
David Hildenbrand <david@redhat.com>,
linux-s390 <linux-s390@vger.kernel.org>,
Thomas Huth <thuth@redhat.com>,
Claudio Imbrenda <imbrenda@linux.ibm.com>,
Jing Zhang <jingzhangos@google.com>
Subject: Re: [PATCH] KVM: s390: restore old debugfs names
Date: Mon, 26 Jul 2021 18:59:57 +0200 [thread overview]
Message-ID: <d73836d5-9ae8-43ca-6163-72798a01ac4e@redhat.com> (raw)
In-Reply-To: <20210726150108.5603-1-borntraeger@de.ibm.com>
On 26/07/21 17:01, Christian Borntraeger wrote:
> commit bc9e9e672df9 ("KVM: debugfs: Reuse binary stats descriptors")
> did replace the old definitions with the binary ones. While doing that
> it missed that some files are names different than the counters. This
> is especially important for kvm_stat which does have special handling
> for counters named instruction_*.
>
> Fixes: commit bc9e9e672df9 ("KVM: debugfs: Reuse binary stats descriptors")
> CC: Jing Zhang <jingzhangos@google.com>
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
> arch/s390/include/asm/kvm_host.h | 18 +++++++++---------
> arch/s390/kvm/diag.c | 18 +++++++++---------
> arch/s390/kvm/kvm-s390.c | 18 +++++++++---------
> 3 files changed, 27 insertions(+), 27 deletions(-)
>
> diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm/kvm_host.h
> index 3a5b5084cdbe..f1a202327ebd 100644
> --- a/arch/s390/include/asm/kvm_host.h
> +++ b/arch/s390/include/asm/kvm_host.h
> @@ -446,15 +446,15 @@ struct kvm_vcpu_stat {
> u64 instruction_sigp_init_cpu_reset;
> u64 instruction_sigp_cpu_reset;
> u64 instruction_sigp_unknown;
> - u64 diagnose_10;
> - u64 diagnose_44;
> - u64 diagnose_9c;
> - u64 diagnose_9c_ignored;
> - u64 diagnose_9c_forward;
> - u64 diagnose_258;
> - u64 diagnose_308;
> - u64 diagnose_500;
> - u64 diagnose_other;
> + u64 instruction_diagnose_10;
> + u64 instruction_diagnose_44;
> + u64 instruction_diagnose_9c;
> + u64 diag_9c_ignored;
> + u64 diag_9c_forward;
> + u64 instruction_diagnose_258;
> + u64 instruction_diagnose_308;
> + u64 instruction_diagnose_500;
> + u64 instruction_diagnose_other;
> u64 pfault_sync;
> };
>
> diff --git a/arch/s390/kvm/diag.c b/arch/s390/kvm/diag.c
> index 02c146f9e5cd..807fa9da1e72 100644
> --- a/arch/s390/kvm/diag.c
> +++ b/arch/s390/kvm/diag.c
> @@ -24,7 +24,7 @@ static int diag_release_pages(struct kvm_vcpu *vcpu)
>
> start = vcpu->run->s.regs.gprs[(vcpu->arch.sie_block->ipa & 0xf0) >> 4];
> end = vcpu->run->s.regs.gprs[vcpu->arch.sie_block->ipa & 0xf] + PAGE_SIZE;
> - vcpu->stat.diagnose_10++;
> + vcpu->stat.instruction_diagnose_10++;
>
> if (start & ~PAGE_MASK || end & ~PAGE_MASK || start >= end
> || start < 2 * PAGE_SIZE)
> @@ -74,7 +74,7 @@ static int __diag_page_ref_service(struct kvm_vcpu *vcpu)
>
> VCPU_EVENT(vcpu, 3, "diag page reference parameter block at 0x%llx",
> vcpu->run->s.regs.gprs[rx]);
> - vcpu->stat.diagnose_258++;
> + vcpu->stat.instruction_diagnose_258++;
> if (vcpu->run->s.regs.gprs[rx] & 7)
> return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION);
> rc = read_guest(vcpu, vcpu->run->s.regs.gprs[rx], rx, &parm, sizeof(parm));
> @@ -145,7 +145,7 @@ static int __diag_page_ref_service(struct kvm_vcpu *vcpu)
> static int __diag_time_slice_end(struct kvm_vcpu *vcpu)
> {
> VCPU_EVENT(vcpu, 5, "%s", "diag time slice end");
> - vcpu->stat.diagnose_44++;
> + vcpu->stat.instruction_diagnose_44++;
> kvm_vcpu_on_spin(vcpu, true);
> return 0;
> }
> @@ -169,7 +169,7 @@ static int __diag_time_slice_end_directed(struct kvm_vcpu *vcpu)
> int tid;
>
> tid = vcpu->run->s.regs.gprs[(vcpu->arch.sie_block->ipa & 0xf0) >> 4];
> - vcpu->stat.diagnose_9c++;
> + vcpu->stat.instruction_diagnose_9c++;
>
> /* yield to self */
> if (tid == vcpu->vcpu_id)
> @@ -192,7 +192,7 @@ static int __diag_time_slice_end_directed(struct kvm_vcpu *vcpu)
> VCPU_EVENT(vcpu, 5,
> "diag time slice end directed to %d: yield forwarded",
> tid);
> - vcpu->stat.diagnose_9c_forward++;
> + vcpu->stat.diag_9c_forward++;
> return 0;
> }
>
> @@ -203,7 +203,7 @@ static int __diag_time_slice_end_directed(struct kvm_vcpu *vcpu)
> return 0;
> no_yield:
> VCPU_EVENT(vcpu, 5, "diag time slice end directed to %d: ignored", tid);
> - vcpu->stat.diagnose_9c_ignored++;
> + vcpu->stat.diag_9c_ignored++;
> return 0;
> }
>
> @@ -213,7 +213,7 @@ static int __diag_ipl_functions(struct kvm_vcpu *vcpu)
> unsigned long subcode = vcpu->run->s.regs.gprs[reg] & 0xffff;
>
> VCPU_EVENT(vcpu, 3, "diag ipl functions, subcode %lx", subcode);
> - vcpu->stat.diagnose_308++;
> + vcpu->stat.instruction_diagnose_308++;
> switch (subcode) {
> case 3:
> vcpu->run->s390_reset_flags = KVM_S390_RESET_CLEAR;
> @@ -245,7 +245,7 @@ static int __diag_virtio_hypercall(struct kvm_vcpu *vcpu)
> {
> int ret;
>
> - vcpu->stat.diagnose_500++;
> + vcpu->stat.instruction_diagnose_500++;
> /* No virtio-ccw notification? Get out quickly. */
> if (!vcpu->kvm->arch.css_support ||
> (vcpu->run->s.regs.gprs[1] != KVM_S390_VIRTIO_CCW_NOTIFY))
> @@ -299,7 +299,7 @@ int kvm_s390_handle_diag(struct kvm_vcpu *vcpu)
> case 0x500:
> return __diag_virtio_hypercall(vcpu);
> default:
> - vcpu->stat.diagnose_other++;
> + vcpu->stat.instruction_diagnose_other++;
> return -EOPNOTSUPP;
> }
> }
> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
> index 7675b72a3ddf..01925ef78518 100644
> --- a/arch/s390/kvm/kvm-s390.c
> +++ b/arch/s390/kvm/kvm-s390.c
> @@ -163,15 +163,15 @@ const struct _kvm_stats_desc kvm_vcpu_stats_desc[] = {
> STATS_DESC_COUNTER(VCPU, instruction_sigp_init_cpu_reset),
> STATS_DESC_COUNTER(VCPU, instruction_sigp_cpu_reset),
> STATS_DESC_COUNTER(VCPU, instruction_sigp_unknown),
> - STATS_DESC_COUNTER(VCPU, diagnose_10),
> - STATS_DESC_COUNTER(VCPU, diagnose_44),
> - STATS_DESC_COUNTER(VCPU, diagnose_9c),
> - STATS_DESC_COUNTER(VCPU, diagnose_9c_ignored),
> - STATS_DESC_COUNTER(VCPU, diagnose_9c_forward),
> - STATS_DESC_COUNTER(VCPU, diagnose_258),
> - STATS_DESC_COUNTER(VCPU, diagnose_308),
> - STATS_DESC_COUNTER(VCPU, diagnose_500),
> - STATS_DESC_COUNTER(VCPU, diagnose_other),
> + STATS_DESC_COUNTER(VCPU, instruction_diagnose_10),
> + STATS_DESC_COUNTER(VCPU, instruction_diagnose_44),
> + STATS_DESC_COUNTER(VCPU, instruction_diagnose_9c),
> + STATS_DESC_COUNTER(VCPU, diag_9c_ignored),
> + STATS_DESC_COUNTER(VCPU, diag_9c_forward),
> + STATS_DESC_COUNTER(VCPU, instruction_diagnose_258),
> + 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)
> };
> static_assert(ARRAY_SIZE(kvm_vcpu_stats_desc) ==
>
Queued, thanks.
Paolo
next prev parent reply other threads:[~2021-07-26 17:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-26 15:01 [PATCH] KVM: s390: restore old debugfs names Christian Borntraeger
2021-07-26 15:38 ` Jing Zhang
2021-07-26 16:59 ` Paolo Bonzini [this message]
2021-07-27 5:16 ` Thomas Huth
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=d73836d5-9ae8-43ca-6163-72798a01ac4e@redhat.com \
--to=pbonzini@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=jingzhangos@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=thuth@redhat.com \
/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