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

2022-08-17 Thread Amneesh Singh
QEMU is gaining introspectable statistics which can be queried via the "query-stats" QMP command. This patchset aims to add an API for the same. The returned JSON for "query-stats" is an array of objects containing their own respective array of statistics. Patch 1 adds the API for "query-stats" a

[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
Related: https://gitlab.com/libvirt/libvirt/-/issues/276 This patch adds an API for the "query-stats" QMP command. The query returns a JSON containing the statistics based on the target, which can either be vCPU or VM, and the providers. The API deserializes the query result into an array of GHas

[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 ++ 1 file changed, 75 i

Re: [libvirt] [PATCH 2/2] qemu: Remove host-passthrough validation check for host-phys-bits=on

2022-08-17 Thread Claudio Fontana
On 8/17/22 10:19, Lin Ma wrote: > Besides the -cpu host, The host-phys-bits=on applies to custom or max > cpu model, So the host-passthrough validation check is unnecessary for > maxphysaddr with mode='passthrough'. > > Signed-off-by: Lin Ma > --- > src/qemu/qemu_validate.c | 7 --- > 1 file

Re: [libvirt] [PATCH 1/2] docs: Fix missing slashes in the maxphysaddr example

2022-08-17 Thread Claudio Fontana
On 8/17/22 10:19, Lin Ma wrote: > Signed-off-by: Lin Ma > --- > docs/formatdomain.rst | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst > index ed0d9c1959..56ca5efe43 100644 > --- a/docs/formatdomain.rst > +++ b/docs/format

[libvirt PATCH 0/2] tests: Fix qemuxml2argvtest failure on macOS 12

2022-08-17 Thread Andrea Bolognani
As reported in https://listman.redhat.com/archives/libvir-list/2022-May/230762.html I'm still unclear on why this worked with all versions of macOS until 12, but the fix feels reasonable enough and I can't really justify digging much further. Test pipeline: https://gitlab.com/abologna/libvirt/

[libvirt PATCH 1/2] util: Preserve macOS dyld environment by default

2022-08-17 Thread Andrea Bolognani
The DYLD_* environment variables on macOS have the same purpose as the LD_* variables have on Linux. Since we're preserving the latter by default, it makes sense to do the same for the former as well. Signed-off-by: Andrea Bolognani --- src/util/vircommand.c | 2 ++ 1 file changed, 2 insertions(

[libvirt PATCH 2/2] tests: Reset macOS dyld environment

2022-08-17 Thread Andrea Bolognani
This is needed to ensure the environment variables that we need for the test program itself, specifically to load mock libraries, does not interfere with any command that gets invoked by it, either directly or indirectly. We already perform the same cleanup step for LD_* variables. This makes the

Re: [PATCH 0/5] Add "support" for VMWare Distributed Switch

2022-08-17 Thread Ján Tomko
On a Wednesday in 2022, Martin Kletzander wrote: Previously (but still in this release) such interfaces were represented as dummy ones, but hopefully we can properly represent them still in the same release. Martin Kletzander (5): tests: Fix vmx/xml filenames conf: Rewrite virNetDevVPortProfil

Re: [PATCH 2/5] conf: Rewrite virNetDevVPortProfileCopy

2022-08-17 Thread Martin Kletzander
On Wed, Aug 17, 2022 at 02:50:37PM +0200, Martin Kletzander wrote: This makes it nicer to use as since it cannot fail shortens the usage in all callers. This is unrelated to this series and can be dropped, it was a part of previous implementation that got scratched. signature.asc Description

[PATCH 3/5] vmx: Require networkName for bridged and custom NICs

2022-08-17 Thread Martin Kletzander
Commit 70768cda9740 marked this particular config string optional, but forgot that two of the interface types still require this name to exist. Mark it as optional only if there is no connectionType. Signed-off-by: Martin Kletzander --- src/vmx/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 de

[PATCH 0/5] Add "support" for VMWare Distributed Switch

2022-08-17 Thread Martin Kletzander
Previously (but still in this release) such interfaces were represented as dummy ones, but hopefully we can properly represent them still in the same release. Martin Kletzander (5): tests: Fix vmx/xml filenames conf: Rewrite virNetDevVPortProfileCopy vmx: Require networkName for bridged and

[PATCH 4/5] conf, docs, schemas: Add support for interface type vds

2022-08-17 Thread Martin Kletzander
This represents an interface connected to a VMWare Distributed Switch, previously obscured as a dummy interface. Signed-off-by: Martin Kletzander --- docs/formatdomain.rst | 30 +++ src/ch/ch_monitor.c | 1 + src/conf/domain_conf.c| 64 +

[PATCH 1/5] tests: Fix vmx/xml filenames

2022-08-17 Thread Martin Kletzander
Commit 70768cda9740 added a functionality that was previously (in an unsubmitted version of the commit) represented differently in the XML, but the filenames kept the old name. Fix the name so they are not misleading. Signed-off-by: Martin Kletzander --- .../{ethernet-unmanaged-nodev.vmx => eth

[PATCH 2/5] conf: Rewrite virNetDevVPortProfileCopy

2022-08-17 Thread Martin Kletzander
This makes it nicer to use as since it cannot fail shortens the usage in all callers. Signed-off-by: Martin Kletzander --- src/conf/domain_conf.c | 9 +++-- src/util/virnetdevvportprofile.c | 18 ++ src/util/virnetdevvportprofile.h | 5 +++-- 3 files changed, 16 i

[PATCH 5/5] vmx: Add support for VDS interface

2022-08-17 Thread Martin Kletzander
Since we cannot properly plug a new VM into the distributed switch, we can at least report the provided pieces of information, so that XML editing still works even for VMs with such interfaces. https://bugzilla.redhat.com/show_bug.cgi?id=1988211 Signed-off-by: Martin Kletzander --- src/vmx/vmx.

Re: [PATCH] cpu_map: Add -noMPX models for x86 Icelake Server

2022-08-17 Thread Jiri Denemark
On Tue, Aug 16, 2022 at 06:38:59 -0700, Lena Voytek wrote: > With the current setup, a 10nm Icelake CPU, such as the Intel Xeon Gold > 6338, will be incorrectly recognized by libvirt as a 14nm broadwell CPU due > to the mpx label. See > https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1978064