Re: [libvirt] [PATCH 1/1] qemu: hide details of fake reboot

2019-12-18 Thread Nikolay Shirokovskiy
On 19.12.2019 04:30, Cole Robinson wrote: > On 10/30/19 4:09 AM, Nikolay Shirokovskiy wrote: >> If we use fake reboot then domain goes thru running->shutdown->running >> state changes with shutdown state only for short period of time. At >> least this is implementation details leaking into

Re: [libvirt] [PATCH 1/1] qemu: hide details of fake reboot

2019-12-18 Thread Cole Robinson
On 10/30/19 4:09 AM, Nikolay Shirokovskiy wrote: > If we use fake reboot then domain goes thru running->shutdown->running > state changes with shutdown state only for short period of time. At > least this is implementation details leaking into API. And also there is > one real case when this is

Re: [libvirt] [PATCH 2/2] qemu_firmware: Try to autofill for old style UEFI specification

2019-12-18 Thread Cole Robinson
On 12/17/19 12:25 PM, Michal Privoznik wrote: > While we discourage people to use the old style of specifying > UEFI for their domains (the old style is putting path to the FW > image under /domain/os/loader/ whilst the new one is using > /domain/os/@firmware), some applications might have not

Re: [libvirt] [PATCH 1/2] qemu_firmware: Pass virDomainDef into qemuFirmwareFillDomain()

2019-12-18 Thread Cole Robinson
On 12/17/19 12:25 PM, Michal Privoznik wrote: > This function needs domain definition really, we don't need to > pass the whole domain object. This saves couple of dereferences > and characters esp. in more checks to come. > > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_firmware.c |

Re: [libvirt] [PATCH] remote_daemon: Log host boot time

2019-12-18 Thread Cole Robinson
On 12/17/19 8:25 AM, Michal Privoznik wrote: > This is not strictly needed, but it makes sure we initialize the > @bootTime global variable. Thing is, in order to validate XATTRs > and prune those set in some previous runs of the host, a > timestamp is recorded in XATTRs. The host boot time was

Re: [libvirt] [PATCH 0/2] Remove VIR_FILE_*_SEPARATOR_*

2019-12-18 Thread Cole Robinson
On 12/18/19 3:17 PM, Fabiano Fidêncio wrote: > Let's use the defines provided by GLib, instead of keeping our own. > > Fabiano Fidêncio (2): > util: Use G_DIR_SEPARATOR instead of VIR_FILE_DIR_SEPARATOR > util: Remove VIR_FILE_*_SEPARATOR* > > src/util/virfile.c | 2 +- >

Re: [libvirt] [PATCH 0/3] Remove unused virFile*() functions

2019-12-18 Thread Cole Robinson
On 12/18/19 2:59 PM, Fabiano Fidêncio wrote: > - virFileSkipRoot() is no longer used since faf2d811f3e9a4; > - virFileIsAbsPath() is no longer used since faf2d811f3e9a4; > - VIR_FILE_IS_DIR_SEPARATOR is no longer used since virFileIsAbsPath has > been dropped; > > Fabiano Fidêncio (3): >

Re: [libvirt] [PATCH 0/3] Remove unused virFile*() functions

2019-12-18 Thread Daniel Henrique Barboza
On 12/18/19 4:59 PM, Fabiano Fidêncio wrote: - virFileSkipRoot() is no longer used since faf2d811f3e9a4; - virFileIsAbsPath() is no longer used since faf2d811f3e9a4; - VIR_FILE_IS_DIR_SEPARATOR is no longer used since virFileIsAbsPath has been dropped; Fabiano Fidêncio (3): util: Remove

[libvirt] [PATCH 0/2] Remove VIR_FILE_*_SEPARATOR_*

2019-12-18 Thread Fabiano Fidêncio
Let's use the defines provided by GLib, instead of keeping our own. Fabiano Fidêncio (2): util: Use G_DIR_SEPARATOR instead of VIR_FILE_DIR_SEPARATOR util: Remove VIR_FILE_*_SEPARATOR* src/util/virfile.c | 2 +- src/util/virfile.h | 19 --- 2 files changed, 1 insertion(+),

