[PATCH 4/5] qemu_driver.c: modernize qemuConnectCPUModelComparison()

2020-07-17 Thread Daniel Henrique Barboza
Use g_auto* on pointers to avoid using the 'cleanup' label. In theory the 'ret' variable can also be discarded if the flow of the logic is reworked. Perhaps another time. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_driver.c | 13 + 1 file changed

[PATCH 3/5] qemu_driver.c: modernize qemuConnectCPUModelBaseline()

2020-07-17 Thread Daniel Henrique Barboza
Use g_autoptr() on pointers and remove the unneeded 'cleanup' label. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_driver.c | 28 +++- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driv

[PATCH 0/5] trivial qemuProcessQMPPtr related cleanups

2020-07-17 Thread Daniel Henrique Barboza
Hi, These are some simple cleanups related to the qemuProcessQMPPtr pointer I ended up making while trying to understand how and when qemuProcessQMPFree() is called. Daniel Henrique Barboza (5): qemu_process.h: register AUTOPTR_CLEANUP_FUNC for qemuProcessQMPPtr qemu_process.c: modernize

[PATCH 5/5] qemu_capabilities.c: use g_autoptr() in virQEMUCapsInitQMPSingle()

2020-07-17 Thread Daniel Henrique Barboza
Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_capabilities.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 98ddd2dcdc..1a2cb874c0 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu

[PATCH 2/5] qemu_process.c: modernize qemuProcessQMPNew()

2020-07-17 Thread Daniel Henrique Barboza
Use g_autoptr() and remove the 'cleanup' label. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_process.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 70fc24b993..a11eedda16 100644

Re: [PATCH] qemu: clear residual QMP caps processes during QEMU driver initialization

2020-07-17 Thread Daniel Henrique Barboza
On 7/17/20 8:10 AM, Bihong Yu wrote: From c328ff62b11d58553fd2032a85fd3295e009b3d3 Mon Sep 17 00:00:00 2001 From: Bihong Yu Date: Fri, 17 Jul 2020 16:55:12 +0800 Subject: [PATCH] qemu: clear residual QMP caps processes during QEMU driver initialization In some cases, the QMP capabilities

Re: [libvirt PATCH 0/3] Fix migration with host-passthrough CPU

2020-07-17 Thread Daniel Henrique Barboza
qemu: Properly set //cpu/@migratable default value for running domains Series: Reviewed-by: Daniel Henrique Barboza src/qemu/qemu_domain.c | 8 -- src/qemu/qemu_monitor.c | 18 + src/qemu/qemu_monitor.h | 4 +++ src/qemu/qemu_monitor_json.c | 27

Re: [PATCH] Qemu: migration: Not bind RAM info with active migration status

2020-07-17 Thread Daniel Henrique Barboza
days, so: Reviewed-by: Daniel Henrique Barboza which may contains active status, but without RAM info. Drop this binding relationship check in libvirt. Signed-off-by: Keqian Zhu --- src/qemu/qemu_monitor_json.c | 88 +--- 1 file changed, 42 inse

Re: [PATCH] qemu: Remove superfluous breaks

2020-07-17 Thread Daniel Henrique Barboza
On 7/16/20 11:00 PM, Yi Wang wrote: From: Liao Pingfang Remove superfluous breaks, as there is a "return" before them. Signed-off-by: Liao Pingfang Signed-off-by: Yi Wang --- Reviewed-by: Daniel Henrique Barboza src/qemu/qemu_firmware.c | 1 - src/qemu/qemu_hostdev.c

Re: [PATCH] conf: Remove superfluous breaks

2020-07-17 Thread Daniel Henrique Barboza
On 7/16/20 11:00 PM, Yi Wang wrote: From: Liao Pingfang Remove superfluous breaks, as there is a "return" before them. Signed-off-by: Liao Pingfang Signed-off-by: Yi Wang Reviewed-by: Daniel Henrique Barboza --- src/conf/domain_conf.c | 6 -- src/conf/netw

Re: [PATCH] security: Remove the superfluous break

2020-07-17 Thread Daniel Henrique Barboza
On 7/16/20 11:00 PM, Yi Wang wrote: From: Liao Pingfang Remove the superfuous break, as there is a 'return' before it. Signed-off-by: Liao Pingfang Signed-off-by: Yi Wang --- Reviewed-by: Daniel Henrique Barboza src/security/security_apparmor.c | 1 - 1 file changed,

Re: [PATCH 00/10] resolve hangs/crashes on libvirtd shutdown

2020-07-14 Thread Daniel Henrique Barboza
As far as code goes: Reviewed-by: Daniel Henrique Barboza About the design I have a question about the timeout. Patch 5/10 is setting a 15 second timeout. How did you reach this value? Reading the bug, specially this comment from Daniel: https://bugzilla.redhat.com/show_bug.cgi?id=1828207

