[PATCH 28/28] domain_conf: make virDomainVsockDefFormat() void

2020-11-05 Thread Matt Coleman
This function always returns zero, so it might as well be void. Signed-off-by: Matt Coleman --- src/conf/domain_conf.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index df876ae8c3..54ea7664d8 100644 ---

[PATCH 25/28] domain_conf: make virDomainLeaseInsert() void

2020-11-05 Thread Matt Coleman
This function always returns zero, so it might as well be void. Signed-off-by: Matt Coleman --- src/conf/domain_conf.c | 5 + src/conf/domain_conf.h | 3 +-- src/qemu/qemu_driver.c | 3 +-- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/conf/domain_conf.c

[PATCH 27/28] domain_conf: make virDomainShmemDefFormat() void

2020-11-05 Thread Matt Coleman
This function always returns zero, so it might as well be void. Signed-off-by: Matt Coleman --- src/conf/domain_conf.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index e3d1922943..df876ae8c3 100644 ---

[PATCH 26/28] domain_conf: make virDomainPanicDefFormat() void

2020-11-05 Thread Matt Coleman
This function always returns zero, so it might as well be void. Signed-off-by: Matt Coleman --- src/conf/domain_conf.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 090889889a..e3d1922943 100644 ---

[PATCH 23/28] domain_conf: use g_renew in virDomainLeaseInsertPreAlloc()

2020-11-05 Thread Matt Coleman
Signed-off-by: Matt Coleman --- src/conf/domain_conf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 4eace66ce7..987992efa6 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -18274,7 +18274,8 @@ int

[PATCH 21/28] domain_conf: make virDomainDiskInsert() void

2020-11-05 Thread Matt Coleman
This function always returns zero, so it might as well be void. Signed-off-by: Matt Coleman --- src/conf/domain_conf.c | 7 ++- src/conf/domain_conf.h | 4 +--- src/libxl/libxl_driver.c | 3 +-- src/lxc/lxc_driver.c | 3 +-- src/qemu/qemu_driver.c | 3 +-- src/vz/vz_sdk.c

[PATCH 24/28] domain_conf: make virDomainLeaseInsertPreAlloc() void

2020-11-05 Thread Matt Coleman
This function always returns zero, so it might as well be void. Signed-off-by: Matt Coleman --- src/conf/domain_conf.c | 6 ++ src/conf/domain_conf.h | 3 +-- src/qemu/qemu_hotplug.c | 3 +-- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/conf/domain_conf.c

[PATCH 22/28] domain_conf: make virDomainControllerInsert() void

2020-11-05 Thread Matt Coleman
This function always returns zero, so it might as well be void. Signed-off-by: Matt Coleman --- src/conf/domain_conf.c | 5 + src/conf/domain_conf.h | 4 +--- src/libxl/libxl_conf.c | 3 +-- src/libxl/libxl_driver.c | 3 +-- src/qemu/qemu_driver.c | 3 +-- 5 files changed, 5

[PATCH 19/28] domain_conf: use g_free in virDomainDiskSetBlockIOTune()

2020-11-05 Thread Matt Coleman
Signed-off-by: Matt Coleman --- src/conf/domain_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 25baa44a92..d71bd68682 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -31972,7 +31972,7 @@

[PATCH 20/28] domain_conf: use g_renew in virDomainDiskInsert() and virDomainControllerInsert()

2020-11-05 Thread Matt Coleman
Signed-off-by: Matt Coleman --- src/conf/domain_conf.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index d71bd68682..54d6f890ef 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -17685,8 +17685,7 @@

[PATCH 17/28] domain_conf: make virDomainChrSourceDefFormat() void

2020-11-05 Thread Matt Coleman
This function always returns zero, so it might as well be void. Signed-off-by: Matt Coleman --- src/conf/domain_conf.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 6c7b386551..7c4e34a2e6 100644 ---

[PATCH 18/28] domain_conf: make virDomainDiskSetBlockIOTune() void

2020-11-05 Thread Matt Coleman
This function always returns zero, so it might as well be void. Signed-off-by: Matt Coleman --- src/conf/domain_conf.c | 6 +- src/conf/domain_conf.h | 4 ++-- src/qemu/qemu_driver.c | 6 ++ src/test/test_driver.c | 3 +-- 4 files changed, 6 insertions(+), 13 deletions(-) diff --git

[PATCH 13/28] domain_conf: make virDomainVirtioNetGuestOpts/HostOpts/DriverFormat() void

2020-11-05 Thread Matt Coleman
These functions always return zero, so they might as well be void. Signed-off-by: Matt Coleman --- src/conf/domain_conf.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index d8a6f89695..bcd5cc1313 100644 ---

[PATCH 15/28] domain_conf: make virDomainIOMMUDefFormat() void

