Re: RFC: deprecating/obsoleting netcf package and libvirt virInterface*() APIs

2020-12-02 Thread Michal Privoznik
On 12/2/20 8:47 PM, Laine Stump wrote: So, that's my piece to speak. I'm looking for opinions and ideas on a few different fronts: 1) Does this generally sound like a good direction? Or is there something I'm ignoring that renders my points moot? Yes, it sounds good. A few years back I

Re: [PATCH libvirt v3 01/11] nodedev: detect AP card device

2020-12-02 Thread Erik Skultety
On Wed, Dec 02, 2020 at 05:04:29PM +0100, Shalini Chellathurai Saroja wrote: > Hello Erik, > > I will make changes based on your comments in here and patch 03. Thank you > very much for the review. I also responded to one of the patches in the v2 series, so it'd be cool if you could respond

[PATCH 2/2] security: Avoid calling virSecurityManagerCheckModel with NULL model

2020-12-02 Thread Jim Fehlig
Attempting to create a domain with results in virsh --connect lxc:/// create distro_nosec.xml error: Failed to create domain from distro_nosec.xml error: unsupported configuration: Security driver model '(null)' is not available With , the model field of virSecurityLabelDef will be NULL,

[PATCH 0/2] security: A couple of fixes

2020-12-02 Thread Jim Fehlig
I finally got around to investigating some apparmor-related test failures. The first patch is apparmor specific. The second patch fixes a bug that should affect all security drivers. Jim Fehlig (2): apparmor: Allow lxc processes to receive signals from libvirt security: Avoid calling

[PATCH 1/2] apparmor: Allow lxc processes to receive signals from libvirt

2020-12-02 Thread Jim Fehlig
LXC processes confined by apparmor are not permitted to receive signals from libvirtd. Attempting to destroy such a process fails virsh --connect lxc:/// destroy distro_apparmor error: Failed to destroy domain distro_apparmor error: Failed to kill process 29491: Permission denied And from

Re: [PATCH 00/18] qapi/qom: QAPIfy object-add

2020-12-02 Thread Gerd Hoffmann
Hi, > It would be much nicer to do the wrapper the other way round, i.e. > setting properties before the device is realized would update a > configuration struct and realize would then call .create() with that > struct. To me, this sounds much harder, though also a more useful state. Well, in

RE: [PATCH] qemu_conf: Fix double free problem for cfg->firmwares

2020-12-02 Thread Tuguoyi
> -Original Message- > From: Michal Privoznik [mailto:mpriv...@redhat.com] > Sent: Tuesday, December 01, 2020 9:28 PM > To: tuguoyi (Cloud) ; Ján Tomko > Cc: libvir-list@redhat.com > Subject: Re: [PATCH] qemu_conf: Fix double free problem for cfg->firmwares > > On 12/1/20 2:50 AM,

Re: [PATCH 00/18] qapi/qom: QAPIfy object-add

2020-12-02 Thread Eduardo Habkost
On Wed, Dec 02, 2020 at 06:35:06PM +0100, Kevin Wolf wrote: > Am 02.12.2020 um 17:05 hat Eduardo Habkost geschrieben: > > > > Looks nice as end goal. Then, these are a few questions I would > > > > have about the transition plan: > > > > > > > > Would it require changing both device

RFC: deprecating/obsoleting netcf package and libvirt virInterface*() APIs

2020-12-02 Thread Laine Stump
netcf (the backend of libvirt's virInterface*() APIs) hasn't been modified in over 2 years, and the last time there was a change significant enough for an upstream release was in 2015 (!). It has never been possible to reliably translate back and forth between native and netcf/libvirt XML

[libvirt PATCH] conf: Fix segfault when parsing mdev types

2020-12-02 Thread Jonathon Jongsma
Commit f1b0890 introduced a potential crash due to incorrect operator precedence when accessing an element from a pointer to an array. Backtrace below: #0 virNodeDeviceGetMdevTypesCaps (sysfspath=0x7fff801661e0 "/sys/devices/pci:00/:00:02.0", mdev_types=0x7fff801c9b40,

Re: [PATCH 00/18] qapi/qom: QAPIfy object-add

2020-12-02 Thread Kevin Wolf
Am 02.12.2020 um 17:05 hat Eduardo Habkost geschrieben: > > > Looks nice as end goal. Then, these are a few questions I would > > > have about the transition plan: > > > > > > Would it require changing both device implementation and device > > > users in lockstep? Should we have a compatibility

[PATCH v2] qemu: Pass / fill niothreads for qemuMonitorGetIOThreads

2020-12-02 Thread John Ferlan
Let's pass along / fill @niothreads rather than trying to make dual use as a return value and thread count. This resolves a Coverity issue detected in qemuDomainGetIOThreadsMon where if qemuDomainObjExitMonitor failed, then a -1 was returned and overwrite @niothreads causing a memory leak.

[PATCH v2 1/2] qemu: support append param on live attaching file chardev

2020-12-02 Thread Nikolay Shirokovskiy
Currently it is simply ignored. Signed-off-by: Nikolay Shirokovskiy --- src/qemu/qemu_monitor_json.c | 4 1 file changed, 4 insertions(+) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 47ee1ff..ff03a5a 100644 --- a/src/qemu/qemu_monitor_json.c +++

[PATCH v2 0/2] qemu: support some missing params on live attaching chardev

2020-12-02 Thread Nikolay Shirokovskiy
Specifying chardev logfile and file backend append param is ignored yet. Diff from v1: - use existing virJSONValueObjectAdd instead of introducing virJSONValueObjectAppendBooleanTristate. Nikolay Shirokovskiy (2): qemu: support append param on live attaching file chardev qemu: support

[PATCH v2 2/2] qemu: support logfile on live attaching chardev

2020-12-02 Thread Nikolay Shirokovskiy
Currently it is simply ignored. Signed-off-by: Nikolay Shirokovskiy --- src/qemu/qemu_monitor_json.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index ff03a5a..0745717 100644 --- a/src/qemu/qemu_monitor_json.c +++

Re: [PATCH 4/7] qemu: Fix resource leak and coding error in qemuDomainGetIOThreadsMon

2020-12-02 Thread John Ferlan
On 12/2/20 9:44 AM, Ján Tomko wrote: > The commit summary uses 'and' which makes me think there are two > issues, but the commit message and code only seem to fix one. > True - I changed my mind multiple times on this one w/r/t how involved the fix should be. Originally I did have cleanup

Re: [PATCH 00/18] qapi/qom: QAPIfy object-add

2020-12-02 Thread Eduardo Habkost
On Wed, Dec 02, 2020 at 04:17:13PM +0100, Kevin Wolf wrote: > Am 02.12.2020 um 14:54 hat Eduardo Habkost geschrieben: > > On Wed, Dec 02, 2020 at 02:26:44PM +0100, Paolo Bonzini wrote: > > > On 02/12/20 13:51, Eduardo Habkost wrote: > > > > > > I'm liking the direction this is taking. However, I

Re: [PATCH libvirt v3 01/11] nodedev: detect AP card device

2020-12-02 Thread Shalini Chellathurai Saroja
Hello Erik, I will make changes based on your comments in here and patch 03. Thank you very much for the review. On 11/30/20 3:20 PM, Erik Skultety wrote: On Tue, Nov 17, 2020 at 01:10:55PM +0100, Shalini Chellathurai Saroja wrote: Introduce support for the Adjunct Processor (AP) crypto

Re: [PATCH 00/11] virDomainCheckpointAlignDisks: Clean up similarly to virDomainSnapshotAlignDisks

2020-12-02 Thread Ján Tomko
On a Wednesday in 2020, Peter Krempa wrote: I've refactored virDomainSnapshotAlignDisks and virDomainCheckpointAlignDisks was heavily inspired by it. Clean it up too. Peter Krempa (11): virDomainCheckpointAlignDisks: Refactor cleanup virDomainCheckpointAlignDisks: Unbreak error message

[PATCH 0/3] qemu: support some missing params on live attaching chardev

2020-12-02 Thread Nikolay Shirokovskiy
Specifying chardev logfile and file backend append param is ignored yet. Nikolay Shirokovskiy (3): util: add virJSONValueObjectAppendBooleanTristate qemu: support append param on live attaching file chardev qemu: support logfile on live attaching chardev src/libvirt_private.syms | 1

[PATCH 1/3] util: add virJSONValueObjectAppendBooleanTristate

2020-12-02 Thread Nikolay Shirokovskiy
It appends boolean from virTristateBool/virTristateSwitch value. Signed-off-by: Nikolay Shirokovskiy --- src/libvirt_private.syms | 1 + src/util/virjson.c | 25 + src/util/virjson.h | 1 + 3 files changed, 27 insertions(+) diff --git

[PATCH 2/3] qemu: support append param on live attaching file chardev

2020-12-02 Thread Nikolay Shirokovskiy
Currently it is simply ignored. Signed-off-by: Nikolay Shirokovskiy --- src/qemu/qemu_monitor_json.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 47ee1ff..df95a4a 100644 --- a/src/qemu/qemu_monitor_json.c +++

[PATCH 3/3] qemu: support logfile on live attaching chardev

2020-12-02 Thread Nikolay Shirokovskiy
Currently it is simply ignored. Signed-off-by: Nikolay Shirokovskiy --- src/qemu/qemu_monitor_json.c | 9 + 1 file changed, 9 insertions(+) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index df95a4a..6e96232 100644 --- a/src/qemu/qemu_monitor_json.c +++

Re: [PATCH v2] coding-style: Document 100 chars limit for line length

2020-12-02 Thread Daniel P . Berrangé
On Wed, Dec 02, 2020 at 03:54:28PM +0100, Michal Privoznik wrote: > The idea is to have it like a soft limit: if possible then break > lines, if not then have a long line instead of some creative > approach. > > Signed-off-by: Michal Privoznik > --- > > v2 of: > >

Re: [PATCH 00/18] qapi/qom: QAPIfy object-add

2020-12-02 Thread Kevin Wolf
Am 02.12.2020 um 14:54 hat Eduardo Habkost geschrieben: > On Wed, Dec 02, 2020 at 02:26:44PM +0100, Paolo Bonzini wrote: > > On 02/12/20 13:51, Eduardo Habkost wrote: > > > > > I'm liking the direction this is taking. However, I would still > > > > > like to have a clearer and feasible plan that

Re: [PATCH 7/7] qemu: Fix some issues in virQEMUDriverConfigLoadNVRAMEntry

2020-12-02 Thread Ján Tomko
On a Wednesday in 2020, John Ferlan wrote: Commit c4f4e195 fixed a double free, but if the code returns before we realloc the list and virFirmwareFreeList was called with cfg->nfirmwares 0 (e.g. during virQEMUDriverConfigDispose), then it would be rather disasterous. So let's reinitialze that

Re: [PATCH] qemu: Drop qemuMonitorGetVirtType()

2020-12-02 Thread Michal Privoznik
On 12/2/20 3:53 PM, Ján Tomko wrote: On a Wednesday in 2020, Michal Privoznik wrote: It's unused since v5.5.0-rc1~113. $ git show show v5.5.0-rc1~113. fatal: ambiguous argument 'show': unknown revision or path not in the working tree. Just drop the dot, it's marking the end of the

Re: [PATCH] spec: keep existing nwfilters uuid on update

2020-12-02 Thread Nikolay Shirokovskiy
Polite ping On 26.10.2020 12:21, Nikolay Shirokovskiy wrote: > Now on every nwfilter config package update we overwrite existing filters > entirely. It is desired to bring new version of filters on update but we'd > better keep their uuids I guess. > > Actually patch primarily address noise in

[PATCH v2] coding-style: Document 100 chars limit for line length

2020-12-02 Thread Michal Privoznik
The idea is to have it like a soft limit: if possible then break lines, if not then have a long line instead of some creative approach. Signed-off-by: Michal Privoznik --- v2 of: https://www.redhat.com/archives/libvir-list/2020-November/msg01600.html docs/coding-style.rst | 5 - 1 file

Re: [PATCH] qemu: Drop qemuMonitorGetVirtType()

2020-12-02 Thread Ján Tomko
On a Wednesday in 2020, Michal Privoznik wrote: It's unused since v5.5.0-rc1~113. $ git show show v5.5.0-rc1~113. fatal: ambiguous argument 'v5.5.0-rc1~113.': unknown revision or path not in the working tree. Signed-off-by: Michal Privoznik --- src/qemu/qemu_monitor.c | 10 ---

Re: [PATCH 6/7] locking: Resolve mem leak in virLockDaemonPreExecRestart

2020-12-02 Thread Ján Tomko
On a Wednesday in 2020, John Ferlan wrote: Initialize and free @magic since virJSONValueObjectAppendString does not free it for us eventually. Signed-off-by: John Ferlan --- src/locking/lock_daemon.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) Reviewed-by: Ján Tomko Jano

