Re: [libvirt PATCH] API: virDomainLookupByID: s/UUId/UUID/

2020-10-04 Thread Pino Toscano
On Monday, 5 October 2020 00:25:53 CEST Ján Tomko wrote: > Signed-off-by: Ján Tomko > --- > src/libvirt-domain.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c > index 415482a526..a7266ccd88 100644 > ---

Re: [PATCH 7/8] hyperv: implement connectGetVersion

2020-10-04 Thread Pino Toscano
On Saturday, 3 October 2020 01:02:47 CEST Matt Coleman wrote: > On Oct 2, 2020, at 2:48 AM, Pino Toscano wrote: > > IMHO these explanations should be documented in the Hyper-V driver > > page: docs/drvhyperv.html.in. This way, users know about the different > > value returned by

Re: [PATCH 3/8] hyperv: break out common lookups into separate functions

2020-10-04 Thread Pino Toscano
On Friday, 2 October 2020 23:50:22 CEST Matt Coleman wrote: > On Oct 2, 2020, at 2:25 AM, Pino Toscano wrote: > > Note that now hypervGetVirtualSystemByID() issues VIR_ERR_INTERNAL_ERROR > > in case / *computerSystemList is null, instead of > > VIR_ERR_NO_DOMAIN. Shouldn't this still be able to

[PATCH] rpm: Enable Xen support on AArch64

2020-10-04 Thread Neal Gompa
Starting with Linux 5.9, Xen Dom0 works on commonly available AArch64 devices, such as the Raspberry Pi 4. Reference: https://xenproject.org/2020/09/29/xen-on-raspberry-pi-4-adventures/ Signed-off-by: Neal Gompa --- libvirt.spec.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

Re: [PATCH] rpm: Simplify qemu+kvm conditionals and eliminate duplication

2020-10-04 Thread Neal Gompa
On Thu, Sep 24, 2020 at 4:05 PM Neal Gompa wrote: > > The conditionals for enabling qemu+kvm were unnecessarily complex. > In practice, there were far fewer cases where the functionality would > be disabled than what the conditional logic expressed, and this change > simplifies it to the

[libvirt PATCH] API: discourage usage of non-ListAll APIs

2020-10-04 Thread Ján Tomko
They require the caller to provide the maximum number of array elements upfront, leading to either incomplete results or violations of the zero-one-infinity rule. Signed-off-by: Ján Tomko --- src/libvirt-domain-snapshot.c | 6 -- src/libvirt-domain.c | 8

[libvirt PATCH] API: virDomainLookupByID: s/UUId/UUID/

2020-10-04 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/libvirt-domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 415482a526..a7266ccd88 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -284,7 +284,7 @@

[libvirt PATCH 3/4] vbox: refactor vboxNetworkGetXMLDesc a bit

2020-10-04 Thread Ján Tomko
Error out on allocation failure to reduce the nesting. Signed-off-by: Ján Tomko --- src/vbox/vbox_network.c | 102 +++- 1 file changed, 49 insertions(+), 53 deletions(-) diff --git a/src/vbox/vbox_network.c b/src/vbox/vbox_network.c index

[libvirt PATCH 3/4] vz: vzEatCookie: separate allocation

2020-10-04 Thread Ján Tomko
Use g_new0 outside of the error condition. Signed-off-by: Ján Tomko --- src/vz/vz_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index dad7fe37b7..a83d4117a4 100644 --- a/src/vz/vz_driver.c +++ b/src/vz/vz_driver.c @@

[libvirt PATCH 2/4] vz: vzEatCookie: use distinct 'tmp' variables

2020-10-04 Thread Ján Tomko
Mark both as g_autofree within their separate scopes. Signed-off-by: Ján Tomko --- src/vz/vz_driver.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index 5b40f9a835..dad7fe37b7 100644 --- a/src/vz/vz_driver.c +++

[libvirt PATCH 4/4] vz: use g_new0 instead of VIR_ALLOC

2020-10-04 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/vz/vz_driver.c | 12 src/vz/vz_sdk.c| 46 ++ src/vz/vz_utils.c | 3 +-- 3 files changed, 19 insertions(+), 42 deletions(-) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index

[libvirt PATCH 1/4] vz: separate if conditions in vzEatCookie

2020-10-04 Thread Ján Tomko
Create a separate scope where 'tmp' variable can be used. Signed-off-by: Ján Tomko --- src/vz/vz_driver.c | 28 +++- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index 40b1828eb2..5b40f9a835 100644 ---

[libvirt PATCH] vmware: use g_new0 instead of VIR_ALLOC (glib chronicles)

2020-10-04 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/vmware/vmware_driver.c | 6 ++--- src/vmx/vmx.c | 46 ++ 2 files changed, 14 insertions(+), 38 deletions(-) diff --git a/src/vmware/vmware_driver.c b/src/vmware/vmware_driver.c index e82edf2a11..087664a341 100644

[libvirt PATCH 0/4] vz: use g_new0 (glib chronicles)

2020-10-04 Thread Ján Tomko
Ján Tomko (4): vz: separate if conditions in vzEatCookie vz: vzEatCookie: use distinct 'tmp' variables vz: vzEatCookie: separate allocation vz: use g_new0 instead of VIR_ALLOC src/vz/vz_driver.c | 49 ++ src/vz/vz_sdk.c| 46

[libvirt PATCH 4/4] vbox: use g_new0 instead of VIR_ALLOC

2020-10-04 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/vbox/vbox_common.c| 90 +++ src/vbox/vbox_network.c | 13 ++--- src/vbox/vbox_snapshot_conf.c | 48 --- 3 files changed, 53 insertions(+), 98 deletions(-) diff --git a/src/vbox/vbox_common.c

[libvirt PATCH 5/8] esx: esxConnectOpen: use allocated buffer

2020-10-04 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/esx/esx_driver.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c index e82e5ed835..0798493296 100644 --- a/src/esx/esx_driver.c +++ b/src/esx/esx_driver.c @@ -813,7 +813,7 @@

[libvirt PATCH 3/8] libxl: libxlDomainStart: use g_auto more

2020-10-04 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/libxl/libxl_domain.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index 034be2ddd7..b49ca83c10 100644 --- a/src/libxl/libxl_domain.c +++ b/src/libxl/libxl_domain.c @@ -1266,16

[libvirt PATCH 2/4] vbox: invert condition in vboxSnapshotGetReadOnlyDisks

2020-10-04 Thread Ján Tomko
Error out on (impossible) failed allocation, to reduce indentation. Signed-off-by: Ján Tomko --- src/vbox/vbox_common.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index 45fd670a11..f59af697ea 100644 ---

[libvirt PATCH 0/4] vbox: use g_new0 (glib chronicles)

2020-10-04 Thread Ján Tomko
Ján Tomko (4): vbox: use g_new0 in vboxDumpAudio vbox: invert condition in vboxSnapshotGetReadOnlyDisks vbox: refactor vboxNetworkGetXMLDesc a bit vbox: use g_new0 instead of VIR_ALLOC src/vbox/vbox_common.c| 119 -- src/vbox/vbox_network.c |

[libvirt PATCH 8/8] build: lower maximum frame size to 1792

2020-10-04 Thread Ján Tomko
This number is the closest multiple of 1 above the largest frame value reported by clang in the current codebase. Signed-off-by: Ján Tomko --- meson.build | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index a5ce8e17a8..8bef701f67

[libvirt PATCH 1/4] vbox: use g_new0 in vboxDumpAudio

2020-10-04 Thread Ján Tomko
Elimination of the positive conditions reduces the indentation by two levels. Signed-off-by: Ján Tomko --- src/vbox/vbox_common.c | 24 ++-- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index

[libvirt PATCH 1/8] libxl: libxlDomainStart: use g_autoptr for virDomainDef

2020-10-04 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/libxl/libxl_domain.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index a3f362a0c8..c96aeab04b 100644 --- a/src/libxl/libxl_domain.c +++ b/src/libxl/libxl_domain.c @@ -1261,7 +1261,7 @@

[libvirt PATCH 2/8] libxl: libxlDomainStart: autofree managed_save_path

2020-10-04 Thread Ján Tomko
It is only used once, so it's pointless to free it both in the code and in the cleanup section. Signed-off-by: Ján Tomko --- src/libxl/libxl_domain.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index

[libvirt PATCH 4/8] libxl: allocate d_config

2020-10-04 Thread Ján Tomko
clang reports: stack frame size of 2152 bytes in function 'libxlDomainStart' This is mostly due to the d_config variable: sizeof(libxl_domain_config) = 1232 Use g_new0 to allocate it and bring the frame size down. Signed-off-by: Ján Tomko --- src/libxl/libxl_domain.c | 24

[libvirt PATCH 6/8] lxc: virLXCProcessStart: use allocated buffers

2020-10-04 Thread Ján Tomko
Lower the stack frame by using allocated buffers. Signed-off-by: Ján Tomko --- src/lxc/lxc_process.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index 16969dbf33..bf050416c0 100644 ---

[libvirt PATCH 7/8] remote: allocate virDomainDef for ACL check

2020-10-04 Thread Ján Tomko
Use explicit g_free in the cleanup section, since we're not dealing with a proper virDomainDef, but just a shallow copy. Signed-off-by: Ján Tomko --- src/remote/remote_daemon_dispatch.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git

[libvirt PATCH 0/8] build: lower maximum frame size to 1792

2020-10-04 Thread Ján Tomko
Ján Tomko (8): libxl: libxlDomainStart: use g_autoptr for virDomainDef libxl: libxlDomainStart: autofree managed_save_path libxl: libxlDomainStart: use g_auto more libxl: allocate d_config esx: esxConnectOpen: use allocated buffer lxc: virLXCProcessStart: use allocated buffers

