Re: [PATCH] KVM: s390: restore old debugfs names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 26, 2021 at 8:01 AM Christian Borntraeger
<borntraeger@xxxxxxxxxx> 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@xxxxxxxxxx>
> Signed-off-by: Christian Borntraeger <borntraeger@xxxxxxxxxx>
> ---
>  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) ==
> --
> 2.31.1
>
Reviewed-by: Jing Zhang <jingzhangos@xxxxxxxxxx>

Thanks,
Jing



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux