Re: [PATCH 1/2] KVM: s390: add vcpu stat counters for many instruction

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

 



On Wed, 24 Jan 2018 16:20:49 +0100
Christian Borntraeger <borntraeger@xxxxxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-s390" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux