[RFC PATCH 2/5] add a global feature for supporting virHistogram

2022-09-21 Thread Amneesh Singh
Signed-off-by: Amneesh Singh --- src/ch/ch_driver.c | 1 + src/driver.c| 1 + src/esx/esx_driver.c| 1 + src/libvirt_internal.h | 5 + src/libxl/libxl_driver.c| 1 + src/lxc/lxc_driver.c| 1

[RFC PATCH 5/5] remote: add virHistogram support for RPC as a virTypedParameterType

2022-09-21 Thread Amneesh Singh
Signed-off-by: Amneesh Singh --- src/remote/remote_protocol.x | 16 src/remote_protocol-structs | 13 + 2 files changed, 29 insertions(+) diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x index 79ffc63f03..c23e184d3a 100644 --- a/src/remote

[RFC PATCH 3/5] virtypedparams: add VIR_TYPED_PARAM_HISTOGRAM_OKAY

2022-09-21 Thread Amneesh Singh
This patch adds a flag VIR_TYPED_PARAM_HISTOGRAM_OKAY which works similar to VIR_TYPED_PARAM_STRING_OKAY to maintain server-client compatibility. Signed-off-by: Amneesh Singh --- include/libvirt/libvirt-common.h.in | 5 src/admin/admin_server_dispatch.c | 6 +++- src/libvirt.c

[RFC PATCH 4/5] qemu_driver: add histograms to the stats

2022-09-21 Thread Amneesh Singh
This patch adds histograms to the stats which were previously ignored due to them not being a virTypedParameterType earlier. Signed-off-by: Amneesh Singh --- src/qemu/qemu_driver.c | 41 +++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/src

[RFC PATCH 1/5] virtypedparam: add virHistogram as a virTypedParameterType

2022-09-21 Thread Amneesh Singh
This patch adds virHistogram, a list of (x,y) pairs denoting a histogram as a virTypedParameterType. Signed-off-by: Amneesh Singh --- include/libvirt/libvirt-common.h.in | 54 +-- src/libvirt_private.syms| 7 ++ src/libvirt_public.syms | 6 ++ src/util

[RFC PATCH 0/5] add support for histograms as a virTypedParameterType

2022-09-21 Thread Amneesh Singh
virHistogram Amneesh Singh (5): virtypedparam: add virHistogram as a virTypedParameterType add a global feature for supporting virHistogram virtypedparams: add VIR_TYPED_PARAM_HISTOGRAM_OKAY qemu_driver: add histograms to the stats remote: add virHistogram support for RPC as a virTypedParameterType

[RFC PATCH 5/6] qemu_driver: add the vCPU stats by KVM to the current stats

2022-09-07 Thread Amneesh Singh
This patch adds the stats queried by qemuMonitorQueryStats for vCPU and add them according to their QOM device path Signed-off-by: Amneesh Singh --- src/qemu/qemu_driver.c | 86 ++ 1 file changed, 86 insertions(+) diff --git a/src/qemu/qemu_driver.c b

[RFC PATCH 6/6] qemu_driver: add new stats worker qemuDomainGetStatsVm

2022-09-07 Thread Amneesh Singh
This patch adds a new worker qemuDomainGetStatsVm which reports the stats returned by "query-stats" via qemuMonitorQueryStats for the VM target. Signed-off-by: Amneesh Singh --- include/libvirt/libvirt-domain.h | 1 + src/libvirt-domain.c | 3 +++ src/qemu/qem

[RFC PATCH 3/6] qemu_domain: add statsSchema to qemuDomainObjPrivate

2022-09-07 Thread Amneesh Singh
This patch adds a hashtable for storing the stats schema and a function to refresh it by querying "query-stats-schemas" using qemuMonitorQueryStatsSchema Signed-off-by: Amneesh Singh --- src/qemu/qemu_domain.c | 41 + src/qemu/qemu_domain.h |

[RFC PATCH 0/6] qemu: add support for query-stats-schemas

2022-09-07 Thread Amneesh Singh
they will be added in the next patchset. [6/6]: This patch adds a new stat worker for QEMU called "Vm" due to the stats being for the "vm" target. It utilises the same helper function as above. Comments are much appreciated. Amneesh Singh (6): qemu_monitor: add qemuMon

[RFC PATCH 2/6] qemu_capabilities: add "query-stats-schemas" QMP command to the QEMU capabilities

2022-09-07 Thread Amneesh Singh
Related: https://gitlab.com/libvirt/libvirt/-/issues/276 Signed-off-by: Amneesh Singh --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml | 1 + 3 files changed, 4 insertions