Re: [PATCH v1 25/25] docs/kbase: introduce migrationinternals.rst

2020-07-13 Thread Daniel Henrique Barboza
On 7/13/20 11:32 AM, Michal Privoznik wrote: On 7/13/20 3:42 PM, Daniel Henrique Barboza wrote: On 7/13/20 10:20 AM, Michal Privoznik wrote: On 7/13/20 11:49 AM, Daniel Henrique Barboza wrote: This document describes briefly how Libvirt migration internals works, complementing the info

Re: [PATCH v1 25/25] docs/kbase: introduce migrationinternals.rst

2020-07-13 Thread Daniel Henrique Barboza
On 7/13/20 10:20 AM, Michal Privoznik wrote: On 7/13/20 11:49 AM, Daniel Henrique Barboza wrote: This document describes briefly how Libvirt migration internals works, complementing the info available in migration.html.in. Signed-off-by: Daniel Henrique Barboza ---   docs/kbase

[PATCH v1 20/25] qemu_migration.c: use g_auto* in qemuMigrationSrcPerformJob and Peer2Peer

2020-07-13 Thread Daniel Henrique Barboza
Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_migration.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 9fa08617a2..d8f2aeb9f0 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu

[PATCH v1 24/25] qemu_migration.c: modernize qemuMigrationSrcConfirmPhase()

2020-07-13 Thread Daniel Henrique Barboza
Use g_autoptr() and remove both 'error' and 'cleanup' labels. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_migration.c | 17 + 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migratio

[PATCH v1 19/25] qemu_migration.c: use auto* in qemuMigrationSrcRun()

2020-07-13 Thread Daniel Henrique Barboza
Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_migration.c | 19 ++- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 884f1bc4a0..9fa08617a2 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu

[PATCH v1 23/25] libvirt-domain.c: g_autofree in virDomainMigrate() and virDomainMigrate2()

2020-07-13 Thread Daniel Henrique Barboza
Signed-off-by: Daniel Henrique Barboza --- src/libvirt-domain.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index e379623ce4..5b76f1ab66 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -3553,7

[PATCH v1 13/25] qemu_migration.c: use g_auto* in qemuMigrationDstPrepareDirect()

2020-07-13 Thread Daniel Henrique Barboza
Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_migration.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 83a25e7a8f..28081c1b4f 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu

[PATCH v1 04/25] qemu_driver.c: modernize qemuDomainMigrateBegin3Params()

2020-07-13 Thread Daniel Henrique Barboza
Use g_autofree and remove the unneeded 'cleanup' label. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_driver.c | 23 +-- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 8ea4197d00..

[PATCH v1 12/25] qemu_monitor_json.c: modernize qemuMonitorJSONMigrateIncoming()

2020-07-13 Thread Daniel Henrique Barboza
Use g_autoptr() and remove the now obsolete 'cleanup' label. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_monitor_json.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index

[PATCH v1 02/25] libvirt-domain.c: modernize virDomainMigrateVersion1

2020-07-13 Thread Daniel Henrique Barboza
Use g_autofree on strings and remove the 'done' label since it's now unneeded. Signed-off-by: Daniel Henrique Barboza --- src/libvirt-domain.c | 20 +++- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c i

[PATCH v1 05/25] qemu_driver.c: modernize qemuDomainMigratePrepare3()

2020-07-13 Thread Daniel Henrique Barboza
Use g_autoptr() on pointers and remove the unneeded 'cleanup' label. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_driver.c | 30 -- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driv

[PATCH v1 16/25] qemu_migration_cookie.c: modernize qemuMigrationEatCookie()

2020-07-13 Thread Daniel Henrique Barboza
Use g_autoptr() and remove the obsolete 'error' label. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_migration_cookie.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cook

[PATCH v1 25/25] docs/kbase: introduce migrationinternals.rst

2020-07-13 Thread Daniel Henrique Barboza
This document describes briefly how Libvirt migration internals works, complementing the info available in migration.html.in. Signed-off-by: Daniel Henrique Barboza --- docs/kbase/migrationinternals.rst | 174 ++ 1 file changed, 174 insertions(+) create mode 100644

[PATCH v1 00/25] migration code cleanups + kbase document

2020-07-13 Thread Daniel Henrique Barboza
summary of what I've learned. Figured it might be a good complement for migration.html for developers. Daniel Henrique Barboza (25): libvirt-domain.c: modernize virDomainMigrateCheckNotLocal() libvirt-domain.c: modernize virDomainMigrateVersion1 libvirt-domain.c: use g_autofr

[PATCH v1 03/25] libvirt-domain.c: use g_autofree in virDomainMigrateVersion* functions

