Re: [PATCH v7 2/4] KVM: stats: Add fd-based API to read binary stats data

2021-06-13 Thread Jing Zhang
Hi Faud, On Sun, Jun 13, 2021 at 10:20 AM Fuad Tabba wrote: > > Hi Jing, > > > diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/mips.c > > index ff205b35719b..eb8fd4a96952 100644 > > --- a/arch/mips/kvm/mips.c > > +++ b/arch/mips/kvm/mips.c > > @@ -38,6 +38,58 @@ > > #define VECTORSPACING 0x100

Re: [PATCH v7 2/4] KVM: stats: Add fd-based API to read binary stats data

2021-06-13 Thread Fuad Tabba
Hi Jing, > diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/mips.c > index ff205b35719b..eb8fd4a96952 100644 > --- a/arch/mips/kvm/mips.c > +++ b/arch/mips/kvm/mips.c > @@ -38,6 +38,58 @@ > #define VECTORSPACING 0x100/* for EI/VI mode */ > #endif > > +struct _kvm_stats_desc kvm_vm_stats_des

Re: [PATCH v7 2/4] KVM: stats: Add fd-based API to read binary stats data

2021-06-11 Thread Paolo Bonzini
On 11/06/21 00:47, Jing Zhang wrote: Hi Paolo, On Thu, Jun 10, 2021 at 11:23 AM Paolo Bonzini wrote: On 03/06/21 23:14, Jing Zhang wrote: +#define DEFINE_VM_STATS_DESC(...) { \ + STATS_DESC_COUNTER("remote_tlb_flush"),

Re: [PATCH v7 2/4] KVM: stats: Add fd-based API to read binary stats data

2021-06-10 Thread Jing Zhang
Hi Paolo, On Thu, Jun 10, 2021 at 11:23 AM Paolo Bonzini wrote: > > On 03/06/21 23:14, Jing Zhang wrote: > > +#define DEFINE_VM_STATS_DESC(...) { > > \ > > + STATS_DESC_COUNTER("remote_tlb_flush"), > > \ > > + ## __V

Re: [PATCH v7 2/4] KVM: stats: Add fd-based API to read binary stats data

2021-06-10 Thread Jing Zhang
Hi Paolo, On Thu, Jun 10, 2021 at 11:42 AM Paolo Bonzini wrote: > > On 03/06/21 23:14, Jing Zhang wrote: > > +struct _kvm_stats_header { > > + __u32 name_size; > > + __u32 count; > > + __u32 desc_offset; > > + __u32 data_offset; > > +}; > > + > > Keeping this struct in sync with k

Re: [PATCH v7 2/4] KVM: stats: Add fd-based API to read binary stats data

2021-06-10 Thread Jing Zhang
Hi Paolo, On Thu, Jun 10, 2021 at 11:23 AM Paolo Bonzini wrote: > > On 03/06/21 23:14, Jing Zhang wrote: > > +#define DEFINE_VM_STATS_DESC(...) { > > \ > > + STATS_DESC_COUNTER("remote_tlb_flush"), > > \ > > + ## __V

Re: [PATCH v7 2/4] KVM: stats: Add fd-based API to read binary stats data

2021-06-10 Thread Paolo Bonzini
On 03/06/21 23:14, Jing Zhang wrote: +struct _kvm_stats_header { + __u32 name_size; + __u32 count; + __u32 desc_offset; + __u32 data_offset; +}; + Keeping this struct in sync with kvm_stats_header is a bit messy. If you move the id at the end of the header, however, yo

Re: [PATCH v7 2/4] KVM: stats: Add fd-based API to read binary stats data

2021-06-10 Thread Paolo Bonzini
On 03/06/21 23:14, Jing Zhang wrote: +#define DEFINE_VM_STATS_DESC(...) { \ + STATS_DESC_COUNTER("remote_tlb_flush"), \ + ## __VA_ARGS__ \ +} + +#def

Re: [PATCH v7 2/4] KVM: stats: Add fd-based API to read binary stats data

2021-06-08 Thread Krish Sadhukhan
On 6/3/21 2:14 PM, Jing Zhang wrote: Provides a file descriptor per VM to read VM stats info/data. Provides a file descriptor per vCPU to read vCPU stats info/data. Reviewed-by: David Matlack Reviewed-by: Ricardo Koller Signed-off-by: Jing Zhang --- arch/arm64/kvm/guest.c| 26 +++

Re: [PATCH v7 2/4] KVM: stats: Add fd-based API to read binary stats data

2021-06-07 Thread Jing Zhang
On Mon, Jun 7, 2021 at 2:23 PM Krish Sadhukhan wrote: > > > On 6/3/21 2:14 PM, Jing Zhang wrote: > > Provides a file descriptor per VM to read VM stats info/data. > > Provides a file descriptor per vCPU to read vCPU stats info/data. > > > > Reviewed-by: David Matlack > > Reviewed-by: Ricardo Koll

[PATCH v7 2/4] KVM: stats: Add fd-based API to read binary stats data

2021-06-03 Thread Jing Zhang
Provides a file descriptor per VM to read VM stats info/data. Provides a file descriptor per vCPU to read vCPU stats info/data. Reviewed-by: David Matlack Reviewed-by: Ricardo Koller Signed-off-by: Jing Zhang --- arch/arm64/kvm/guest.c| 26 +++ arch/mips/kvm/mips.c | 52