[RFC PATCH 4/6] qemu_monitor: add qemuMonitorGetStatsByQOMPath

2022-09-07 Thread Amneesh Singh
This function returns the virJSONValue object which has the same qom_path as specified. Signed-off-by: Amneesh Singh --- src/qemu/qemu_monitor.c | 38 ++ src/qemu/qemu_monitor.h | 4 2 files changed, 42 insertions(+) diff --git a/src/qemu

[RFC PATCH 1/6] qemu_monitor: add qemuMonitorQueryStatsSchema

2022-09-07 Thread Amneesh Singh
Related: https://gitlab.com/libvirt/libvirt/-/issues/276 This patch adds a simple API for "query-stats-schemas" QMP command Signed-off-by: Amneesh Singh --- src/qemu/qemu_monitor.c | 29 +++ src/qemu/qemu_monitor.h | 35 ++ src/qemu/qemu_monitor_j

[PATCH v4 0/3] qemu: add an API for "query-stats" QMP command

2022-08-17 Thread Amneesh Singh
- Acquire and release qemuMonitorObj lock before and after calling qemuMonitorQueryStats respectively. - Add the check for privileged access. Relevant QEMU patches can be found here: https://lore.kernel.org/all/20220530150714.756954-1-pbonz...@redhat.com/ This patchset is part of the 2

[PATCH v4 2/3] qemu_capabilities: add "query-stats" QMP command to the QEMU capabilities

2022-08-17 Thread Amneesh Singh
Related: https://gitlab.com/libvirt/libvirt/-/issues/276 Signed-off-by: Amneesh Singh --- src/qemu/qemu_capabilities.c | 4 src/qemu/qemu_capabilities.h | 3 +++ tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml | 1 + 3 files changed, 8 insertions

[PATCH v4 1/3] qemu_monitor: add qemuMonitorQueryStats

2022-08-17 Thread Amneesh Singh
Signed-off-by: Amneesh Singh --- src/qemu/qemu_monitor.c | 117 +++ src/qemu/qemu_monitor.h | 48 ++ src/qemu/qemu_monitor_json.c | 91 +++ src/qemu/qemu_monitor_json.h | 6 ++ 4 files changed, 262 insertions(+) di

[PATCH v4 3/3] qemu_driver: use qemuMonitorQueryStats to extract halt poll time

2022-08-17 Thread Amneesh Singh
This patch uses qemuMonitorQueryStats to query "halt_poll_success_ns" and "halt_poll_fail_ns" for every vCPU. The respective values for each vCPU are then added together. Signed-off-by: Amneesh Singh --- src/qemu/qemu_driver.c | 81 ++

Re: [PATCH 3/3] qemu_driver: use qemuMonitorQueryStats to extract halt poll time

2022-07-23 Thread Amneesh Singh
On Fri, Jul 22, 2022 at 07:09:57PM +0200, Paolo Bonzini wrote: > On 7/22/22 17:43, Martin Kletzander wrote: > > As mentioned before, all these failures do not have to exit the > > function, but rather fallback to the old way. You can even create > > two new functions for the new and old implementa

Re: [PATCH 1/3] qemu_monitor: add qemuMonitorQueryStats

2022-07-23 Thread Amneesh Singh
On Fri, Jul 22, 2022 at 05:02:06PM +0200, Martin Kletzander wrote: > On Fri, Jul 22, 2022 at 02:44:30PM +0200, Kristina Hanicova wrote: > > On Thu, Jul 14, 2022 at 7:54 AM Amneesh Singh wrote: > > > > > Related: https://gitlab.com/libvirt/libvirt/-/issues/276 > > &

[PATCH 1/3] qemu_monitor: add qemuMonitorQueryStats

2022-07-13 Thread Amneesh Singh
Signed-off-by: Amneesh Singh --- src/qemu/qemu_monitor.c | 70 +++ src/qemu/qemu_monitor.h | 45 src/qemu/qemu_monitor_json.c | 130 +++ src/qemu/qemu_monitor_json.h | 6 ++ 4 files changed, 251 insertions(+) diff --git

[PATCH 3/3] qemu_driver: use qemuMonitorQueryStats to extract halt poll time

2022-07-13 Thread Amneesh Singh
Related: https://gitlab.com/libvirt/libvirt/-/issues/276 This patch uses qemuMonitorQueryStats to query "halt_poll_success_ns" and "halt_poll_fail_ns" for every vCPU. The respective values for each vCPU are then added together. Signed-off-by: Amneesh Singh --- src/qem