Re: [PATCH 4/4] docs: formatdomain: add spicevmc example

2020-10-04 Thread Ján Tomko
On a Sunday in 2020, Cole Robinson wrote: spicevmc is the most common usage. This adds an XML example for it. Signed-off-by: Cole Robinson --- docs/formatdomain.rst | 1 + 1 file changed, 1 insertion(+) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

Re: [PATCH 3/4] docs: formatdomain: fix net downscript 'since'

2020-10-04 Thread Ján Tomko
On a Sunday in 2020, Cole Robinson wrote: It was added in 6.4.0, not 5.1.0 Signed-off-by: Cole Robinson Fixes: 61ba6f09b181ec8c1591dc1df8c3cd8e093ca67b Reviewed-by: Ján Tomko Jano --- docs/formatdomain.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) signature.asc

[libvirt PATCH] news: move section about downscript to v6.4.0

2020-10-04 Thread Ján Tomko
The feature was merged in v6.3.0-175-g61ba6f09b1 Signed-off-by: Ján Tomko Fixes: 4eda71a8d05d968e73ab9b0fdc8a90123c57d39e --- NEWS.rst | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/NEWS.rst b/NEWS.rst index f6074d9fe8..5da6174e42 100644 --- a/NEWS.rst +++

Re: [PATCH 1/4] docs: formatdomain: remove doubled filesystem

2020-10-04 Thread Ján Tomko
On a Sunday in 2020, Cole Robinson wrote: libvirt doesn't reject this but only one element takes effect. Drop the instance that is already referenced in the previous example Signed-off-by: Cole Robinson --- docs/formatdomain.rst | 1 - 1 file changed, 1 deletion(-) Reviewed-by: Ján Tomko

Re: [PATCH 2/4] docs: formatdomain: fix incorrect 'Vsock' heading indent

2020-10-04 Thread Ján Tomko
On a Sunday in 2020, Cole Robinson wrote: Currently it is visually at the same indent as . This fixes it to be grouped it with Signed-off-by: Cole Robinson Fixes: d4abb7b45d48aba77c2464dbea95f02a43a60834 --- docs/formatdomain.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH] qemu: Taint cpu host-passthrough only after migration

2020-10-04 Thread Cole Robinson
>From a discussion last year[1], Dan recommended libvirt drop the tain flag for cpu host-passthrough, unless the VM has been migrated. This repurposes the existing host-cpu taint flag to do just that. [1]: https://www.redhat.com/archives/virt-tools-list/2019-February/msg00041.html

[PATCH] tests: cover disk, interface

2020-10-04 Thread Cole Robinson
There is present no XML test coverage for this. Add genericxml parse + formatting coverage. Signed-off-by: Cole Robinson --- .../device-backenddomain.xml | 30 +++ .../device-backenddomain.xml | 1 + tests/genericxml2xmltest.c

[PATCH 4/4] docs: formatdomain: add spicevmc example

2020-10-04 Thread Cole Robinson
spicevmc is the most common usage. This adds an XML example for it. Signed-off-by: Cole Robinson --- docs/formatdomain.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index 8fc08c5fd2..9316dab9cc 100644 --- a/docs/formatdomain.rst +++

[PATCH 3/4] docs: formatdomain: fix net downscript 'since'

2020-10-04 Thread Cole Robinson
It was added in 6.4.0, not 5.1.0 Signed-off-by: Cole Robinson --- docs/formatdomain.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index 37c65add4d..8fc08c5fd2 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst

[PATCH 1/4] docs: formatdomain: remove doubled filesystem

2020-10-04 Thread Cole Robinson
libvirt doesn't reject this but only one element takes effect. Drop the instance that is already referenced in the previous example Signed-off-by: Cole Robinson --- docs/formatdomain.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index

[PATCH 2/4] docs: formatdomain: fix incorrect 'Vsock' heading indent

2020-10-04 Thread Cole Robinson
Currently it is visually at the same indent as . This fixes it to be grouped it with Signed-off-by: Cole Robinson --- docs/formatdomain.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index d75a91bbf4..37c65add4d 100644 ---

[PATCH 0/4] docs: formatdomain: misc fixes

2020-10-04 Thread Cole Robinson
A collection of formatdomain fixes that I've noticed over the past few months Cole Robinson (4): docs: formatdomain: remove doubled filesystem docs: formatdomain: fix incorrect 'Vsock' heading indent docs: formatdomain: fix net downscript 'since' docs: formatdomain: add spicevmc example

Re: [libvirt PATCH] tests: fix incorrect free of GVariant in our GLib mock functions

2020-10-04 Thread Cole Robinson
On 10/2/20 6:36 AM, Pavel Hrdina wrote: > GLib implementation of g_dbus_connection_call_sync() calls > g_variant_ref_sink() on the passed @parameters to make sure they have > proper reference. If the original reference is floating the > g_dbus_connection_call_sync() consumes it, but if it's normal