Re: [PATCH v5 02/10] kvm: Support for querying fd-based stats

2022-06-08 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > On 6/8/22 18:01, Dr. David Alan Gilbert wrote: > > 'Find descriptors for 'target', either that have already been read or > > query 'stats_fd' to read them from kvm' > > /* > * Return the descriptors for 'target', that either have already been > *

Re: [PATCH v5 02/10] kvm: Support for querying fd-based stats

2022-06-08 Thread Paolo Bonzini
On 6/8/22 18:01, Dr. David Alan Gilbert wrote: 'Find descriptors for 'target', either that have already been read or query 'stats_fd' to read them from kvm' /* * Return the descriptors for 'target', that either have already been * read or are retrieved from 'stats_fd'. */ Paolo

Re: [PATCH v5 02/10] kvm: Support for querying fd-based stats

2022-06-08 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > On 6/8/22 16:52, Dr. David Alan Gilbert wrote: > > > If you mean why not some other source, each source has a different file > > > descriptor: > > > > > > +int stats_fd = kvm_vcpu_ioctl(cpu, KVM_GET_STATS_FD, NULL); > > > > > > but the descriptor

Re: [PATCH v5 02/10] kvm: Support for querying fd-based stats

2022-06-08 Thread Paolo Bonzini
On 6/8/22 16:52, Dr. David Alan Gilbert wrote: If you mean why not some other source, each source has a different file descriptor: +int stats_fd = kvm_vcpu_ioctl(cpu, KVM_GET_STATS_FD, NULL); but the descriptors are consistent every time KVM_GET_STATS_FD is called, so basically "ident" can

Re: [PATCH v5 02/10] kvm: Support for querying fd-based stats

2022-06-08 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > On 6/7/22 19:44, Dr. David Alan Gilbert wrote: > > > > +return NULL; > > > +} > > > +descriptors->kvm_stats_header = kvm_stats_header; > > > +descriptors->kvm_stats_desc = kvm_stats_desc; > > > +descriptors->ident = g_strdup(id

Re: [PATCH v5 02/10] kvm: Support for querying fd-based stats

2022-06-08 Thread Paolo Bonzini
On 6/7/22 19:44, Dr. David Alan Gilbert wrote: +return NULL; +} +descriptors->kvm_stats_header = kvm_stats_header; +descriptors->kvm_stats_desc = kvm_stats_desc; +descriptors->ident = g_strdup(ident); There's something that confuses me here; you check your set of descri

Re: [PATCH v5 02/10] kvm: Support for querying fd-based stats

2022-06-07 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > From: Mark Kanda > > Add support for querying fd-based KVM stats - as introduced by Linux kernel > commit: > > cb082bfab59a ("KVM: stats: Add fd-based API to read binary stats data") > > This allows the user to analyze the behavior of the VM withou

[PATCH v5 02/10] kvm: Support for querying fd-based stats

2022-05-30 Thread Paolo Bonzini
From: Mark Kanda Add support for querying fd-based KVM stats - as introduced by Linux kernel commit: cb082bfab59a ("KVM: stats: Add fd-based API to read binary stats data") This allows the user to analyze the behavior of the VM without access to debugfs. Signed-off-by: Mark Kanda Signed-off-b