Re: [PATCH 5/7] logging: Resolve mem leak in virLogDaemonPreExecRestart

2020-12-02 Thread Ján Tomko
On a Wednesday in 2020, John Ferlan wrote: Initialize and free @magic since virJSONValueObjectAppendString does not free it for us eventually. Signed-off-by: John Ferlan --- src/logging/log_daemon.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) Reviewed-by: Ján Tomko Jano

[PATCH] qemu: Drop qemuMonitorGetVirtType()

2020-12-02 Thread Michal Privoznik
It's unused since v5.5.0-rc1~113. Signed-off-by: Michal Privoznik --- src/qemu/qemu_monitor.c | 10 --- src/qemu/qemu_monitor.h | 2 -- src/qemu/qemu_monitor_json.c | 40 --- src/qemu/qemu_monitor_json.h | 2 -- tests/qemumonitorjsontest.c | 52

Re: [libvirt][PATCH v1 1/1] support system default memory policy with numatune

2020-12-02 Thread Daniel Henrique Barboza
Apologies for the late review. First, 'ninja -C build test' complained about long lines in the numatune-memory-migratable.x86_64-latest.args file. I amended it here and the tests passed: $ git diff diff --git a/tests/qemuxml2argvdata/numatune-memory-migratable.x86_64-latest.args

Re: [PATCH 4/7] qemu: Fix resource leak and coding error in qemuDomainGetIOThreadsMon

2020-12-02 Thread Ján Tomko
The commit summary uses 'and' which makes me think there are two issues, but the commit message and code only seem to fix one. On a Wednesday in 2020, John Ferlan wrote: If qemuDomainGetIOThreadsMon fails because qemuDomainObjExitMonitor fails, then a -1 is returned which overwrites @niothreads

Re: [PATCH v2] src: use singular form instead of plural, for guest disk info

2020-12-02 Thread Marc-André Lureau
On Wed, Dec 2, 2020 at 4:47 PM Daniel P. Berrangé wrote: > Existing practice with the filesystem fields reported for the > virDomainGetGuestInfo API is to use the singular form for > field names. Ensure the disk info follows this practice. > > Fixes > > commit

[PATCH 4/5] conf: checkpoint: Prepare internals for missing domain definition

2020-12-02 Thread Peter Krempa
Coniditonalize code which assumes that the domain definition stored in the checkpoint is present. Signed-off-by: Peter Krempa --- src/conf/checkpoint_conf.c | 31 + tests/qemudomaincheckpointxml2xmltest.c | 5 2 files changed, 16 insertions(+), 20

[PATCH 2/5] virDomainCheckpointDefParse: Use 'unsigned int' for flags

2020-12-02 Thread Peter Krempa
Fix the type for a variable holding flags to the usual 'unsigned int' and change the name to be more appropriate to it's use. Signed-off-by: Peter Krempa --- src/conf/checkpoint_conf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/conf/checkpoint_conf.c

[PATCH 1/5] virDomainCheckpointDefParse: Don't extract unused domain type

2020-12-02 Thread Peter Krempa
We can extract './domain' directly and let the parser deal with the type. Signed-off-by: Peter Krempa --- src/conf/checkpoint_conf.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/conf/checkpoint_conf.c b/src/conf/checkpoint_conf.c index

[PATCH 5/5] conf: checkpoint: Don't require when redefining checkpoints

2020-12-02 Thread Peter Krempa
The domain definition stored with a checkpoint isn't used currently apart from matching disks when creating a new checkpoints. As some users of the incremental backup API want to provide backups in offline mode under their control (obviously while compying with our documentation on how the

[PATCH 3/5] virDomainCheckpointRedefineCommit: Don't check ABI of definition in checkpoint

2020-12-02 Thread Peter Krempa
Checking the definition ABI when redefining checkpoints doesn't make much sense for the following reasons: * the domain definition in the checkpoint is mostly unused (a relic adopted from the snapshot code) * can be very easily overriden by deleting the checkpoint metadata before

[PATCH 0/5] qemu: checkpoint: Don't require when redefining a checkpoint

2020-12-02 Thread Peter Krempa
I've got a request from the oVirt devs integrating incremental backup whether there's a simpler way to redefine checkpoints since they need to support cases when the VM isn't running. Since we don't really use the def we can stop requiring it. Peter Krempa (5): virDomainCheckpointDefParse:

Re: [PATCH v2 0/6] add post parse pSeries mem align, when ABI_UPDATE

2020-12-02 Thread Andrea Bolognani
On Wed, 2020-12-02 at 09:14 -0300, Daniel Henrique Barboza wrote: > On 12/2/20 4:17 AM, Michal Privoznik wrote: > > On 11/18/20 8:58 PM, Daniel Henrique Barboza wrote: > > > Daniel Henrique Barboza (6): > > >qemu_process.c: check migrateURI when setting > > > VIR_QEMU_PROCESS_START_NEW >

Re: [PATCH 3/7] docs: Fix link for virConnectGetStoragePoolCapabilities

2020-12-02 Thread Ján Tomko
On a Wednesday in 2020, John Ferlan wrote: The API is in the storage family not the domain family Signed-off-by: John Ferlan --- docs/formatstoragecaps.html.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

Re: [PATCH 2/7] util: Resolve resource leak in virExec error path

2020-12-02 Thread Ján Tomko
On a Wednesday in 2020, John Ferlan wrote: On error, the @pidfilefd was not released Found by Coverity The pidfile code was introduced by: commit d146105f1e4a9e0ab179f0b78c070ea38b9d5334 Author: Michal Prívozník CommitDate: 2020-03-24 15:44:23 +0100 virCommand: Actually acquire

Re: [PATCH v2] qemu: Don't cache NUMA caps

2020-12-02 Thread Daniel Henrique Barboza
On 12/2/20 5:26 AM, Michal Privoznik wrote: In v6.0.0-rc1~439 (and friends) we tried to cache NUMA capabilities because we assumed they are immutable. And to some extent they are (NUMA hotplug is not a thing, is it). However, our capabilities contain also some runtime info that can change,

Re: [PATCH v2 1/2] qemu: support append param on live attaching file chardev

2020-12-02 Thread Daniel Henrique Barboza
On 12/2/20 9:25 AM, Nikolay Shirokovskiy wrote: Currently it is simply ignored. Signed-off-by: Nikolay Shirokovskiy --- Reviewed-by: Daniel Henrique Barboza src/qemu/qemu_monitor_json.c | 4 1 file changed, 4 insertions(+) diff --git a/src/qemu/qemu_monitor_json.c

Re: [PATCH v2 2/2] qemu: support logfile on live attaching chardev

2020-12-02 Thread Daniel Henrique Barboza
On 12/2/20 9:25 AM, Nikolay Shirokovskiy wrote: Currently it is simply ignored. Signed-off-by: Nikolay Shirokovskiy --- Reviewed-by: Daniel Henrique Barboza src/qemu/qemu_monitor_json.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/qemu/qemu_monitor_json.c

Re: [PATCH 00/18] qapi/qom: QAPIfy object-add

2020-12-02 Thread Eduardo Habkost
On Wed, Dec 02, 2020 at 02:26:44PM +0100, Paolo Bonzini wrote: > On 02/12/20 13:51, Eduardo Habkost wrote: > > > > I'm liking the direction this is taking. However, I would still > > > > like to have a clearer and feasible plan that would work for > > > > -device, -machine, and -cpu. > > > > > >

Re: [PATCH 1/7] util: Fix memory leak in virNetDevOpenvswitchInterfaceGetMaster

2020-12-02 Thread Ján Tomko
On a Wednesday in 2020, John Ferlan wrote: Since 032548c4 @cmd was never autofree'd. Perhaps as a result of VIR_AUTOPTR type changes occurring at roughly the same time so the copy pasta missed this. Found by Coverity. Signed-off-by: John Ferlan --- src/util/virnetdevopenvswitch.c | 2 +- 1

Re: [PATCH 00/18] qapi/qom: QAPIfy object-add

2020-12-02 Thread Paolo Bonzini
On 02/12/20 13:51, Eduardo Habkost wrote: I'm liking the direction this is taking. However, I would still like to have a clearer and feasible plan that would work for -device, -machine, and -cpu. -cpu is not a problem since it's generally created with a static configuration (now done with

Re: [PATCH 00/18] qapi/qom: QAPIfy object-add

2020-12-02 Thread Eduardo Habkost
On Wed, Dec 02, 2020 at 10:30:11AM +0100, Paolo Bonzini wrote: > On 01/12/20 23:08, Eduardo Habkost wrote: > > > Properties are only a useful concept if they have a use. If > > > -object/object_add/object-add can do the same job without properties, > > > properties are not needed anymore. > > >

[PATCH v2] src: use singular form instead of plural, for guest disk info

2020-12-02 Thread Daniel P . Berrangé
Existing practice with the filesystem fields reported for the virDomainGetGuestInfo API is to use the singular form for field names. Ensure the disk info follows this practice. Fixes commit 05a75ca2ce743bc0bb119fb8d532ff84646fafa3 Author: Marc-André Lureau Date: Fri Nov 20 22:09:46 2020

[PATCH 7/7] qemu: Fix some issues in virQEMUDriverConfigLoadNVRAMEntry

2020-12-02 Thread John Ferlan
Commit c4f4e195 fixed a double free, but if the code returns before we realloc the list and virFirmwareFreeList was called with cfg->nfirmwares > 0 (e.g. during virQEMUDriverConfigDispose), then it would be rather disasterous. So let's reinitialze that too to indicate the list is empty. Coverity

[PATCH 3/7] docs: Fix link for virConnectGetStoragePoolCapabilities

2020-12-02 Thread John Ferlan
The API is in the storage family not the domain family Signed-off-by: John Ferlan --- docs/formatstoragecaps.html.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/formatstoragecaps.html.in b/docs/formatstoragecaps.html.in index 900303aef7..a9ecc371fa 100644 ---

[PATCH 5/7] logging: Resolve mem leak in virLogDaemonPreExecRestart

2020-12-02 Thread John Ferlan
Initialize and free @magic since virJSONValueObjectAppendString does not free it for us eventually. Signed-off-by: John Ferlan --- src/logging/log_daemon.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/logging/log_daemon.c b/src/logging/log_daemon.c index

[PATCH 1/7] util: Fix memory leak in virNetDevOpenvswitchInterfaceGetMaster

2020-12-02 Thread John Ferlan
Since 032548c4 @cmd was never autofree'd. Perhaps as a result of VIR_AUTOPTR type changes occurring at roughly the same time so the copy pasta missed this. Found by Coverity. Signed-off-by: John Ferlan --- src/util/virnetdevopenvswitch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 2/7] util: Resolve resource leak in virExec error path

2020-12-02 Thread John Ferlan
On error, the @pidfilefd was not released Found by Coverity Signed-off-by: John Ferlan --- src/util/vircommand.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util/vircommand.c b/src/util/vircommand.c index e47dd6b932..1716225aeb 100644 --- a/src/util/vircommand.c +++

Re: [PATCH 00/18] qapi/qom: QAPIfy object-add

2020-12-02 Thread Paolo Bonzini
On 02/12/20 11:27, Kevin Wolf wrote: Declaring read-only QOM properties is trivial. Trivial sounds like it's something the computer should be doing. Possibly, but not necessarily. There's always a cost to automatic code generation. If things are _too_ trivial and easy to get right, the

[PATCH 6/7] locking: Resolve mem leak in virLockDaemonPreExecRestart

2020-12-02 Thread John Ferlan
Initialize and free @magic since virJSONValueObjectAppendString does not free it for us eventually. Signed-off-by: John Ferlan --- src/locking/lock_daemon.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/locking/lock_daemon.c b/src/locking/lock_daemon.c index

[PATCH 4/7] qemu: Fix resource leak and coding error in qemuDomainGetIOThreadsMon

2020-12-02 Thread John Ferlan
If qemuDomainGetIOThreadsMon fails because qemuDomainObjExitMonitor fails, then a -1 is returned which overwrites @niothreads causing a memory leak. Let's pass @niothreads instead. Found by Coverity. Signed-off-by: John Ferlan --- src/qemu/qemu_driver.c | 19 +-- 1 file

[PATCH 0/7] A few Coverity related issues

2020-12-02 Thread John Ferlan
Fix some of the issues that have built up. Also a docs link fix that I tripped across at some point in time. Again as a reminder, I no longer have push access ;-) John Ferlan (7): util: Fix memory leak in virNetDevOpenvswitchInterfaceGetMaster util: Resolve resource leak in virExec error

Re: [PATCH 00/18] qapi/qom: QAPIfy object-add

2020-12-02 Thread Paolo Bonzini
On 02/12/20 11:38, Kevin Wolf wrote: Am 02.12.2020 um 10:30 hat Paolo Bonzini geschrieben: On 01/12/20 23:08, Eduardo Habkost wrote: Properties are only a useful concept if they have a use. If -object/object_add/object-add can do the same job without properties, properties are not needed

Re: [libvirt PATCH] src: use singular form instead of plural, for guest disk info

2020-12-02 Thread Peter Krempa
On Wed, Dec 02, 2020 at 12:12:21 +, Daniel Berrange wrote: > Existing practice with the filesystem fields reported for the > virDomainGetGuestInfo API is to use the singular form for > field names. Ensure the disk info follows this practice. > > Fixes > > commit

[PATCH 09/11] virDomainDiskByName: Remove ternary operator

2020-12-02 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 49b68c2c68..6922ebf407 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -17649,7 +17649,11 @@

[PATCH 06/11] virDomainCheckpointAlignDisks: Extract domain disk def pointer to 'domdisk'

2020-12-02 Thread Peter Krempa
Add a local variable holding the pointer instead of indexing the array multiple times. Signed-off-by: Peter Krempa --- src/conf/checkpoint_conf.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/conf/checkpoint_conf.c b/src/conf/checkpoint_conf.c index

[PATCH 11/11] virDomainSnapshotAlignDisks: Use virDomainDiskByName

2020-12-02 Thread Peter Krempa
We don't need the index that virDomainDiskIndexByName returns. Signed-off-by: Peter Krempa --- src/conf/snapshot_conf.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c index 8ef9708c72..f896fd1cf2 100644 ---

[PATCH 10/11] virDomainCheckpointAlignDisks: Use virDomainDiskByName

2020-12-02 Thread Peter Krempa
We don't need the index that virDomainDiskIndexByName returns. Signed-off-by: Peter Krempa --- src/conf/checkpoint_conf.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/conf/checkpoint_conf.c b/src/conf/checkpoint_conf.c index bd0a673757..089488fbc6 100644 ---

[PATCH 08/11] virDomainCheckpointDiskDef: Remove unused 'idx' field

2020-12-02 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/conf/checkpoint_conf.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/conf/checkpoint_conf.h b/src/conf/checkpoint_conf.h index 631f863151..5997e07ff9 100644 --- a/src/conf/checkpoint_conf.h +++ b/src/conf/checkpoint_conf.h @@ -42,7 +42,6 @@ typedef

[PATCH 07/11] virDomainCheckpointAlignDisks: refactor extension to all disks

2020-12-02 Thread Peter Krempa
Similarly to d3c029bb105 where we've refactored virDomainSnapshotAlignDisks, modify the extension algorithm to avoid use of the 'idx' variable and sorting of the array. Signed-off-by: Peter Krempa --- src/conf/checkpoint_conf.c | 53 +++--- 1 file changed, 21

[PATCH 03/11] virDomainCheckpointAlignDisks: Use 'domdef' for domain definition

2020-12-02 Thread Peter Krempa
Extract the pointer and use a local variable throughout the function. Signed-off-by: Peter Krempa --- src/conf/checkpoint_conf.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/src/conf/checkpoint_conf.c b/src/conf/checkpoint_conf.c index

[PATCH 04/11] virDomainCheckpointAlignDisks: rename 'def' to 'chkdef'

2020-12-02 Thread Peter Krempa
In most cases 'def' is used for the domain definition. Rename it to chkdef to prevent confusion. Signed-off-by: Peter Krempa --- src/conf/checkpoint_conf.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/conf/checkpoint_conf.c

[PATCH 05/11] virDomainCheckpointAlignDisks: Use 'chkdisk' instead of 'disk'

2020-12-02 Thread Peter Krempa
Clarify that the variable refers to the definition of the disk from the checkpoint definition. Signed-off-by: Peter Krempa --- src/conf/checkpoint_conf.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/conf/checkpoint_conf.c

[PATCH 02/11] virDomainCheckpointAlignDisks: Unbreak error message

2020-12-02 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/conf/checkpoint_conf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/conf/checkpoint_conf.c b/src/conf/checkpoint_conf.c index 795c6f93c4..914deb41f2 100644 --- a/src/conf/checkpoint_conf.c +++ b/src/conf/checkpoint_conf.c @@ -312,8

[PATCH 01/11] virDomainCheckpointAlignDisks: Refactor cleanup

2020-12-02 Thread Peter Krempa
Use g_autoptr for virBitmap and get rid of the 'cleanup:' label and ret variable. Signed-off-by: Peter Krempa --- src/conf/checkpoint_conf.c | 25 ++--- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/src/conf/checkpoint_conf.c b/src/conf/checkpoint_conf.c

[PATCH 00/11] virDomainCheckpointAlignDisks: Clean up similarly to virDomainSnapshotAlignDisks

2020-12-02 Thread Peter Krempa
I've refactored virDomainSnapshotAlignDisks and virDomainCheckpointAlignDisks was heavily inspired by it. Clean it up too. Peter Krempa (11): virDomainCheckpointAlignDisks: Refactor cleanup virDomainCheckpointAlignDisks: Unbreak error message virDomainCheckpointAlignDisks: Use 'domdef' for