2020-07-13 Thread Daniel Henrique Barboza
Signed-off-by: Daniel Henrique Barboza --- src/libvirt-domain.c | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 6adb58a9ef..e379623ce4 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c

[PATCH v1 08/25] qemu_migration.c: use g_auto* in qemuMigrationDstPrepareAny()

2020-07-13 Thread Daniel Henrique Barboza
Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_migration.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index e0077d731b..83a25e7a8f 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu

[PATCH v1 10/25] qemu_migration_params.c: modernize qemuMigrationParamsEnableTLS()

2020-07-13 Thread Daniel Henrique Barboza
Use g_autoptr() and remove both 'cleanup' and 'error' labels. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_migration_params.c | 34 +++- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/src/qemu/qemu_migration

[PATCH v1 15/25] qemu_migration.c: modernize qemuMigrationSrcBeginPhase()

2020-07-13 Thread Daniel Henrique Barboza
Use g_autoptr() and remove the 'cleanup' label. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_migration.c | 42 +-- 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migrati

[PATCH v1 11/25] qemu_migration_params.c: use g_autofree in qemuMigrationParamsApply()

2020-07-13 Thread Daniel Henrique Barboza
Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_migration_params.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_params.c index b1518f82c0..aea17b1ac8 100644 --- a/src/qemu/qemu_migration_params.c

[PATCH v1 09/25] qemu_migration_params.c: modernize qemuMigrationParamsFetch()

2020-07-13 Thread Daniel Henrique Barboza
Use g_autoptr() and remove the 'cleanup' label. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_migration_params.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_params.c index

[PATCH v1 21/25] qemu_migration.c: modernize qemuMigrationDstPersist()

2020-07-13 Thread Daniel Henrique Barboza
Use g_autoptr() and remove the 'cleanup' label. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_migration.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index d8f2aeb9f0..c8bb0a6

[PATCH v1 18/25] qemu_migration.c: modernize qemuMigrationSrcPerformNative()

2020-07-13 Thread Daniel Henrique Barboza
Use g_autoptr() and remove the unneeded 'cleanup' label. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_migration.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 58c80533d8..884f1bc

[PATCH v1 22/25] qemu_migration.c: use g_auto* in qemuMigrationDstFinish()

2020-07-13 Thread Daniel Henrique Barboza
Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_migration.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index c8bb0a6060..5d64e9df98 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c

[PATCH v1 14/25] qemu_migration_cookie.h: register AUTOPTR_CLEANUP_FUNC for qemuMigrationCookiePtr

2020-07-13 Thread Daniel Henrique Barboza
Next patch will use g_autoptr() in a qemuMigrationCookiePtr pointer to modernize qemuMigrationSrcBeginPhase(). Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_migration_cookie.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qemu/qemu_migration_cookie.h b/src/qemu

[PATCH v1 01/25] libvirt-domain.c: modernize virDomainMigrateCheckNotLocal()

2020-07-13 Thread Daniel Henrique Barboza
Use g_autoptr() and remove the 'cleanup' label. Signed-off-by: Daniel Henrique Barboza --- src/libvirt-domain.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 9f65cba2e8..0941caa67f 100644 --- a/s

[PATCH v1 17/25] qemu_driver.c: use g_auto* in qemuDomainMigratePerform3* functions

2020-07-13 Thread Daniel Henrique Barboza
Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_driver.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index d133793ee1..d185666ed8 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -12634,7

[PATCH v1 06/25] qemu_driver.c: modernize qemuDomainMigratePrepare3Params()

2020-07-13 Thread Daniel Henrique Barboza
Use variable autocleanup and remove the now obsolete 'cleanup' label. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_driver.c | 43 ++ 1 file changed, 18 insertions(+), 25 deletions(-) diff --git a/src/qemu/qemu_driver.c

[PATCH v1 07/25] qemu_migration.c: modernize qemuMigrationDstPrepare()

2020-07-13 Thread Daniel Henrique Barboza
Use g_autofree and remove the 'cleanup' label. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_migration.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 4ef3245c75..e0077d731b 10

Re: [PATCH v4 0/3] tpm: Fix default choices for CRB and SPAPR dev models

2020-07-08 Thread Daniel Henrique Barboza
th it, either. Stefan Stefan Berger (3): qemu: Move setting of TPM default to post parse function qemu: Set SPAPR TPM default to 2.0 and prevent 1.2 choice qemu: Choose TPM 2 for backend as default for CRB interface All patches: Reviewed-by: Daniel Henrique Barboza src

Re: [PATCH v3 2/2] conf: Set SPAPR TPM default to 2.0 and prevent 1.2 choice

2020-07-08 Thread Daniel Henrique Barboza
--- Does x86 uses TPM 1.2? Seems like something that it's in the code because QEMU supports it, but in the end people uses 2.0 all the time. However, I can't backup this claim and I have no desirable of making x86 people angry, so let's leave it at that. Reviewed-by: Daniel Henrique Barboza

Re: [PATCH v3 1/2] qemu: Move setting of TPM default to post parse function

2020-07-08 Thread Daniel Henrique Barboza
On 7/8/20 11:49 AM, Stefan Berger wrote: From: Stefan Berger Move setting the TPM default version out of the validation function into the post parse function. Signed-off-by: Stefan Berger --- Reviewed-by: Daniel Henrique Barboza

Re: [libvirt PATCH] util: fix accessibility check for hook directory

2020-07-07 Thread Daniel Henrique Barboza
/47 --- Reviewed-by: Daniel Henrique Barboza src/util/virhook.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/util/virhook.c b/src/util/virhook.c index d1ac518c24..119ad1aae6 100644 --- a/src/util/virhook.c +++ b/src/util/virhook.c @@ -172,9 +172,9

Re: [PATCH 0/7] consider available CPUs in vcpupin/emulatorpin output

2020-07-06 Thread Daniel Henrique Barboza
Ping On 6/26/20 7:10 PM, Daniel Henrique Barboza wrote: Hi, This series contains 5 cleanups and refactorings I found on my way to fixing [1]. Last 2 patches contains the actual fix for the bug. [1] https://bugzilla.redhat.com/show_bug.cgi?id=1434276 Daniel Henrique Barboza (7

Re: [PATCH] domain_conf: Replace the name string with 'vcpu' if it is 'vcpus'

2020-07-02 Thread Daniel Henrique Barboza
cpu' to replace 'vcpus'. Signed-off-by: Liao Pingfang --- Reviewed-by: Daniel Henrique Barboza

Re: [libvirt PATCH] util: add access check for hooks to fix running as non-root

2020-07-01 Thread Daniel Henrique Barboza
ge it to make 'syntax-check' happy and add my r-b: Reviewed-by: Daniel Henrique Barboza

[PATCH 1/1] migration.html.in: fix 'Offline migration' description

2020-06-30 Thread Daniel Henrique Barboza
'transfers inactive the definition of a domain' seems odd. Signed-off-by: Daniel Henrique Barboza --- docs/migration.html.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/migration.html.in b/docs/migration.html.in index 355f0e89af..e95ee9de6f 100644

Re: [PATCH 2/2] qemu_capabilities.c: drop 'kvm_pr' support for non-Power8 hosts

