lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0f4a5125-5028-2070-76a6-a901a7ddaddb@loongson.cn>
Date:   Mon, 5 Jun 2023 21:04:41 +0800
From:   "bibo, mao" <maobibo@...ngson.cn>
To:     Tianrui Zhao <zhaotianrui@...ngson.cn>,
        linux-kernel@...r.kernel.org, kvm@...r.kernel.org
Cc:     Paolo Bonzini <pbonzini@...hat.com>,
        Huacai Chen <chenhuacai@...nel.org>,
        WANG Xuerui <kernel@...0n.name>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        loongarch@...ts.linux.dev, Jens Axboe <axboe@...nel.dk>,
        Mark Brown <broonie@...nel.org>,
        Alex Deucher <alexander.deucher@....com>,
        Oliver Upton <oliver.upton@...ux.dev>,
        Xi Ruoyao <xry111@...111.site>
Subject: Re: [PATCH v12 15/31] LoongArch: KVM: Implement vcpu status
 description

Reviewed-by: Bibo, Mao <maobibo@...ngson.cn>

在 2023/5/30 09:52, Tianrui Zhao 写道:
> Implement LoongArch vcpu status description such as idle exits counter,
> signal exits counter, cpucfg exits counter, etc.
> 
> Signed-off-by: Tianrui Zhao <zhaotianrui@...ngson.cn>
> ---
>  arch/loongarch/kvm/vcpu.c | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/arch/loongarch/kvm/vcpu.c b/arch/loongarch/kvm/vcpu.c
> index c41de76d0a79..79599e69b2c9 100644
> --- a/arch/loongarch/kvm/vcpu.c
> +++ b/arch/loongarch/kvm/vcpu.c
> @@ -12,6 +12,23 @@
>  #define CREATE_TRACE_POINTS
>  #include "trace.h"
>  
> +const struct _kvm_stats_desc kvm_vcpu_stats_desc[] = {
> +	KVM_GENERIC_VCPU_STATS(),
> +	STATS_DESC_COUNTER(VCPU, idle_exits),
> +	STATS_DESC_COUNTER(VCPU, signal_exits),
> +	STATS_DESC_COUNTER(VCPU, int_exits),
> +	STATS_DESC_COUNTER(VCPU, cpucfg_exits),
> +};
> +
> +const struct kvm_stats_header kvm_vcpu_stats_header = {
> +	.name_size = KVM_STATS_NAME_SIZE,
> +	.num_desc = ARRAY_SIZE(kvm_vcpu_stats_desc),
> +	.id_offset = sizeof(struct kvm_stats_header),
> +	.desc_offset = sizeof(struct kvm_stats_header) + KVM_STATS_NAME_SIZE,
> +	.data_offset = sizeof(struct kvm_stats_header) + KVM_STATS_NAME_SIZE +
> +		       sizeof(kvm_vcpu_stats_desc),
> +};
> +
>  int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu)
>  {
>  	return !!(vcpu->arch.irq_pending) &&

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