[libvirt] [PATCH 2/2] util: Remove VIR_FILE_*_SEPARATOR*

2019-12-18 Thread Fabiano Fidêncio
None of those are used and we should prefer using the ones provided by GLib, as G_DIR_SEPARATOR, G_DIR_SEPARATOR_S, G_SEARCHPATH_SEPARATOR, and G_SEARCHPATH_SEPARATOR_S. Signed-off-by: Fabiano Fidêncio --- src/util/virfile.h | 19 --- 1 file changed, 19 deletions(-) diff --git

[libvirt] [PATCH 1/2] util: Use G_DIR_SEPARATOR instead of VIR_FILE_DIR_SEPARATOR

2019-12-18 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- src/util/virfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virfile.c b/src/util/virfile.c index b72d18b3d2..0f0d607c59 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -3278,7 +3278,7 @@

[libvirt] [PATCH 3/3] util: Remove VIR_FILE_IS_DIR_SEPARATOR

2019-12-18 Thread Fabiano Fidêncio
The define is not used since virFileIsAbsPath() has been dropped. Signed-off-by: Fabiano Fidêncio --- src/util/virfile.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/util/virfile.h b/src/util/virfile.h index 550d06ce94..3fd1795813 100644 --- a/src/util/virfile.h +++

[libvirt] [PATCH 0/3] Remove unused virFile*() functions

2019-12-18 Thread Fabiano Fidêncio
- virFileSkipRoot() is no longer used since faf2d811f3e9a4; - virFileIsAbsPath() is no longer used since faf2d811f3e9a4; - VIR_FILE_IS_DIR_SEPARATOR is no longer used since virFileIsAbsPath has been dropped; Fabiano Fidêncio (3): util: Remove virFileSkipRoot() util: Remove

[libvirt] [PATCH 2/3] util: Remove virFileIsAbsPath()

2019-12-18 Thread Fabiano Fidêncio
The function is no longer used since commit faf2d811f3e9a4. Signed-off-by: Fabiano Fidêncio --- src/libvirt_private.syms | 1 - src/util/virfile.c | 19 --- src/util/virfile.h | 1 - 3 files changed, 21 deletions(-) diff --git a/src/libvirt_private.syms

[libvirt] [PATCH 1/3] util: Remove virFileSkipRoot()

2019-12-18 Thread Fabiano Fidêncio
The function is no longer used since commit faf2d811f3e9a4. Signed-off-by: Fabiano Fidêncio --- src/libvirt_private.syms | 1 - src/util/virfile.c | 54 src/util/virfile.h | 1 - 3 files changed, 56 deletions(-) diff --git

Re: [libvirt] [PATCH] docs: Only distribute sanlock manpage if WITH_SANLOCK

2019-12-18 Thread Fabiano Fidêncio
On Wed, Dec 18, 2019 at 8:48 PM Cole Robinson wrote: > > This fixes mingw-libvirt RPM build > > Signed-off-by: Cole Robinson > --- > docs/Makefile.am | 9 ++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/docs/Makefile.am b/docs/Makefile.am > index

Re: [libvirt] [PATCH] Remove phyp driver