2020-06-30 Thread Daniel Henrique Barboza
On 6/30/20 2:35 PM, Andrea Bolognani wrote: On Fri, 2020-06-19 at 18:04 -0300, Daniel Henrique Barboza wrote: +static void +virQEMUCapsSetPPC64KVMState(virQEMUCapsPtr qemuCaps, virArch hostArch) +{ +g_autoptr(virCPUDef) hostCPU = virCPUProbeHost(hostArch); + +/* At this moment, PPC64

Re: [PATCH 1/1] domain_conf.c: skip checking ZPCI address is incomplete if not present

2020-06-30 Thread Daniel Henrique Barboza
This is the kind of situation that, unless you design a test specifically to catch it, most likely will be noticed when someone runs libvirtd. Thanks, DHB Your answer would help me able to identify any incorrect code before sending the patch. Warm Regards Shalini C S On 6/26/20 11:49

Re: [PATCH 1/1] domain_conf.c: skip checking ZPCI address is incomplete if not present

2020-06-29 Thread Daniel Henrique Barboza
On 6/29/20 5:44 AM, Andrea Bolognani wrote: On Sun, 2020-06-28 at 09:25 -0300, Daniel Henrique Barboza wrote: On 6/27/20 10:32 AM, Andrea Bolognani wrote: In the future, please don't include CC tags in your commits: removing them results in extra work when picking up a patch, and it&#

Re: [PATCH 1/1] domain_conf.c: skip checking ZPCI address is incomplete if not present

2020-06-28 Thread Daniel Henrique Barboza
On 6/27/20 10:32 AM, Andrea Bolognani wrote: On Fri, 2020-06-26 at 18:49 -0300, Daniel Henrique Barboza wrote: Commit 076591009ad1 ("conf: fix zPCI address auto-generation on s390") is doing a check for virZPCIDeviceAddressIsIncomplete() prior to checking if the device has a ZPCI

[PATCH 3/7] virsh-domain.c: modernize virshVcpuinfoInactive()

2020-06-26 Thread Daniel Henrique Barboza
Use g_auto* in the string and in the bitmap. Remove the cleanup label since it's now unneeded. Signed-off-by: Daniel Henrique Barboza --- tools/virsh-domain.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-dom

[PATCH 5/7] virhostcpu.c: refactor virHostCPUParseCountLinux()

2020-06-26 Thread Daniel Henrique Barboza
rsing done here and simply return the size of the resulting bitmap from virHostCPUGetPresentBitmap(). Given that no more parsing is being done manually in the function, rename it to virHostCPUCountLinux(). Signed-off-by: Daniel Henrique Barboza --- src/util/virhostcpu.c

[PATCH 6/7] virhostcpu.c: introduce virHostCPUGetAvailableCPUsBitmap()

2020-06-26 Thread Daniel Henrique Barboza
The idea is to have a function that calls virHostCPUGetOnlineBitmap() but, instead of returning NULL if the host does not have CPU offlining capabilities, fall back to a bitmap containing all present CPUs. Next patch will use this helper in two other places. Signed-off-by: Daniel Henrique

[PATCH 1/7] qemu_driver.c: use g_autoptr in qemuDomainGetEmulatorPinInfo()

2020-06-26 Thread Daniel Henrique Barboza
Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_driver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index a5b38b3d24..d486ce5278 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -5427,7 +5427,7

[PATCH 0/7] consider available CPUs in vcpupin/emulatorpin output

2020-06-26 Thread Daniel Henrique Barboza
Hi, This series contains 5 cleanups and refactorings I found on my way to fixing [1]. Last 2 patches contains the actual fix for the bug. [1] https://bugzilla.redhat.com/show_bug.cgi?id=1434276 Daniel Henrique Barboza (7): qemu_driver.c: use g_autoptr in qemuDomainGetEmulatorPinInfo

[PATCH 7/7] conf, qemu: consider available CPUs in vcpupin/emulatorpin output

2020-06-26 Thread Daniel Henrique Barboza
with static vcpu placement, to all available CPUs instead of all possible CPUs. Aside from making it consistent with the behavior of 'vcpuinfo', users will now have one less incentive to try to pin a vcpu in an offline CPU. https://bugzilla.redhat.com/show_bug.cgi?id=1434276 Signed-off-

[PATCH 2/7] virhostcpu.c: use g_autoptr in virHostCPUGetMap()

2020-06-26 Thread Daniel Henrique Barboza
Signed-off-by: Daniel Henrique Barboza --- src/util/virhostcpu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c index 39bbcf8ca8..3023bca831 100644 --- a/src/util/virhostcpu.c +++ b/src/util/virhostcpu.c @@ -1089,7 +1089,7

[PATCH 4/7] virsh-domain.c: modernize cmdVcpuinfo()

2020-06-26 Thread Daniel Henrique Barboza
Use g_auto* pointers to avoid the need for the cleanup label. The type of the pointer 'virDomainPtr dom' was changed to its alias 'virshDomainPtr' to allow the use of g_autoptr(). Signed-off-by: Daniel Henrique Barboza --- tools/virsh-domain.c | 26 +

Re: [PATCH libvirt v2 2/5] conf: fix zPCI address auto-generation on s390

2020-06-26 Thread Daniel Henrique Barboza
Hello, This patch is generating errors when booting Libvirt in a Power 8 host: 2020-06-26 21:35:49.703+: 139213: error : virDomainDeviceInfoFormat:7527 : internal error: Missing uid or fid attribute of zPCI address 2020-06-26 21:35:49.703+: 139213: error : virDomainDeviceInfoFormat:7527

[PATCH 1/1] domain_conf.c: skip checking ZPCI address is incomplete if not present

2020-06-26 Thread Daniel Henrique Barboza
Bolognani Signed-off-by: Daniel Henrique Barboza --- src/conf/domain_conf.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 31ba78b950..33f177b16f 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @

Re: [libvirt PATCH] qemu: ramfb video device doesn't support PCI address

2020-06-24 Thread Daniel Henrique Barboza
ontain PCI addresses. While this is a change in behavior, any existing configurations were non-functional. https://bugzilla.redhat.com/show_bug.cgi?id=1847259 Signed-off-by: Jonathon Jongsma --- Reviewed-by: Daniel Henrique Barboza

Re: [PATCH 13/13] news: Document HMAT addition

2020-06-24 Thread Daniel Henrique Barboza
patch 08/13) as well :) Reviewed-by: Daniel Henrique Barboza * **Bug fixes**

Re: [PATCH 12/13] qemu: Build HMAT command line

2020-06-24 Thread Daniel Henrique Barboza
You can get rid of this second duplicated validation block since this would be already be checked once in qemuValidateDomainDefNuma(). With the validation code moved: Reviewed-by: Daniel Henrique Barboza

Re: [PATCH 11/13] qemu: Introduce QEMU_CAPS_NUMA_HMAT capability

2020-06-24 Thread Daniel Henrique Barboza
On 6/24/20 10:49 AM, Michal Privoznik wrote: This capability tracks whether QEMU is capable of defining HMAT ACPI table for the guest. Signed-off-by: Michal Privoznik --- Reviewed-by: Daniel Henrique Barboza

Re: [PATCH 10/13] numa: expose HMAT APIs

2020-06-24 Thread Daniel Henrique Barboza
On 6/24/20 10:49 AM, Michal Privoznik wrote: These APIs will be used by QEMU driver when building the command line. Signed-off-by: Michal Privoznik --- Reviewed-by: Daniel Henrique Barboza

Re: [PATCH 09/13] conf: Validate NUMA HMAT configuration

2020-06-24 Thread Daniel Henrique Barboza
On 6/24/20 10:49 AM, Michal Privoznik wrote: There are several restrictions, for instance @initiator and @target have to refer to existing NUMA nodes (daa), @cache has to refer to a defined cache level and so on. Signed-off-by: Michal Privoznik --- Reviewed-by: Daniel Henrique Barboza

Re: [PATCH 08/13] conf: Parse and format HMAT

2020-06-24 Thread Daniel Henrique Barboza
ttributes at different levels to unpack at once here. I think you can use a description list () here, like you did below with the element, or any other hierarchical HTML struct for that matter, to make it easier to display all the info you're providing here. + + + The NUMA description has optional latencies element that "The NUMA description has an optional ..." Everything else LGTM and these HTML changes are somewhat cosmetic, so: Reviewed-by: Daniel Henrique Barboza

Re: [PATCH 07/13] Allow NUMA nodes without vCPUs

2020-06-24 Thread Daniel Henrique Barboza
bvirt versions. memory specifies the node memory in kibibytes (i.e. blocks of 1024 bytes). + Since 6.6.0 the cpus attribute s/Since 6.6.0/Since 6.5.0 ? Reviewed-by: Daniel Henrique Barboza

Re: [PATCH 06/13] numa_conf: Make virDomainNumaSetNodeCpumask() return void

2020-06-24 Thread Daniel Henrique Barboza
just allocated by virBitmapParse(). Signed-off-by: Michal Privoznik --- Reviewed-by: Daniel Henrique Barboza

Re: [PATCH 01/13] qemuxml2xmltest: Add "numatune-distance" test case

2020-06-24 Thread Daniel Henrique Barboza
On 6/24/20 5:43 PM, Daniel Henrique Barboza wrote: On 6/24/20 10:48 AM, Michal Privoznik wrote: This test case tests that expanding of NUMA distances work. On This first sentence seems odd. Perhaps change it to "This test case checks that expanding NUMA distance works"

Re: [PATCH 05/13] qemuBuildMachineCommandLine: Drop needless check

2020-06-24 Thread Daniel Henrique Barboza
On 6/24/20 10:49 AM, Michal Privoznik wrote: The machine can not be NULL at this point - qemuDomainDefPostParse() makes sure it isn't. Signed-off-by: Michal Privoznik --- Reviewed-by: Daniel Henrique Barboza

Re: [PATCH 04/13] qemu_command: Rename qemuBuildNumaArgStr()

2020-06-24 Thread Daniel Henrique Barboza
- Reviewed-by: Daniel Henrique Barboza

Re: [PATCH 03/13] numa_conf: Drop CPU from name of two functions

2020-06-24 Thread Daniel Henrique Barboza
aniel Henrique Barboza

Re: [PATCH 02/13] conf: Move and rename virDomainParseScaledValue()

2020-06-24 Thread Daniel Henrique Barboza
x27; infix. Signed-off-by: Michal Privoznik --- Reviewed-by: Daniel Henrique Barboza

Re: [PATCH 01/13] qemuxml2xmltest: Add "numatune-distance" test case

2020-06-24 Thread Daniel Henrique Barboza
On 6/24/20 10:48 AM, Michal Privoznik wrote: This test case tests that expanding of NUMA distances work. On This first sentence seems odd. Perhaps change it to "This test case checks that expanding NUMA distance works" input we accept if only distance from A to B is specified. On the o

Re: [libvirt PATCH v2] qemu: format 'ramfb' attribute for mediated devices

2020-06-23 Thread Daniel Henrique Barboza
l2xml test to verify proper behavior. https://bugzilla.redhat.com/show_bug.cgi?id=1847791 Signed-off-by: Jonathon Jongsma --- Reviewed-by: Daniel Henrique Barboza

[PATCH 1/1] qemu_capabilities.c: modernize virQEMUCapsCacheLookupDefault

2020-06-22 Thread Daniel Henrique Barboza
Use g_autoptr() in qemuCaps to get rid of a virObjectUnref call, a 'cleanup' label and the 'ret' pointer. Signed-off-by: Daniel Henrique Barboza --- Found this while reviewing a patch last week. src/qemu/qemu_capabilities.c | 21 - 1 file changed,

Re: [PATCH v7 00/10] TPM Proxy (H_TPM_COMM) support for PPC64

2020-06-21 Thread Daniel Henrique Barboza
Ping for reviews Also, this series is related to a bug that wasn't available publicly when I posted the patches: https://bugzilla.redhat.com/show_bug.cgi?id=1838975 I believe this info belongs in the commit msg of patch 08/10. Thanks, DHB On 6/10/20 3:11 PM, Daniel Henrique Ba

[PATCH 2/2] qemu_capabilities.c: drop 'kvm_pr' support for non-Power8 hosts

2020-06-19 Thread Daniel Henrique Barboza
ned-off-by: Daniel Henrique Barboza --- src/qemu/qemu_capabilities.c | 38 ++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 484fff99e5..b1c1d4dd70 100644 --- a/src/qemu/qemu_capa

[PATCH 1/2] virt-host-validade-common: move virHostKernelModuleIsLoaded to virkmod

2020-06-19 Thread Daniel Henrique Barboza
This function will be used in a later patch by QEMU code. Rename it to virKModIsLoaded to be compliant with the other helpers. Signed-off-by: Daniel Henrique Barboza --- src/libvirt_private.syms | 1 + src/util/virkmod.c| 34 +++ src/util

[PATCH 0/2] remove kvm_pr PPC64 support for non-Power8 hosts

2020-06-19 Thread Daniel Henrique Barboza
The reasoning is described in the commit message of patch 02. Gitlab tree: https://gitlab.com/danielhb/libvirt/-/tree/kvmpr_cap_v1 Daniel Henrique Barboza (2): virt-host-validade-common: move virHostKernelModuleIsLoaded to virkmod qemu_capabilities.c: drop 'kvm_pr' support for

Re: [libvirt PATCH 23/23] build: add syntax-check rules for undesirable terms

2020-06-19 Thread Daniel Henrique Barboza
Is this patch really necessary? Manually removing the now undesirable terms it's okay (I mean, not quite, but I'm too tired of this same discussion over and over again everywhere, so I give up), because at least it requires a bit of thought and analysis. Prohibiting the words altogether will eli

Re: [PATCH v2 0/4] NUMA CPUs 'auto-fill' for incomplete topologies

2020-06-18 Thread Daniel Henrique Barboza
On 6/18/20 7:34 AM, Michal Privoznik wrote: On 6/17/20 10:08 PM, Daniel Henrique Barboza wrote: On 6/17/20 4:19 PM, Michal Privoznik wrote: On 6/10/20 8:35 PM, Daniel Henrique Barboza wrote: changes in v2: - removed patch 5/5 Gitlab link: https://gitlab.com/danielhb/libvirt/-/tree

[PATCH 1/1] NEWS.rst: document the 'auto-fill' feature

2020-06-18 Thread Daniel Henrique Barboza
Although this can be considered a new feature, from the user standpoint is more of a QoL improvement. Suggested-by: Michal Privoznik Signed-off-by: Daniel Henrique Barboza --- NEWS.rst | 8 1 file changed, 8 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index a16903c7c3..20964b94d7

Re: [PATCH v2 1/4] numa_conf.c: add helper functions for cpumap operations

2020-06-18 Thread Daniel Henrique Barboza
On 6/18/20 7:34 AM, Michal Privoznik wrote: On 6/10/20 8:35 PM, Daniel Henrique Barboza wrote: These helpers will be used in an auto-fill feature for incomplete NUMA topologies in the next patch. Signed-off-by: Daniel Henrique Barboza ---   src/conf/numa_conf.c | 46

Re: [PATCH v2 0/4] NUMA CPUs 'auto-fill' for incomplete topologies

2020-06-17 Thread Daniel Henrique Barboza
On 6/17/20 4:19 PM, Michal Privoznik wrote: On 6/10/20 8:35 PM, Daniel Henrique Barboza wrote: changes in v2: - removed patch 5/5 Gitlab link: https://gitlab.com/danielhb/libvirt/-/tree/vcpus_numa_v2 v1 link: https://www.redhat.com/archives/libvir-list/2020-June/msg00016.html Daniel

Re: [PATCH v2 4/4] formatdomain.html.in: document the NUMA cpus auto fill feature

2020-06-16 Thread Daniel Henrique Barboza
On 6/10/20 3:35 PM, Daniel Henrique Barboza wrote: We're not mentioning that we're replicating QEMU behavior on purpose. First because QEMU will one day, maybe, change the behavior and start to refuse incomplete NUMA setups, and then our documentation is now deprecated. Second, auto f

Re: [PATCH] virsysinfo: Don't leak fw_cfg

2020-06-16 Thread Daniel Henrique Barboza
On 6/16/20 8:38 AM, Michal Privoznik wrote: In v6.4.0-72-g3dda889a44 I've introduced parsing and formatting of new sysinfo type 'fwcfg'. However, I've forgot to introduce code that would free parsed data. Signed-off-by: Michal Privoznik --- Reviewed-by: Daniel Henrique Barboza

Re: [PATCH 1/1] manpages/virsh.rst: clarify numatune memory migration on Linux

2020-06-16 Thread Daniel Henrique Barboza
On 6/16/20 9:09 AM, Andrea Bolognani wrote: On Thu, 2020-06-11 at 14:00 -0300, Daniel Henrique Barboza wrote: On Linux, changing the nodeset on 'numatune' does not imply that the guest memory will be migrated on the spot to the new nodeset. The memory migration is tied on guest us

Re: [PATCH] network: Fix a race condition when shutdown & start vm at the same time

2020-06-15 Thread Daniel Henrique Barboza
etMAC(net->ifname, &mac) < 0 || !virMacAddrCmp(&mac, &net->mac)) Extra space between "||" and "!virMacAddrCmp(.." With these nits fixed: Reviewed-by: Daniel Henrique Barboza +

Re: [PATCH] Fixed missing VM vport when batch start or migration partially failed

2020-06-15 Thread Daniel Henrique Barboza
On 6/12/20 3:18 AM, gong...@smartx.com wrote: From: gongwei start to failed will not remove the openvswitch port, the port recycling in this case lets openvswitch handle it by itself Signed-off-by: gongwei --- Can you please elaborate on the commit message? By the commit title and the co

Re: [libvirt PATCH] qemu: fix missing error reports in capabilities probing

2020-06-15 Thread Daniel Henrique Barboza
ff-by: Daniel P. Berrangé --- Reviewed-by: Daniel Henrique Barboza

[PATCH 1/1] qemuDomainSetNumaParamsLive: set nodeset for root cgroup

2020-06-11 Thread Daniel Henrique Barboza
oot cgroup, aside from the emulator/vcpus/iothread sub-groups, will be split between the old nodeset and the new nodeset, which is not what we want. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_driver.c | 4 1 file changed, 4 insertions(+) diff --git a/src/qemu/qemu_driv

[PATCH 1/1] manpages/virsh.rst: clarify numatune memory migration on Linux

2020-06-11 Thread Daniel Henrique Barboza
evious nodeset to the new one is not viable. There's also parts of the memory that are locked by QEMU in the same place, e.g. when VFIO devices are present. Let's also mention it as another factor that impacts the results the user might expect from NUMA memory migration with numatune. Sig

Does 'numad' interacts with memory_migration with 'numatune'?

2020-06-11 Thread Daniel Henrique Barboza
Hi, While investigating a 'virsh numatune' behavior in Power 9 guests I came across this doubt and couldn't find a direct answer. numad role, as far as [1] goes, is automatic NUMA affinity only. As far as Libvirt and my understanding goes , numad is used for placement='auto' setups, which aren't

[PATCH v2 4/4] formatdomain.html.in: document the NUMA cpus auto fill feature

2020-06-10 Thread Daniel Henrique Barboza
ss of QEMU changes in the future. The idea is to encourage the user to provide a complete NUMA CPU topology, not relying on the CPU auto fill mechanic. Signed-off-by: Daniel Henrique Barboza --- docs/formatdomain.html.in | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --

[PATCH v2 0/4] NUMA CPUs 'auto-fill' for incomplete topologies

2020-06-10 Thread Daniel Henrique Barboza
changes in v2: - removed patch 5/5 Gitlab link: https://gitlab.com/danielhb/libvirt/-/tree/vcpus_numa_v2 v1 link: https://www.redhat.com/archives/libvir-list/2020-June/msg00016.html Daniel Henrique Barboza (4): numa_conf.c: add helper functions for cpumap operations qemu_domain.c: NUMA

[PATCH v2 3/4] qemuxml2xmltest.c: add NUMA vcpus auto fill tests

2020-06-10 Thread Daniel Henrique Barboza
Add a unit test to verify the NUMA vcpus autocomplete implemented in the previous patch. Signed-off-by: Daniel Henrique Barboza --- .../numavcpus-topology-mismatch.xml | 37 ++ ...avcpus-topology-mismatch.x86_64-latest.xml | 38 +++ tests

<    3   4   5   6   7   8   9   10   11   12   >