[PATCH 2/3] qemu_capabilities: add "query-stats" QMP command to the QEMU capabilities

2022-07-13 Thread Amneesh Singh
Related: https://gitlab.com/libvirt/libvirt/-/issues/276 This patch adds "query-stats" to the QEMU capabilities. Signed-off-by: Amneesh Singh --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/qemu/qemu_capa

[PATCH 0/3] qemu: add an API for "query-stats" QMP command

2022-07-13 Thread Amneesh Singh
respectively. - Add the check for privileged access. Relevant QEMU patches can be found here: https://lore.kernel.org/all/20220530150714.756954-1-pbonz...@redhat.com/ This patchset is part of the 2022 GSOC contributor project. Amneesh Singh (3): qemu_monitor: add qemuMonitorQueryStats qemu_

[PATCH 0/3] qemu: add an API for "query-stats" QMP command

2022-07-13 Thread Amneesh Singh
respectively. - Add the check for privileged access. Relevant QEMU patches can be found here: https://lore.kernel.org/all/20220530150714.756954-1-pbonz...@redhat.com/ This patchset is part of the 2022 GSOC contributor project. Amneesh Singh (3): qemu_monitor: add qemuMonitorQueryStats qemu_

[PATCH RFC v2 3/3] qemu_driver: use qemuMonitorQueryStats to extract halt poll time

2022-07-05 Thread Amneesh Singh
Related: https://gitlab.com/libvirt/libvirt/-/issues/276 This patch uses qemuMonitorQueryStats to query "halt_poll_success_ns" and "halt_poll_fail_ns" for every vCPU. The respective values for each vCPU are then added together. Signed-off-by: Amneesh Singh --- src/qem

[PATCH RFC v2 0/3] qemu: add an API for "query-stats" QMP command

2022-07-05 Thread Amneesh Singh
can be found here: https://lore.kernel.org/all/20220530150714.756954-1-pbonz...@redhat.com/ This patchset is part of the 2022 GSOC contributor project. Amneesh Singh (3): qemu_monitor: add qemuMonitorQueryStats qemu_capabilities: add "query-stats" QMP command to the QEMU cap

[PATCH RFC v2 2/3] qemu_capabilities: add "query-stats" QMP command to the QEMU capabilities

2022-07-05 Thread Amneesh Singh
Related: https://gitlab.com/libvirt/libvirt/-/issues/276 This patch adds "query-stats" to the QEMU capabilities. Signed-off-by: Amneesh Singh --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/qemu/qemu_capa

[PATCH RFC v2 1/3] qemu_monitor: add qemuMonitorQueryStats

2022-07-05 Thread Amneesh Singh
Signed-off-by: Amneesh Singh --- src/qemu/qemu_monitor.c | 106 src/qemu/qemu_monitor.h | 56 +++ src/qemu/qemu_monitor_json.c | 130 +++ src/qemu/qemu_monitor_json.h | 6 ++ 4 files changed, 298 insertions(+) di

Re: [PATCH 3/3] qemu_driver: use qemuMonitorQueryStats to extract halt poll time

2022-06-29 Thread Amneesh Singh
On Wed, Jun 29, 2022 at 09:03:33AM +0200, Michal Prívozník wrote: > On 6/28/22 22:25, Martin Kletzander wrote: > > On Tue, Jun 28, 2022 at 10:15:28PM +0530, Amneesh Singh wrote: > >> On Tue, Jun 28, 2022 at 05:23:11PM +0200, Michal Prívozník wrote: > >>> On 6/24

Re: [PATCH 3/3] qemu_driver: use qemuMonitorQueryStats to extract halt poll time

2022-06-28 Thread Amneesh Singh
On Tue, Jun 28, 2022 at 10:25:54PM +0200, Martin Kletzander wrote: > On Tue, Jun 28, 2022 at 10:15:28PM +0530, Amneesh Singh wrote: > > On Tue, Jun 28, 2022 at 05:23:11PM +0200, Michal Prívozník wrote: > > > On 6/24/22 10:14, Amneesh Singh wrote: > > > > Related: http

Re: [PATCH 3/3] qemu_driver: use qemuMonitorQueryStats to extract halt poll time