2020-11-05 Thread Matt Coleman
This function always returns zero, so it might as well be void. Signed-off-by: Matt Coleman --- src/conf/domain_conf.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index d716db596a..edfaf7c8af 100644 ---

[PATCH 14/28] domain_conf: make virDomainRedirFilterDefFormat() void

2020-11-05 Thread Matt Coleman
This function always returns zero, so it might as well be void. Signed-off-by: Matt Coleman --- src/conf/domain_conf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index bcd5cc1313..d716db596a 100644 ---

[PATCH 16/28] domain_conf: make virDomainDefFormatBlkiotune() void

2020-11-05 Thread Matt Coleman
This function always returns zero, so it might as well be void. Signed-off-by: Matt Coleman --- src/conf/domain_conf.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index edfaf7c8af..6c7b386551 100644 ---

[PATCH 11/28] domain_conf: make virDomainDiskDefFormatDriver() void

2020-11-05 Thread Matt Coleman
This function always returns zero, so it might as well be void. Signed-off-by: Matt Coleman --- src/conf/domain_conf.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index a3bfa11817..88125683d1 100644 ---

[PATCH 09/28] domain_conf: make virDomainDiskSourceFormatNetwork() void

2020-11-05 Thread Matt Coleman
This function always returns zero, so it might as well be void. Signed-off-by: Matt Coleman --- src/conf/domain_conf.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 30aee5..c106de7f81 100644 ---

[PATCH 10/28] domain_conf: make virDomainDiskDefFormatIotune() void

2020-11-05 Thread Matt Coleman
This function always returns zero, so it might as well be void. Signed-off-by: Matt Coleman --- src/conf/domain_conf.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index c106de7f81..a3bfa11817 100644 ---

[PATCH 12/28] domain_conf: make virDomainControllerDriverFormat() void

2020-11-05 Thread Matt Coleman
This function always returns zero, so it might as well be void. Signed-off-by: Matt Coleman --- src/conf/domain_conf.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 88125683d1..d8a6f89695 100644 ---

[PATCH 06/28] domain_conf: make virDomainDeviceInfoFormat() void

2020-11-05 Thread Matt Coleman
This function always returns zero, so it might as well be void. Signed-off-by: Matt Coleman --- src/conf/domain_conf.c | 81 +- 1 file changed, 25 insertions(+), 56 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index

[PATCH 08/28] domain_conf: make virDomainLeaseDefFormat() void

2020-11-05 Thread Matt Coleman
This function always returns zero, so it might as well be void. Signed-off-by: Matt Coleman --- src/conf/domain_conf.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 8476be6bf8..30aee5 100644 ---

[PATCH 07/28] domain_conf: make virDomainGraphicsDefParseXMLEGLHeadless() void

2020-11-05 Thread Matt Coleman
This function always returns zero, so it might as well be void. Signed-off-by: Matt Coleman --- src/conf/domain_conf.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 04f4cd5114..8476be6bf8 100644 ---

[PATCH 02/28] domain_conf: make virDomainPostParseCheckISCSIPath() void

2020-11-05 Thread Matt Coleman
The function only returns zero or aborts, so it might as well be void. This has the added benefit of simplifying the code that calls it. Signed-off-by: Matt Coleman --- src/conf/domain_conf.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git

[PATCH 04/28] domain_conf: make virDomainHostdevAssignAddress() void

2020-11-05 Thread Matt Coleman
The function always returns zero, so it might as well be void. Signed-off-by: Matt Coleman --- src/conf/domain_conf.c | 41 ++--- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index

[PATCH 01/28] domain_conf: make virDomainDiskSetDriver() void

2020-11-05 Thread Matt Coleman
The function only returns zero or aborts, so it might as well be void. This has the added benefit of simplifying the code that calls it. Signed-off-by: Matt Coleman --- src/conf/domain_conf.c | 3 +-- src/conf/domain_conf.h | 3 +-- src/libxl/libxl_conf.c | 2 +-

[PATCH 03/28] domain_conf: use g_free() in virDomainPostParseCheckISCSIPath()

2020-11-05 Thread Matt Coleman
Signed-off-by: Matt Coleman --- src/conf/domain_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index ce49905360..a64dec8df4 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -5078,7 +5078,7 @@

[PATCH 05/28] domain_conf: make virDomainChr/RNG/Video/VsockDefPostParse() and virDomainNVRAMDefFormat() void

2020-11-05 Thread Matt Coleman
These functions always return zero, so they might as well be void. Signed-off-by: Matt Coleman --- src/conf/domain_conf.c | 32 +--- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index

[PATCH 00/28] a bunch of domain_conf cleanup

2020-11-05 Thread Matt Coleman
Most of this is making functions void that unnecessarily return an int. It also includes some conversion to GLib. Feel free to squash related commits, if you'd like. I left them separate to make it easier to review. Matt Coleman (28): domain_conf: make virDomainDiskSetDriver() void

