From: Cornelia Huck <cohuck@redhat.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: KVM <kvm@vger.kernel.org>,
linux-s390 <linux-s390@vger.kernel.org>,
Janosch Frank <frankja@linux.vnet.ibm.com>,
David Hildenbrand <david@redhat.com>
Subject: Re: [PATCH 1/2] KVM: s390: add vcpu stat counters for many instruction
Date: Wed, 24 Jan 2018 16:27:22 +0100 [thread overview]
Message-ID: <20180124162722.688d058a.cohuck@redhat.com> (raw)
In-Reply-To: <1570f253-f499-06dd-c869-5f8e422ea85b@de.ibm.com>
On Wed, 24 Jan 2018 16:20:49 +0100
Christian Borntraeger <borntraeger@de.ibm.com> wrote:
> On 01/24/2018 03:45 PM, Cornelia Huck wrote:
> > If your goal is to catch all instructions, shouldn't you add a counter
> > for diagnose functions that don't have a kernel handler as well?
>
> Will add that on top.
>
> diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm/kvm_host.h
> index 913c8ac849206..c8b3c1aee7b5c 100644
> --- a/arch/s390/include/asm/kvm_host.h
> +++ b/arch/s390/include/asm/kvm_host.h
> @@ -367,6 +367,7 @@ struct kvm_vcpu_stat {
> u64 diagnose_258;
> u64 diagnose_308;
> u64 diagnose_500;
> + u64 diagnose_other;
> };
>
> #define PGM_OPERATION 0x01
> diff --git a/arch/s390/kvm/diag.c b/arch/s390/kvm/diag.c
> index 89aa114a2cbad..45634b3d2e0ae 100644
> --- a/arch/s390/kvm/diag.c
> +++ b/arch/s390/kvm/diag.c
> @@ -257,6 +257,7 @@ int kvm_s390_handle_diag(struct kvm_vcpu *vcpu)
> case 0x500:
> return __diag_virtio_hypercall(vcpu);
> default:
> + vcpu->stat.diagnose_other++;
> return -EOPNOTSUPP;
> }
> }
> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
> index 35e18d84e6828..648c6943cdfed 100644
> --- a/arch/s390/kvm/kvm-s390.c
> +++ b/arch/s390/kvm/kvm-s390.c
> @@ -138,6 +138,7 @@ struct kvm_stats_debugfs_item debugfs_entries[] = {
> { "instruction_diag_258", VCPU_STAT(diagnose_258) },
> { "instruction_diag_308", VCPU_STAT(diagnose_308) },
> { "instruction_diag_500", VCPU_STAT(diagnose_500) },
> + { "instruction_diag_other", VCPU_STAT(diagnose_other) },
> { NULL }
> };
Looks good.
next prev parent reply other threads:[~2018-01-24 15:27 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-24 11:32 [PATCH 0/2] KVM: s390: kvm stat counters rework Christian Borntraeger
2018-01-24 11:32 ` [PATCH 1/2] KVM: s390: add vcpu stat counters for many instruction Christian Borntraeger
2018-01-24 12:27 ` Janosch Frank
2018-01-24 12:31 ` Christian Borntraeger
2018-01-24 12:41 ` David Hildenbrand
2018-01-24 14:45 ` Cornelia Huck
2018-01-24 15:20 ` Christian Borntraeger
2018-01-24 15:27 ` Cornelia Huck [this message]
2018-01-24 11:32 ` [PATCH 2/2] KVM: s390: diagnoses are instructions as well Christian Borntraeger
2018-01-24 12:41 ` Janosch Frank
2018-01-24 12:42 ` David Hildenbrand
2018-01-24 12:51 ` Christian Borntraeger
2018-01-24 12:54 ` Christian Borntraeger
2018-01-24 14:51 ` Cornelia Huck
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=20180124162722.688d058a.cohuck@redhat.com \
--to=cohuck@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=david@redhat.com \
--cc=frankja@linux.vnet.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
/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