Re: [PATCH v2 0/6] add post parse pSeries mem align, when ABI_UPDATE

2020-12-02 Thread Daniel Henrique Barboza
On 12/2/20 4:17 AM, Michal Privoznik wrote: On 11/18/20 8:58 PM, Daniel Henrique Barboza wrote: Hi, This is a follow up of [1] after really comprehending what I was messing with and what I couldn't do. This version has a shorter scope, only pSeries guests are being taken care of. I can send

[libvirt PATCH] src: use singular form instead of plural, for guest disk info

2020-12-02 Thread Daniel P . Berrangé
Existing practice with the filesystem fields reported for the virDomainGetGuestInfo API is to use the singular form for field names. Ensure the disk info follows this practice. Fixes commit 05a75ca2ce743bc0bb119fb8d532ff84646fafa3 Author: Marc-André Lureau Date: Fri Nov 20 22:09:46 2020

Re: [libvirt PATCH] meson: add winsock2 library on windows builds

2020-12-02 Thread Pavel Hrdina
On Wed, Dec 02, 2020 at 11:06:26AM +, Daniel P. Berrangé wrote: > If building for windows with curl disabled we get build failures due to > missing ws2_32 library needed for winsock2. > > Signed-off-by: Daniel P. Berrangé > --- > meson.build | 2 ++ > 1 file changed, 2 insertions(+)

Re: [PATCH 2/3] qemu: support append param on live attaching file chardev

2020-12-02 Thread Peter Krempa
On Wed, Dec 02, 2020 at 14:55:08 +0300, Nikolay Shirokovskiy wrote: > Currently it is simply ignored. > > Signed-off-by: Nikolay Shirokovskiy > --- > src/qemu/qemu_monitor_json.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/src/qemu/qemu_monitor_json.c

Re: [PATCH] accel/tcg: Remove deprecated '-tb-size' option

2020-12-02 Thread Ján Tomko
On a Wednesday in 2020, Philippe Mathieu-Daudé wrote: The '-tb-size' option (replaced by '-accel tcg,tb-size') is deprecated since 5.0 (commit fe174132478). Remove it. Signed-off-by: Philippe Mathieu-Daudé --- docs/system/deprecated.rst | 12 +--- accel/tcg/translate-all.c | 2 +-

Re: [PATCH v2] qemuDomainGetGuestInfo: Exit early if getting info fails

2020-12-02 Thread Ján Tomko
On a Tuesday in 2020, Michal Privoznik wrote: If there is an error getting info from guest agent, then the control on qemuDomainGetGuestInfo() jumps onto 'exitagent' label and subsequently continues on 'endagentjob'. Both labels are hit also in success case too. The control then continues by

Re: [PATCH 0/2] Replace VIR_AUTOSTRINGLIST with GStrv

2020-12-02 Thread Ján Tomko
On a Tuesday in 2020, Michal Privoznik wrote: It was only recently that I learned about g_auto(GStrv). It's just like our VIR_AUTOSTRINGLIST. Michal Prívozník (2): lib: Replace VIR_AUTOSTRINGLIST with GStrv virstring: Drop VIR_AUTOSTRINGLIST src/conf/cpu_conf.c| 2 +-

[Call for Presentations] FOSDEM 2021: Virt & IaaS Devroom

2020-12-02 Thread Kashyap Chamarthy
[Cross-posting to KVM, QEMU, and libvirt lists] The Call For Papers for FOSDEM's Virt & IaaS Devroom went out yesterday[1]. Here's the text (slightly formatted for readability): === We are excited to announce that the call for

[libvirt PATCH] rpm: convert mingw spec to meson

2020-12-02 Thread Daniel P . Berrangé
The meson build system is configured to only ever build shared libraries, so we delete the -static sub-RPMs. The few driver conditionals are deleted as there was never any scenario in which their value changed. Signed-off-by: Daniel P. Berrangé --- mingw-libvirt.spec.in | 205

Re: [PATCH] accel/tcg: Remove deprecated '-tb-size' option

2020-12-02 Thread Thomas Huth
On 02/12/2020 12.27, Philippe Mathieu-Daudé wrote: > The '-tb-size' option (replaced by '-accel tcg,tb-size') is > deprecated since 5.0 (commit fe174132478). Remove it. > > Signed-off-by: Philippe Mathieu-Daudé > --- > docs/system/deprecated.rst | 12 +--- > accel/tcg/translate-all.c |

[PATCH] accel/tcg: Remove deprecated '-tb-size' option

2020-12-02 Thread Philippe Mathieu-Daudé
The '-tb-size' option (replaced by '-accel tcg,tb-size') is deprecated since 5.0 (commit fe174132478). Remove it. Signed-off-by: Philippe Mathieu-Daudé --- docs/system/deprecated.rst | 12 +--- accel/tcg/translate-all.c | 2 +- softmmu/vl.c | 8 qemu-options.hx

Re: [PATCH] coding-style: Document 80 chars limit for line length