Re: [PATCH] domain_conf: make virDomainDiskSetSource() void

2020-11-05 Thread Matt Coleman
> On Nov 5, 2020, at 3:43 PM, Matt Coleman wrote: > > I also could go a bit further with this function's rewrite: the tmp > variable isn't actually necessary any longer since g_strdup() will > abort on failure. So, the function might as well be just two lines: > g_free() followed by

Re: [PATCH] domain_conf: make virDomainDiskSetSource() void

2020-11-05 Thread Matt Coleman
> On Nov 5, 2020, at 11:26 AM, Michal Prívozník wrote: > > With us adopting glib more and more cleanups like these will be desirable > more. Any plans on continuing? I discovered this when I tried to call this function without wrapping it with ignore_value(). I hadn't taken a look for other

[PATCH] util: xml: remove unused function virXMLChildElementCount

2020-11-05 Thread Yi Li
--- src/libvirt_private.syms | 1 - src/util/virxml.c| 21 - src/util/virxml.h| 1 - 3 files changed, 23 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 9029ea4fa2..36ab84162c 100644 --- a/src/libvirt_private.syms +++

[libvirt PATCH] vircgrouppriv: fix ATTRIBUTE_NONNULL for virCgroupNewDomainPartition

2020-11-05 Thread Pavel Hrdina
Commit <99d2c6519ad18651b5959fa0a3366bcb2c1e44f3> removed parameter from the function but did not modified ATTRIBUTE_NONNULL. Reported-by: John Ferlan Signed-off-by: Pavel Hrdina --- Pushed under trivial rule. src/util/vircgrouppriv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: Libvirt Open Source Contribution

2020-11-05 Thread Barrett J Schonefeld
Hey folks, We appreciate the feedback, and we've used this to complete some initial work on issue 11. We started with small changes in src/util, and we submitted them via email (following these guidelines on submitting patches ) to ensure we are on

Re: [libvirt PATCH v3 1/2] cpu_map: Add script to sync from QEMU i386 cpu models

2020-11-05 Thread Jiri Denemark
On Wed, Nov 04, 2020 at 11:53:50 +0100, Tim Wiederhake wrote: > This script is intended to help in synchronizing i386 QEMU cpu model > definitions with libvirt. > > As the QEMU cpu model definitions are post processed by QEMU and not > meant to be consumed by third parties directly, parsing this

Re: [libvirt PATCH 00/25] cgroup related fixes and cleanup

2020-11-05 Thread Neal Gompa
On Tue, Nov 3, 2020 at 7:42 AM Pavel Hrdina wrote: > > Pavel Hrdina (25): > qemu_cgroup: remove unused @empty variable > qemu: remove dead code that setup cgroups for helper processes > qemu_dbus: use emulator cgroup for dbus-daemon > vircgroupv2: properly detect empty tasks >

Re: [PATCH] domain_conf: make virDomainDiskSetSource() void

2020-11-05 Thread Michal Prívozník
On 11/5/20 7:23 AM, Matt Coleman wrote: The function only returns zero or aborts, so it might as well be void. This has the added benefit of simplifying the code that calls it. Signed-off-by: Matt Coleman --- src/conf/domain_conf.c | 3 +-- src/conf/domain_conf.h | 3 +--

Re: [PATCH] domain_conf: make virDomainDiskSetSource() void

2020-11-05 Thread Ján Tomko
On a Thursday in 2020, Matt Coleman wrote: The function only returns zero or aborts, so it might as well be void. This has the added benefit of simplifying the code that calls it. Signed-off-by: Matt Coleman --- src/conf/domain_conf.c | 3 +-- src/conf/domain_conf.h | 3 +--

Re: [PATCH v2 08/12] util: hash: Don't use 'const' with virHashTablePtr

2020-11-05 Thread Daniel Henrique Barboza
On 11/5/20 12:26 PM, Peter Krempa wrote: On Thu, Nov 05, 2020 at 10:50:23 -0300, Daniel Henrique Barboza wrote: On 11/4/20 2:05 PM, Peter Krempa wrote: We didn't use it rigorously and some helpers even cast it away. Remove const from all hash utility functions. Unrelated question: how

Re: [PATCH v2 00/12] Replace virHashTable by GHashTable

2020-11-05 Thread Daniel Henrique Barboza
On 11/4/20 2:05 PM, Peter Krempa wrote: Our hash table API was surprisingly close to glibs. v2: - pushed ACK'd patch - typo fix - rebased on current master - hashing function not replaced as our has random initialization Peter Krempa (12): virhashtest: testHashGetItems: Remove test case

Re: [PATCH v2 08/12] util: hash: Don't use 'const' with virHashTablePtr