2019-12-18 Thread Michal Prívozník
[I'm CCing Eduardo, who worked a lot on this driver in the past. Maybe he knows if this hypervisor is still alive.] On 12/18/19 4:43 PM, Cole Robinson wrote: > The phyp driver was added in 2009 and does not appear to have had any > real feature change since 2011. There's virtually no evidence

[libvirt] [PATCH] docs: Only distribute sanlock manpage if WITH_SANLOCK

2019-12-18 Thread Cole Robinson
This fixes mingw-libvirt RPM build Signed-off-by: Cole Robinson --- docs/Makefile.am | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index eb8de80b9c..66f164a1ac 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -214,9

Re: [libvirt] [PATCH] util: Simplify Windows version of virGetUserDirectoryByUID()

2019-12-18 Thread Cole Robinson
On 12/18/19 12:53 PM, Fabiano Fidêncio wrote: > Let's just use the plain g_get_home_dir(), from GLib, instead of > maintaining a code adapted from the GLib's one. > > Signed-off-by: Fabiano Fidêncio > --- > src/util/virutil.c | 92 +- > 1 file

Re: [libvirt] [PATCH v6 0/4] PCI hostdev partial assignment support

2019-12-18 Thread Cole Robinson
On 12/17/19 3:35 PM, Daniel Henrique Barboza wrote: > changes from previous version 5 [1]: > - changes in the commit message of patch 1 and the > documentation included in patches 3 and 4, all of them > suggested/hinted by Alex Williamson. > > > Daniel Henrique Barboza (4): > Introducing new

Re: [libvirt] [PATCH v2 3/4] qemu: move qemuBuildSmartcardCommandLine validation to qemu_domain.c

2019-12-18 Thread Cole Robinson
On 12/17/19 7:36 PM, Daniel Henrique Barboza wrote: > Move smartcard validation being done by qemuBuildSmartcardCommandLine() > to the existing qemuDomainSmartcardDefValidate() function. This > function is called by qemuDomainDeviceDefValidate(), allowing smartcard > validation in domain define

[libvirt] [PATCH] util: Simplify Windows version of virGetUserDirectoryByUID()

2019-12-18 Thread Fabiano Fidêncio
Let's just use the plain g_get_home_dir(), from GLib, instead of maintaining a code adapted from the GLib's one. Signed-off-by: Fabiano Fidêncio --- src/util/virutil.c | 92 +- 1 file changed, 1 insertion(+), 91 deletions(-) diff --git

Re: [libvirt] [PATCH v4 0/4] Rewrite virGetUser*Directory() functions using g_get_*_dir()

2019-12-18 Thread Cole Robinson
On 12/18/19 11:26 AM, Fabiano Fidêncio wrote: > By rewriting virGetUser*Directory() functions using g_get_*_dir() > functions allows us to drop all the different implementations we > keep, as GLib already takes care of those for us. > > Changes since v3: >

Re: [libvirt] [PATCH v2 1/4] util: Rewrite virGetUserDirectory() using g_get_home_dir()

2019-12-18 Thread Cole Robinson
On 12/18/19 11:12 AM, Fabiano Fidêncio wrote: > On Wed, Dec 18, 2019 at 5:08 PM Daniel P. Berrangé > wrote: >> >> On Wed, Dec 18, 2019 at 10:53:41AM -0500, Cole Robinson wrote: >>> On 12/18/19 5:34 AM, Fabiano Fidêncio wrote: On Wed, Dec 18, 2019 at 11:19 AM Marc Hartmayer wrote:

[libvirt] [PATCH v4 2/4] util: Rewrite virGetUserConfigDirectory() using g_get_user_config_dir()

2019-12-18 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- src/util/virutil.c | 39 ++- 1 file changed, 10 insertions(+), 29 deletions(-) diff --git a/src/util/virutil.c b/src/util/virutil.c index 7008c3119c..9d98b0051a 100644 --- a/src/util/virutil.c +++ b/src/util/virutil.c @@

[libvirt] [PATCH v4 3/4] util: Rewrite virGetUserCacheDirectory() using g_get_user_cache_dir()

2019-12-18 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- src/util/virutil.c | 57 -- 1 file changed, 10 insertions(+), 47 deletions(-) diff --git a/src/util/virutil.c b/src/util/virutil.c index 9d98b0051a..db9378fa57 100644 --- a/src/util/virutil.c +++

[libvirt] [PATCH v4 4/4] util: Rewrite virGetUserRuntimeDirectory() using g_get_user_runtime_dir()

2019-12-18 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- src/util/virutil.c | 39 ++- 1 file changed, 10 insertions(+), 29 deletions(-) diff --git a/src/util/virutil.c b/src/util/virutil.c index db9378fa57..a28feb3daa 100644 --- a/src/util/virutil.c +++ b/src/util/virutil.c @@

[libvirt] [PATCH v4 0/4] Rewrite virGetUser*Directory() functions using g_get_*_dir()

2019-12-18 Thread Fabiano Fidêncio
By rewriting virGetUser*Directory() functions using g_get_*_dir() functions allows us to drop all the different implementations we keep, as GLib already takes care of those for us. Changes since v3: https://www.redhat.com/archives/libvir-list/2019-December/msg01123.html - Used g_build_filename()

[libvirt] [PATCH v4 1/4] util: Rewrite virGetUserDirectory() using g_get_home_dir()

2019-12-18 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- src/util/virutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virutil.c b/src/util/virutil.c index ed1f696e37..7008c3119c 100644 --- a/src/util/virutil.c +++ b/src/util/virutil.c @@ -582,7 +582,7 @@ virGetHostnameQuiet(void)

Re: [libvirt] [PATCH v2 1/4] util: Rewrite virGetUserDirectory() using g_get_home_dir()

2019-12-18 Thread Fabiano Fidêncio
On Wed, Dec 18, 2019 at 5:08 PM Daniel P. Berrangé wrote: > > On Wed, Dec 18, 2019 at 10:53:41AM -0500, Cole Robinson wrote: > > On 12/18/19 5:34 AM, Fabiano Fidêncio wrote: > > > On Wed, Dec 18, 2019 at 11:19 AM Marc Hartmayer > > > wrote: > > >> > > >> On Tue, Dec 17, 2019 at 05:41 PM +0100,

Re: [libvirt] [PATCH] Remove phyp driver

2019-12-18 Thread Cole Robinson
On 12/18/19 11:04 AM, Daniel Henrique Barboza wrote: > > > On 12/18/19 12:43 PM, Cole Robinson wrote: >> The phyp driver was added in 2009 and does not appear to have had any >> real feature change since 2011. There's virtually no evidence online >> of users actually using it. IMO it's time to

Re: [libvirt] [PATCH] Remove phyp driver

2019-12-18 Thread Daniel Henrique Barboza
On 12/18/19 12:43 PM, Cole Robinson wrote: The phyp driver was added in 2009 and does not appear to have had any real feature change since 2011. There's virtually no evidence online of users actually using it. IMO it's time to kill it. Signed-off-by: Cole Robinson I understand that this

Re: [libvirt] [PATCH v2 1/4] util: Rewrite virGetUserDirectory() using g_get_home_dir()

2019-12-18 Thread Daniel P . Berrangé
On Wed, Dec 18, 2019 at 10:53:41AM -0500, Cole Robinson wrote: > On 12/18/19 5:34 AM, Fabiano Fidêncio wrote: > > On Wed, Dec 18, 2019 at 11:19 AM Marc Hartmayer > > wrote: > >> > >> On Tue, Dec 17, 2019 at 05:41 PM +0100, Fabiano Fidêncio > >> wrote: > >>> Signed-off-by: Fabiano Fidêncio >

Re: [libvirt] [PATCH v2 1/4] util: Rewrite virGetUserDirectory() using g_get_home_dir()

2019-12-18 Thread Cole Robinson
On 12/18/19 5:34 AM, Fabiano Fidêncio wrote: > On Wed, Dec 18, 2019 at 11:19 AM Marc Hartmayer > wrote: >> >> On Tue, Dec 17, 2019 at 05:41 PM +0100, Fabiano Fidêncio >> wrote: >>> Signed-off-by: Fabiano Fidêncio >>> --- >>> src/util/virutil.c | 2 +- >>> 1 file changed, 1 insertion(+), 1

Re: [libvirt] [PATCH] Remove phyp driver

2019-12-18 Thread Cole Robinson
On 12/18/19 10:43 AM, Cole Robinson wrote: > The phyp driver was added in 2009 and does not appear to have had any > real feature change since 2011. There's virtually no evidence online > of users actually using it. IMO it's time to kill it. > > Signed-off-by: Cole Robinson > --- > I raised this

[libvirt] [PATCH] Remove phyp driver

2019-12-18 Thread Cole Robinson
The phyp driver was added in 2009 and does not appear to have had any real feature change since 2011. There's virtually no evidence online of users actually using it. IMO it's time to kill it. Signed-off-by: Cole Robinson --- I raised this in 3.5 years ago:

Re: [libvirt] [PATCH v3 1/1] qemu_command: tidy up qemuBuildHostdevCommandLine loop

2019-12-18 Thread Michal Prívozník
On 12/18/19 10:28 AM, Daniel Henrique Barboza wrote: > The current 'for' loop with 5 consecutive 'ifs' inside > qemuBuildHostdevCommandLine can be a bit smarter: > > - all 5 'ifs' fails if hostdev->mode is not equal to > VIR_DOMAIN_HOSTDEV_MODE_SUBSYS. This check can be moved to the > start of

Re: [libvirt] [PATCH] qemu: store the emulator name in the capabilities XML

2019-12-18 Thread Daniel P . Berrangé
On Wed, Dec 18, 2019 at 03:41:15PM +0100, Michal Prívozník wrote: > On 12/18/19 3:03 PM, Daniel P. Berrangé wrote: > > We don't need this for any functional purpose, but when debugging hosts > > it is useful to know what binary a given capabilities XML document is > > associated with. > > > >

Re: [libvirt] [PATCH] qemu: store the emulator name in the capabilities XML

2019-12-18 Thread Daniel Henrique Barboza
On 12/18/19 11:03 AM, Daniel P. Berrangé wrote: We don't need this for any functional purpose, but when debugging hosts it is useful to know what binary a given capabilities XML document is associated with. Signed-off-by: Daniel P. Berrangé --- src/qemu/qemu_capabilities.c | 15

Re: [libvirt] [PATCH] qemu: store the emulator name in the capabilities XML

2019-12-18 Thread Michal Prívozník
On 12/18/19 3:03 PM, Daniel P. Berrangé wrote: > We don't need this for any functional purpose, but when debugging hosts > it is useful to know what binary a given capabilities XML document is > associated with. > > Signed-off-by: Daniel P. Berrangé > --- > src/qemu/qemu_capabilities.c | 15

Re: [libvirt] [PATCH] conf: fix populating of fake NUMA in multi-node hosts

2019-12-18 Thread Michal Prívozník
On 12/18/19 12:58 PM, Daniel P. Berrangé wrote: > If the host OS doesn't have NUMA present, we fallback to > populating fake NUMA info and the code thus assumes only a > single NUMA node. > > Unfortunately we also fallback to fake NUMA if numactl-devel > was not present, and in this case we can

[libvirt] [PATCH] qemu: store the emulator name in the capabilities XML

2019-12-18 Thread Daniel P . Berrangé
We don't need this for any functional purpose, but when debugging hosts it is useful to know what binary a given capabilities XML document is associated with. Signed-off-by: Daniel P. Berrangé --- src/qemu/qemu_capabilities.c | 15 +++ 1 file changed, 15 insertions(+) diff --git

Re: [libvirt] [EXTERNAL]Re: [PATCH-for-4.2] hw/mips: Deprecate the r4k machine

2019-12-18 Thread Aleksandar Markovic
From: Thomas Huth Sent: Tuesday, December 17, 2019 7:10 PM To: Philippe Mathieu-Daudé; qemu-de...@nongnu.org Cc: libvir-list@redhat.com; Hervé Poussineau; Aleksandar Markovic; Aleksandar Rikalo; Aurelien Jarno Subject: [EXTERNAL]Re: [PATCH-for-4.2]

Re: [libvirt] [PATCH 0/5] Various memleak fixes

2019-12-18 Thread Daniel Henrique Barboza
On 12/18/19 5:37 AM, Michal Privoznik wrote: *** BLURB HERE *** Michal Prívozník (5): domaincapstest: Don't leak cpu definitions testutilsxen: Avoid double free of driver caps virCapabilitiesHostNUMAUnref: Accept NULL qemu: Reoder cleanup in qemuStateCleanup() qemu: Don't leak

Re: [libvirt] [PATCH 4/5] qemu: Reoder cleanup in qemuStateCleanup()

2019-12-18 Thread Daniel Henrique Barboza
Commit title has a typo: "Reoder" instead of "Reorder" On 12/18/19 5:37 AM, Michal Privoznik wrote: This function is supposed to clean up virQEMUDriver structure and free individual members. However, it's doing that in random order which makes it hard to track which members are being freed and

Re: [libvirt] [PATCH 3/5] virCapabilitiesHostNUMAUnref: Accept NULL

2019-12-18 Thread Daniel Henrique Barboza
On 12/18/19 5:37 AM, Michal Privoznik wrote: Fortunately, this is not causing any problems now because glib does this check for us when calling this function via attribute cleanup. But in future commit we will explicitly call this nit: "But in a future commit ..." -- libvir-list mailing

Re: [libvirt] [PATCH] conf: avoid mem leak re-allocating fake NUMA capabilities

2019-12-18 Thread Daniel Henrique Barboza
On 12/18/19 8:57 AM, Daniel P. Berrangé wrote: The 'caps' object is already allocated when the fake NUMA initialization takes place. Signed-off-by: Daniel P. Berrangé --- Reviewed-by: Daniel Henrique Barboza -- libvir-list mailing list libvir-list@redhat.com

[libvirt] [PATCH] conf: fix populating of fake NUMA in multi-node hosts

2019-12-18 Thread Daniel P . Berrangé
If the host OS doesn't have NUMA present, we fallback to populating fake NUMA info and the code thus assumes only a single NUMA node. Unfortunately we also fallback to fake NUMA if numactl-devel was not present, and in this case we can still have multiple NUMA nodes. In this case we create all

[libvirt] [PATCH] conf: avoid mem leak re-allocating fake NUMA capabilities

2019-12-18 Thread Daniel P . Berrangé
The 'caps' object is already allocated when the fake NUMA initialization takes place. Signed-off-by: Daniel P. Berrangé --- src/conf/capabilities.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/conf/capabilities.c b/src/conf/capabilities.c index 4fac59e6f7..81a2004dba 100644 ---

Re: [libvirt] [PATCH 2/3] qemu: use g_autofree instead of VIR_FREE in qemuMonitorTextCreateSnapshot()

2019-12-18 Thread Pavel Mores
On Tue, Dec 17, 2019 at 10:55:24AM -0500, Cole Robinson wrote: > On 12/6/19 4:11 AM, Pavel Mores wrote: > > While at bugfixing, convert the whole function to the new-style memory > > allocation handling. > > > > Signed-off-by: Pavel Mores > > --- > > src/qemu/qemu_monitor_text.c | 18

Re: [libvirt] [PATCH v2 1/4] util: Rewrite virGetUserDirectory() using g_get_home_dir()

2019-12-18 Thread Fabiano Fidêncio
On Wed, Dec 18, 2019 at 11:19 AM Marc Hartmayer wrote: > > On Tue, Dec 17, 2019 at 05:41 PM +0100, Fabiano Fidêncio > wrote: > > Signed-off-by: Fabiano Fidêncio > > --- > > src/util/virutil.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/src/util/virutil.c

Re: [libvirt] [PATCH v2 1/4] util: Rewrite virGetUserDirectory() using g_get_home_dir()

2019-12-18 Thread Marc Hartmayer
On Tue, Dec 17, 2019 at 05:41 PM +0100, Fabiano Fidêncio wrote: > Signed-off-by: Fabiano Fidêncio > --- > src/util/virutil.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/util/virutil.c b/src/util/virutil.c > index ed1f696e37..8c255abd7f 100644 > ---

Re: [libvirt] [PATCH 0/3] Some coverity adjustments

2019-12-18 Thread Michal Prívozník
On 12/17/19 9:30 PM, John Ferlan wrote: > I upgraded to f31 and it resulted in an essentially hosed Coverity > build/analysis environment with the following message during cov-emit > processing (a preprocessing of sorts): > > "/usr/include/glib-2.0/glib/gspawn.h", line 76: error #67: expected a

[libvirt] [PATCH v3 0/1] qemu_command: tidy up qemuBuildHostdevCommandLine loop

2019-12-18 Thread Daniel Henrique Barboza
This fella got buried a few months ago. Re-sending as a v3 due to rebase changes. changes from previous version [1]: - rebased to master at 6c17606b7c [1] https://www.redhat.com/archives/libvir-list/2019-October/msg00457.html Daniel Henrique Barboza (1): qemu_command: tidy up

[libvirt] [PATCH v3 1/1] qemu_command: tidy up qemuBuildHostdevCommandLine loop

2019-12-18 Thread Daniel Henrique Barboza
The current 'for' loop with 5 consecutive 'ifs' inside qemuBuildHostdevCommandLine can be a bit smarter: - all 5 'ifs' fails if hostdev->mode is not equal to VIR_DOMAIN_HOSTDEV_MODE_SUBSYS. This check can be moved to the start of the loop, failing to the next element immediately in case it fails;

[libvirt] [libvirt-tck PATCH v2] Add cases for nvram

2019-12-18 Thread dzheng
From: Dan Zheng This is to add the tests for below flags: - Sys::Virt::Domain::UNDEFINE_KEEP_NVRAM - Sys::Virt::Domain::UNDEFINE_NVRAM v1: https://www.redhat.com/archives/libvir-list/2019-December/msg00932.html Signed-off-by: Dan Zheng --- scripts/domain/401-ovmf-nvram.t | 144

[libvirt] [PATCH] test: qemucaps: Refresh x86_64 caps probe data for the qemu-4.2 release

2019-12-18 Thread Peter Krempa
Signed-off-by: Peter Krempa --- Pushed as trivial. tests/qemucapabilitiesdata/caps_4.2.0.x86_64.replies | 10 +- tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git

[libvirt] [PATCH 1/5] domaincapstest: Don't leak cpu definitions

2019-12-18 Thread Michal Privoznik
When generating domain capabilities, we need to fake host CPU to get reproducible result. We do this by copying a pre-existent CPU config and setting VIR_TEST_MOCK_FAKE_HOST_CPU env variable which is then consumed by qemucpumock. However, we forget to free the CPU copy afterwards. 2,196 (2,016

[libvirt] [PATCH 5/5] qemu: Don't leak hostcpu or hostnuma on driver cleanup

2019-12-18 Thread Michal Privoznik
When freeing qemu driver struct members, we forgot to free @hostcpu and @hostnuma members. Signed-off-by: Michal Privoznik --- src/qemu/qemu_driver.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 0b9e31b344..ec8faf384c 100644 ---

[libvirt] [PATCH 0/5] Various memleak fixes

2019-12-18 Thread Michal Privoznik
*** BLURB HERE *** Michal Prívozník (5): domaincapstest: Don't leak cpu definitions testutilsxen: Avoid double free of driver caps virCapabilitiesHostNUMAUnref: Accept NULL qemu: Reoder cleanup in qemuStateCleanup() qemu: Don't leak hostcpu or hostnuma on driver cleanup

[libvirt] [PATCH 2/5] testutilsxen: Avoid double free of driver caps

2019-12-18 Thread Michal Privoznik
In testXLInitDriver() a dummy driver structure is filled and it is freed later in testXLFreeDriver(). However, it is sufficient to unref just driver->config because that results in libxlDriverConfigDispose() being called which unrefs driver->config->caps. There is no need to unref it again in

[libvirt] [PATCH 4/5] qemu: Reoder cleanup in qemuStateCleanup()

2019-12-18 Thread Michal Privoznik
This function is supposed to clean up virQEMUDriver structure and free individual members. However, it's doing that in random order which makes it hard to track which members are being freed and which are not. Do the free in reverse order than the structure definition - assuming that the most

[libvirt] [PATCH 3/5] virCapabilitiesHostNUMAUnref: Accept NULL

2019-12-18 Thread Michal Privoznik
Fortunately, this is not causing any problems now because glib does this check for us when calling this function via attribute cleanup. But in future commit we will explicitly call this function over a struct member that might be NULL. Signed-off-by: Michal Privoznik --- src/conf/capabilities.c