2020-12-02 Thread Thomas Huth
On 02/12/2020 12.20, Michal Privoznik wrote: > On 12/2/20 11:52 AM, Daniel P. Berrangé wrote: >> On Mon, Nov 30, 2020 at 01:58:24PM +0100, Michal Privoznik wrote: >>> The idea is to have it like a soft limit: if possible then break >>> lines, if not then have a long line instead of some creative

Re: [PATCH] coding-style: Document 80 chars limit for line length

2020-12-02 Thread Michal Privoznik
On 12/2/20 11:52 AM, Daniel P. Berrangé wrote: On Mon, Nov 30, 2020 at 01:58:24PM +0100, Michal Privoznik wrote: The idea is to have it like a soft limit: if possible then break lines, if not then have a long line instead of some creative approach. Signed-off-by: Michal Privoznik ---

Re: regression in meson build, AC_PATH_PROG lost

2020-12-02 Thread Olaf Hering
Am Thu, 12 Nov 2020 22:40:02 +0100 schrieb Olaf Hering : > AC_PATH_PROG([PARTED], [parted], [], [$LIBVIRT_SBIN_PATH]) Is there a consensus now how to address this? >From what I understand, using just exec(BASENAME) to search for the binary in >PATH is acceptable. It may result in surprises on

[libvirt PATCH] meson: add winsock2 library on windows builds

2020-12-02 Thread Daniel P . Berrangé
If building for windows with curl disabled we get build failures due to missing ws2_32 library needed for winsock2. Signed-off-by: Daniel P. Berrangé --- meson.build | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meson.build b/meson.build index 01e7fbd409..b280809a65 100644 ---

Re: [PATCH] coding-style: Document 80 chars limit for line length

2020-12-02 Thread Daniel P . Berrangé
On Mon, Nov 30, 2020 at 01:58:24PM +0100, Michal Privoznik wrote: > The idea is to have it like a soft limit: if possible then break > lines, if not then have a long line instead of some creative > approach. > > Signed-off-by: Michal Privoznik > --- > docs/coding-style.rst | 14 +- >

[PATCH 4/4] libvirt_recover_xattrs: Allow fixing multiple PATHs

2020-12-02 Thread Peter Krempa
Loop for multiple PATH arguments to support shell pattern expansion. Signed-off-by: Peter Krempa --- tools/libvirt_recover_xattrs.sh | 51 +++-- 1 file changed, 29 insertions(+), 22 deletions(-) diff --git a/tools/libvirt_recover_xattrs.sh

Re: [PATCH 00/18] qapi/qom: QAPIfy object-add

2020-12-02 Thread Kevin Wolf
Am 02.12.2020 um 10:30 hat Paolo Bonzini geschrieben: > On 01/12/20 23:08, Eduardo Habkost wrote: > > > Properties are only a useful concept if they have a use. If > > > -object/object_add/object-add can do the same job without properties, > > > properties are not needed anymore. > > > > Do you

[PATCH 3/4] libvirt_recover_xattrs: Add unsafe operation mode

2020-12-02 Thread Peter Krempa
In some cases you want to fix a certain directory while you don't really care whether there are other VMs running. Add a option to disable the check. Signed-off-by: Peter Krempa --- tools/libvirt_recover_xattrs.sh | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff

[PATCH 1/4] libvirt_recover_xattrs: Avoid backticks for subshell

2020-12-02 Thread Peter Krempa
Signed-off-by: Peter Krempa --- tools/libvirt_recover_xattrs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libvirt_recover_xattrs.sh b/tools/libvirt_recover_xattrs.sh index 3907413c63..cb98497732 100755 --- a/tools/libvirt_recover_xattrs.sh +++

[PATCH 2/4] libvirt_recover_xattrs: Use only the correct xattr prefix

2020-12-02 Thread Peter Krempa
Linux and FreeBSD have different prefix. In the current state we've tried to reset the labels for both systems which resulted in errors like this: Fixing /tmp/bitmaps2.qcow2 setfattr: /tmp/bitmaps2.qcow2: Operation not supported setfattr: /tmp/bitmaps2.qcow2: Operation not supported setfattr:

[PATCH 0/4] libvirt_recover_xattrs: Improve usability for libvirt development

2020-12-02 Thread Peter Krempa
I run into scenarios where I forget to destroy a VM which has a new WIP qemu capability. Starting a libvirtd which doesn't support it yet makes the libvirt vanish, thus after manually killing it libvirtd doesn't clear the xattrs, making it impossible to start the VM. libvirt_recover_xattrs fixes

[libvirt PATCH] cpu_map: Fix Icelake Server model number

2020-12-02 Thread Tim Wiederhake
See arch/x86/include/asm/intel-family.h in the Kernel: #define INTEL_FAM6_ICELAKE_X 0x6A Signed-off-by: Tim Wiederhake --- src/cpu_map/x86_Icelake-Server-noTSX.xml | 2 +- src/cpu_map/x86_Icelake-Server.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [libvirt PATCH] scripts: ignore whitespace in pdwtags output

2020-12-02 Thread Ján Tomko
On a Wednesday in 2020, Daniel P. Berrangé wrote: The pdwtags program changed its whitespace formatting for enum values in release 1.19: @@ -145,22 +145,22 @@ u_int flags; }; enum admin_procedure { -ADMIN_PROC_CONNECT_OPEN = 1, -

  1   2   >