2020-11-05 Thread Peter Krempa
On Thu, Nov 05, 2020 at 10:50:23 -0300, Daniel Henrique Barboza wrote: > > > On 11/4/20 2:05 PM, Peter Krempa wrote: > > We didn't use it rigorously and some helpers even cast it away. Remove > > const from all hash utility functions. > > Unrelated question: how much do we care about

Re: [RFC PATCH 2/2] qemu: Add support for max physical address size

2020-11-05 Thread Dario Faggioli
On Wed, 2020-11-04 at 13:14 +, Daniel P. Berrangé wrote: > On Thu, Oct 29, 2020 at 03:55:42PM +, Dario Faggioli wrote: > > This patch maps /domain/cpu/maxphysaddr into -cpu parameters: > > > >   - becomes host-phys-bits=on > >   - becomes phys-bits=42 > > > > Passthrough mode can only

Re: [RFC PATCH 1/2] Add support for specifying max physical address size.

2020-11-05 Thread Dario Faggioli
On Wed, 2020-11-04 at 13:10 +, Daniel P. Berrangé wrote: > > What I think we do want though is for the XML to > report the host CPU's phys bits, so mgmt apps can query this > and use it to decide on a suitable guest limit. > Right. I'll add a patch for this. > We have ABIs for checking

Re: [RFC PATCH 0/2] Handle physical address bits

2020-11-05 Thread Dario Faggioli
On Wed, 2020-11-04 at 13:03 +, Daniel P. Berrangé wrote: > On Thu, Oct 29, 2020 at 03:55:30PM +, Dario Faggioli wrote: > > > > Using current QEMU's default of 40 may limit the amount of RAM the > > guest > > can see (which is the reason why, in our packages, we bump that to > > 42; and >

Re: [RFC PATCH 2/2] qemu: Add support for max physical address size

2020-11-05 Thread Dario Faggioli
On Wed, 2020-11-04 at 18:04 +, Daniel P. Berrangé wrote: > On Wed, Nov 04, 2020 at 07:00:16PM +0100, Dario Faggioli wrote: > > > > > Right. So, host-phys-bits-limit seems to exist because: > > "Some downstream distributions of QEMU set host-phys-bits=on by > > default. [...] Now choosing a

Re: [PATCH 02/10] util: refactor mdev_types method from PCI to mdev

2020-11-05 Thread Boris Fiuczynski
On 11/4/20 6:38 PM, Ján Tomko wrote: On a Friday in 2020, Boris Fiuczynski wrote: Extract virPCIGetMdevTypes from PCI as virMediatedDeviceGetMdevTypes into mdev for later reuse. Signed-off-by: Boris Fiuczynski Reviewed-by: Bjoern Walk --- src/conf/node_device_conf.c |  2 +-

Re: [PATCH v2 08/12] util: hash: Don't use 'const' with virHashTablePtr

2020-11-05 Thread Daniel Henrique Barboza
On 11/4/20 2:05 PM, Peter Krempa wrote: We didn't use it rigorously and some helpers even cast it away. Remove const from all hash utility functions. Unrelated question: how much do we care about standardizing a bit the 'const' usage in the code? I for one had to rely on casting to satisfy

Re: [PATCH v2 06/12] util: hash: Add delete-safe hash iterator

2020-11-05 Thread Daniel Henrique Barboza
On 11/4/20 2:05 PM, Peter Krempa wrote: 'virHashForEach' historically allowed deletion of the current element as 'virHashRemoveSet' didn't exits. To prevent us from having to deepy s/exits/exist Not sure if you meant 'deeply' instead of deepy (apparently deepy is a slang for deep,

[PATCH] domain_conf: make virDomainDiskSetSource() void

2020-11-05 Thread Matt Coleman
The function only returns zero or aborts, so it might as well be void. This has the added benefit of simplifying the code that calls it. Signed-off-by: Matt Coleman --- src/conf/domain_conf.c | 3 +-- src/conf/domain_conf.h | 3 +-- src/libxl/libxl_driver.c | 6 ++ src/libxl/xen_xl.c

Re: [PATCH] virsh-domain: Remove unused virshNodeIsSuperset

2020-11-05 Thread Erik Skultety
On Thu, Nov 05, 2020 at 04:37:46PM +0800, Yi Li wrote: > The function is marked as unused. Remove it from the tree > until a new use case can be found. > > Signed-off-by: Yi Li > --- Reviewed-by: Erik Skultety

[PATCH] virsh-domain: Remove unused virshNodeIsSuperset

2020-11-05 Thread Yi Li
The function is marked as unused. Remove it from the tree until a new use case can be found. Signed-off-by: Yi Li --- tools/virsh-domain.c | 115 --- 1 file changed, 115 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index