2022-06-28 Thread Amneesh Singh
On Tue, Jun 28, 2022 at 05:23:11PM +0200, Michal Prívozník wrote: > On 6/24/22 10:14, Amneesh Singh wrote: > > Related: https://gitlab.com/libvirt/libvirt/-/issues/276 > > > > This patch uses qemuMonitorQueryStats to query "halt_poll_success_ns" > > and &q

[PATCH 3/3] qemu_driver: use qemuMonitorQueryStats to extract halt poll time

2022-06-24 Thread Amneesh Singh
Related: https://gitlab.com/libvirt/libvirt/-/issues/276 This patch uses qemuMonitorQueryStats to query "halt_poll_success_ns" and "halt_poll_fail_ns" for every vCPU. The respective values for each vCPU are then added together. Signed-off-by: Amneesh Singh --- src/qem

[PATCH 1/3] qemu_monitor: add qemuMonitorQueryStats

2022-06-24 Thread Amneesh Singh
Signed-off-by: Amneesh Singh --- src/qemu/qemu_monitor.c | 46 + src/qemu/qemu_monitor.h | 36 ++ src/qemu/qemu_monitor_json.c | 128 +++ src/qemu/qemu_monitor_json.h | 6 ++ 4 files changed, 216 insertions(+) diff --git

[PATCH 0/3] qemu: add an API for "query-stats" QMP command

2022-06-24 Thread Amneesh Singh
rg/all/20220523150509.349412-1-pbonz...@redhat.com/ This patchset is part of the 2022 GSOC contributor project. All reviews and comments are appreciated :). Amneesh Singh (3): qemu_monitor: add qemuMonitorQueryStats qemu_capabilities: add "query-stats" QMP command to the

[PATCH 2/3] qemu_capabilities: add "query-stats" QMP command to the QEMU capabilities

2022-06-24 Thread Amneesh Singh
Related: https://gitlab.com/libvirt/libvirt/-/issues/276 This patch adds "query-stats" to the QEMU capabilities. Signed-off-by: Amneesh Singh --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/qemu/qemu_capa

[PATCH v2] conf: virDomainGraphicsDefValidate: validate attribute 'network' for listen type 'network'

2022-04-13 Thread Amneesh Singh
Related: https://gitlab.com/libvirt/libvirt/-/issues/93 Signed-off-by: Amneesh Singh --- v1 PATCH: https://listman.redhat.com/archives/libvir-list/2022-April/230021.html src/conf/domain_validate.c | 25 + 1 file changed, 25 insertions(+) diff --git a/src/conf

[PATCH] virDomainGraphicsListenDefParseXML: validate attribute 'network' for listen type 'network'

2022-04-12 Thread Amneesh Singh
Related: https://gitlab.com/libvirt/libvirt/-/issues/93 Signed-off-by: Amneesh Singh --- src/conf/domain_conf.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index bd28840..f1651e3 100644 --- a/src/conf/domain_conf.c +++ b/src/conf

[PATCH 0/3] virsh: Add some completers

2022-04-02 Thread Amneesh Singh
Add some basic completers Amneesh Singh (3): virsh: Provide completer for virtualization types virsh: Provide completer for CPU architectures virsh: Provide completer for PCI backend drivers src/util/virarch.c | 2 +- src/util/virarch.h | 2 +- tools/virsh

[PATCH 1/3] virsh: Provide completer for virtualization types

2022-04-02 Thread Amneesh Singh
Related: https://gitlab.com/libvirt/libvirt/-/issues/9 Signed-off-by: Amneesh Singh --- tools/virsh-completer-host.c | 12 tools/virsh-completer-host.h | 5 + tools/virsh-host.c | 4 3 files changed, 21 insertions(+) diff --git a/tools/virsh-completer-host.c b

[PATCH 2/3] virsh: Provide completer for CPU architectures

2022-04-02 Thread Amneesh Singh
Related: https://gitlab.com/libvirt/libvirt/-/issues/9 Signed-off-by: Amneesh Singh --- src/util/virarch.c | 2 +- src/util/virarch.h | 2 +- tools/virsh-completer-host.c | 12 tools/virsh-completer-host.h | 5 + tools/virsh-host.c | 4 5

[PATCH 3/3] virsh: Provide completer for PCI backend drivers

2022-04-02 Thread Amneesh Singh
Related: https://gitlab.com/libvirt/libvirt/-/issues/9 Signed-off-by: Amneesh Singh --- tools/virsh-completer-nodedev.c | 11 +++ tools/virsh-completer-nodedev.h | 4 tools/virsh-nodedev.c | 2 ++ 3 files changed, 17 insertions(+) diff --git a/tools/virsh-completer