Re: [libvirt] [PATCH v2 07/29] tests: qemustatusxml2xml: Add separate output for migration-out-nbd-tls

2019-04-01 Thread Ján Tomko
On Fri, Mar 22, 2019 at 07:00:43PM +0100, Peter Krempa wrote: Upcomming change will modify some aspects. To allow testing upgrade path add a separate output file so that we can see the conversion from old to new config. Signed-off-by: Peter Krempa --- .../migration-out-nbd-tls-out.xml

Re: [libvirt] [PATCH v2 06/29] tests: qemustatusxml2xml: Add another disk to migration-out-nbd-tls case

2019-04-01 Thread Ján Tomko
On Fri, Mar 22, 2019 at 07:00:42PM +0100, Peter Krempa wrote: Upcomming change will modify some aspects. To allow testing upgrade path add another disk. Signed-off-by: Peter Krempa --- .../migration-out-nbd-tls-in.xml | 19 +++ 1 file changed, 19 insertions(+) Rev

Re: [libvirt] [PATCH v2 05/29] tests: qemuxml2xml: Use virdeterministichashmock.so

2019-04-01 Thread Ján Tomko
On Fri, Mar 22, 2019 at 07:00:41PM +0100, Peter Krempa wrote: Block job related data will be stored in a has table and formatted into the status XML. Use the mock to guarantee stable tests. Signed-off-by: Peter Krempa --- tests/qemuxml2xmltest.c | 3 ++- 1 file changed, 2 insertions(+), 1 deleti

Re: [libvirt] [PATCH v2 04/29] conf: Export virDomainDiskSourceFormat

2019-04-01 Thread Ján Tomko
On Fri, Mar 22, 2019 at 07:00:40PM +0100, Peter Krempa wrote: Signed-off-by: Peter Krempa --- src/libvirt_private.syms | 1 + 1 file changed, 1 insertion(+) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature -- libvir-list mailing list libvir-list@redhat.com https://www.r

Re: [libvirt] [PATCH v2 03/29] conf: Merge virDomainDiskSourceFormatInternal into virDomainDiskSourceFormat

2019-04-01 Thread Ján Tomko
On Fri, Mar 22, 2019 at 07:00:39PM +0100, Peter Krempa wrote: Remove the wrapper and fix callers. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 35 +++ src/conf/domain_conf.h | 1 + src/conf/snapshot_conf.c | 2 +- tests/qemublocktest.c| 2 +- t

Re: [libvirt] Can jobs suck like qemu-pr-helper does be transfered to libvirtd?

2019-04-01 Thread Zhangbo (Oscar)
>[...] > >> >>This does not play well with the fact that processes as the PR helper >> >>are always required. >> >> >> >>Merging them into libvirtd would make the VM stop until libvirtd is >> >>running again. Additionally if any of the operations require persistent >> >>kernel state as e.g. file de

Re: [libvirt] [PATCH v2 02/29] conf: Remove @seclabels from virDomainStorageSourceFormat

2019-04-01 Thread Ján Tomko
On Fri, Mar 22, 2019 at 07:00:38PM +0100, Peter Krempa wrote: All callers including transitive callers through virDomainDiskSourceFormatInternal always pass true. Remove the argument. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 15 ++- src/conf/domain_conf.h | 3 +-- src

Re: [libvirt] [PATCH v2 01/29] conf: Format seclabels for

2019-04-01 Thread Ján Tomko
On Fri, Mar 22, 2019 at 07:00:37PM +0100, Peter Krempa wrote: We parse the seclabels and use them internally so omitting them when formatting would be misleading. Additionally our schema actually allows them. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c

Re: [libvirt] [PATCH 2/7] util: buffer: Use 'size_t' for buffer size variables

2019-04-01 Thread Laine Stump
On 4/1/19 2:59 AM, Peter Krempa wrote: On Sat, Mar 30, 2019 at 12:21:51 -0400, Laine Stump wrote: On 3/29/19 9:33 AM, Peter Krempa wrote: Use size_t for all sizes. The '*' modifier unfortunately does require an int so a temporary variable is necessary in the tests. Signed-off-by: Peter Krempa

Re: [libvirt] [PATCH 1/7] util: buffer: Remove struct member munging

2019-04-01 Thread Laine Stump
On 4/1/19 2:54 AM, Peter Krempa wrote: On Fri, Mar 29, 2019 at 18:44:04 -0400, Laine Stump wrote: On 3/29/19 9:33 AM, Peter Krempa wrote: This was meant to stop abusing the members directly, but we don't do this for other internal structs. Additionally this did not stop the test from touching t

Re: [libvirt] [PATCH v4 0/2] PPC64 support for NVIDIA V100 GPU with NVLink2 passthrough

2019-04-01 Thread Daniel Henrique Barboza
Ping The QEMU implementation was accepted and will be presented in QEMU 4.1. The implementation accepted is compatible with the work already done in this series, so this version is still current. Thanks, dhb On 3/12/19 6:55 PM, Daniel Henrique Barboza wrote: This series adds support for a n

[libvirt] [PATCH 2/3] setting QEMU_CAPS_WAKEUP_SUSPEND_SUPPORT qemu capability

2019-04-01 Thread Daniel Henrique Barboza
QEMU_CAPS_WAKEUP_SUSPEND_SUPPORT is a bool that represents the value of the wakeup-suspend-support flag of the new query-current-machine QMP API, available in QEMU 4.0. The flag is set in qemuProcessLaunch, using a new function called qemuProcessSetupWakeupSuspendSupport. This function checks firs

[libvirt] [PATCH 1/3] adding QEMU_CAPS_QUERY_CURRENT_MACHINE and QEMU_CAPS_WAKEUP_SUSPEND_SUPPORT

2019-04-01 Thread Daniel Henrique Barboza
QEMU commit 46ea94ca9cf ("qmp: query-current-machine with wakeup-suspend-support") added a new QMP command called 'query-current-machine' that retrieves guest parameters that can vary in the same machine model (e.g. ACPI support for x86 VMs depends on the '--no-acpi' option). Currently, this API ha

[libvirt] [PATCH 3/3] qemuDomainPMSuspendForDuration: check for QEMU_CAPS_WAKEUP_SUSPEND_SUPPORT

2019-04-01 Thread Daniel Henrique Barboza
If the current QEMU guest can't wake up from suspend properly, avoid suspending the guest at all. This is done by checking the QEMU_CAPS_WAKEUP_SUSPEND_SUPPORT cap. The absence of the cap indicates that we're dealing with a QEMU version older than 4.0 (which implements the required QMP API). In th

[libvirt] [PATCH 0/3] introducing QEMU_CAPS_QUERY_CURRENT_MACHINE and QEMU_CAPS_WAKEUP_SUSPEND_SUPPORT

2019-04-01 Thread Daniel Henrique Barboza
Hi, In this series, I present the Libvirt support for a QEMU API that will be introduced in QEMU 4.0, called 'query-current-machine'. More background info about the API and its purpose can be found in the commit msg of patch 1. Patch 1 contains the caps declarations (a short patch, perhaps squash

Re: [libvirt] [PATCH] virsh: cmdConsole: make --domain optional

2019-04-01 Thread Eric Blake
On 4/1/19 2:04 PM, Ján Tomko wrote: > In the absence of a domain parameter, console the user instead. > > Signed-off-by: Ján Tomko > --- > tools/virsh-domain.c | 25 - > 1 file changed, 24 insertions(+), 1 deletion(-) Missing doc updates to virsh.pod. How is a user going

[libvirt] [PATCH] virsh: cmdConsole: make --domain optional

2019-04-01 Thread Ján Tomko
In the absence of a domain parameter, console the user instead. Signed-off-by: Ján Tomko --- tools/virsh-domain.c | 25 - 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index afcd0a5f8d..de41f6312d 100644 --- a/to

Re: [libvirt] [PATCH 0/3] maint: Drop ChangeLog*

2019-04-01 Thread Cole Robinson
On 4/1/19 12:50 PM, Andrea Bolognani wrote: > Rationale in the respective commit messages. > > Patch 2/3 has been snipped quite extensively so that it would > make it to the mailing list: the unabridged version of this > series can be fetched from > > https://github.com/andreabolognani/libvirt/

[libvirt] [PATCH] tests: fix mocking of stat() / lstat() functions

2019-04-01 Thread Daniel P . Berrangé
Quite a few of the tests have a need to mock the stat() / lstat() functions and they are taking somewhat different & inconsistent approaches none of which are actually fully correct. This is shown by fact that 'make check' fails on 32-bit hosts. Investigation revealed that the code was calling into

[libvirt] [PATCH 3/3] maint: Update references to ChangeLog*

2019-04-01 Thread Andrea Bolognani
The files no longer exist, at least not in their previous form, so references to them need to be reworked to still make sense. Signed-off-by: Andrea Bolognani --- docs/news-ascii.xsl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/news-ascii.xsl b/docs/news-ascii.xsl i

[libvirt] [PATCH 1/3] maint: Stop generating ChangeLog from git

2019-04-01 Thread Andrea Bolognani
Our ChangeLog is generated by basically redirecting the output of 'git log' into it so, as can be expected, it has only gotten bigger as development has progressed. As of today, its size has reached pretty much comical levels: $ du -sk ChangeLog 11328 ChangeLog All of that for information *li

[libvirt] [PATCH 2/3] maint: Drop ChangeLog-old

2019-04-01 Thread Andrea Bolognani
This file contains the old schoold ChangeLog, which was manually updated for every set of changes before the switch to git. When libvirt was imported into git, however, *all* history was preserved, including the changes documented in this file, and can still be inspected using 'git log' just like

[libvirt] [PATCH 0/3] maint: Drop ChangeLog*

2019-04-01 Thread Andrea Bolognani
Rationale in the respective commit messages. Patch 2/3 has been snipped quite extensively so that it would make it to the mailing list: the unabridged version of this series can be fetched from https://github.com/andreabolognani/libvirt/tree/changelog Andrea Bolognani (3): maint: Stop genera

[libvirt] [PATCH 00/12] tests: qemuxml2xml: add DO_TEST_CAPS*

2019-04-01 Thread Cole Robinson
This series moves testInfoSetArgs and friends from qemuxml2argvtest.c into testutilsqemu.c, so we can use them in qemuxml2xml and make use of the CAPS handling. It will also make things easier to test xml2xml failures for example if we wanted to. Cole Robinson (12): tests: qemuxml2xml: Break out

[libvirt] [PATCH 01/12] tests: qemuxml2xml: Break out testInfoSet*Paths

2019-04-01 Thread Cole Robinson
These will need to be separate to share testInfo with qemuxml2argv Signed-off-by: Cole Robinson --- tests/qemuxml2xmltest.c | 25 + 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 83a0d1cf7b..2dfa9e628

[libvirt] [PATCH 07/12] tests: Move testQemuInfo* to testutilsqemu

2019-04-01 Thread Cole Robinson
So it can eventually be shared with qemuxml2xml Signed-off-by: Cole Robinson --- tests/qemuxml2argvtest.c | 173 --- tests/testutilsqemu.c| 144 tests/testutilsqemu.h| 39 + 3 files changed, 183 insertions(+),

[libvirt] [PATCH 04/12] tests: qemuxml2argv: Add info->{in, out}file

2019-04-01 Thread Cole Robinson
Track infile and outfile in testInfo. This is step towards moving path creation out of the test case, which will eventually help sharing more code with qemuxml2xmltest.c Signed-off-by: Cole Robinson --- tests/qemuxml2argvtest.c | 19 ++- 1 file changed, 10 insertions(+), 9 deleti

[libvirt] [PATCH 10/12] tests: qemuxml2xml: Use testQemuInfoSetArgs

2019-04-01 Thread Cole Robinson
No functional change, just replacing the old custom infrastructure Signed-off-by: Cole Robinson --- tests/qemuxml2xmltest.c | 38 +++--- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index ba622a3

[libvirt] [PATCH 08/12] tests: add testQemuGetCapsLatest

2019-04-01 Thread Cole Robinson
Move the capslatest building from qemuxml2argv to testutilsqemu Signed-off-by: Cole Robinson --- tests/qemuxml2argvtest.c | 25 ++--- tests/testutilsqemu.c| 37 + tests/testutilsqemu.h| 1 + 3 files changed, 40 insertions(+), 23 de

[libvirt] [PATCH 06/12] tests: qemuxml2argv: Rename testInfo* to testQemuInfo*

2019-04-01 Thread Cole Robinson
In preparation for moving these bits to a shared place, rename them to match one of the testqemuutils.c function prefixes. Rename info->flags handling too as it will need to be moved testInfoSetPaths isn't renamed because it will stay local Signed-off-by: Cole Robinson --- tests/qemuxml2argvtes

[libvirt] [PATCH 12/12] tests: qemuxml2xml: Add DO_TEST_CAPS*

2019-04-01 Thread Cole Robinson
Add DO_TEST_CAPS* macros, lifted from qemuxml2argvtest. Use it on a few recently added xml2xml tests that use DO_TEST_CAPS in the argv test case. The firmware examples require breaking the symlink and creating our own test file. Also add a test for os-firmware-efi which seems to have been missed.

[libvirt] [PATCH 05/12] tests: qemuxml2argv: add testInfoSetPaths

2019-04-01 Thread Cole Robinson
This moves infile and outfile building outside the test case, which better fits the pattern of qemuxml2xmltest. It also lets us drop the qemuxml2argtest-specific 'suffix' from testInfo Signed-off-by: Cole Robinson --- tests/qemuxml2argvtest.c | 25 + 1 file changed, 13 in

[libvirt] [PATCH 09/12] tests: qemuxml2xml: Use struct testQemuInfo

2019-04-01 Thread Cole Robinson
The qemuxml2xml testInfo is now just a subset of testQemuInfo, so it's a drop in replacement Signed-off-by: Cole Robinson --- tests/qemuxml2xmltest.c | 41 - 1 file changed, 12 insertions(+), 29 deletions(-) diff --git a/tests/qemuxml2xmltest.c b/tests/qe

[libvirt] [PATCH 11/12] tests: qemuxml2xml: make GIC handling optional

2019-04-01 Thread Cole Robinson
Make all users of GIC_X use ARG_GIC explicitly, and drop the required gic parameter from DO_TEST_FULL Signed-off-by: Cole Robinson --- tests/qemuxml2xmltest.c | 85 ++--- 1 file changed, 55 insertions(+), 30 deletions(-) diff --git a/tests/qemuxml2xmltest.c b

[libvirt] [PATCH 03/12] tests: qemuxml2xml: Remove info->outActiveName

2019-04-01 Thread Cole Robinson
Reuse info->outfile for it. This requires us to set paths before each virTestRun invocation Signed-off-by: Cole Robinson --- tests/qemuxml2xmltest.c | 61 + 1 file changed, 25 insertions(+), 36 deletions(-) diff --git a/tests/qemuxml2xmltest.c b/tests/qem

[libvirt] [PATCH 02/12] tests: qemuxml2xml: Add info->{in, out}file

2019-04-01 Thread Cole Robinson
Just renamed from existing inName and outActiveName Signed-off-by: Cole Robinson --- tests/qemuxml2xmltest.c | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 2dfa9e628b..0ced565fbc 1

Re: [libvirt] vcpupin reports bogus vcpu affinities

2019-04-01 Thread Ján Tomko
On Fri, Mar 29, 2019 at 01:36:02PM +, Allen, John wrote: Sent this out to the list a few days ago, but never saw it appear on the archives. Resending--hopefully this makes it to the list. --- For pinned vcpus, vcpupin will report inaccurate affinity values on machines with high core counts

Re: [libvirt] deadlock in remoteDispatchDomainUndefine vs daemonStreamHandleAbort

2019-04-01 Thread Michal Privoznik
On 4/1/19 4:25 PM, Christian Ehrhardt wrote: Hi, I happened to analyze a bug [1] report I got from a friend and for quite a while it was rather elusive. But I now finally got it reproducible [2] enough to share it with the community. The TL;DR of what I see is: - an automation with python-libvir

[libvirt] deadlock in remoteDispatchDomainUndefine vs daemonStreamHandleAbort

2019-04-01 Thread Christian Ehrhardt
Hi, I happened to analyze a bug [1] report I got from a friend and for quite a while it was rather elusive. But I now finally got it reproducible [2] enough to share it with the community. The TL;DR of what I see is: - an automation with python-libvirt gets a SIGINT - cleanup runs destroy and furt

Re: [libvirt] [PATCH] virerror: Make error reporting prettier

2019-04-01 Thread Andrea Bolognani
On Mon, 2019-04-01 at 09:52 -0400, Laine Stump wrote: > On 4/1/19 6:11 AM, Andrea Bolognani wrote: > > NACK until the list of excuses has been proven to only contain > > grammatically valid and correctly spelled English sentences. > > Assuming a lack of commit access to that list, maybe a post-pro

Re: [libvirt] [PATCH 14/14] virsh-completer: introduce virshPasswordCompleter

2019-04-01 Thread Laine Stump
On 4/1/19 3:33 AM, Ján Tomko wrote: Suggest some passwords to the user. Signed-off-by: Ján Tomko --- tools/virsh-completer.c | 58 + tools/virsh-completer.h | 4 +++ tools/virsh-domain.c| 1 + 3 files changed, 63 insertions(+) diff --git a/too

[libvirt] [PATCH 4/5] virfile: Introduce and use virFileGetDefaultHugepage

2019-04-01 Thread Michal Privoznik
This helper returns the default hugetlbfs mount point from given array of mount points. Signed-off-by: Michal Privoznik --- src/libvirt_private.syms | 1 + src/qemu/qemu_conf.c | 12 src/util/virfile.c | 25 + src/util/virfile.h | 3 +++ 4 f

[libvirt] [PATCH 5/5] qemuBuildMemoryBackendProps: Get pagesize early

2019-04-01 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1693066 Up until memfd introduction (in 24b74d187ca) we did not need to know @pagesize because qemuGetDomainHupageMemPath() could deal with it being zero (value of zero means use the default hugetlbfs mount). But since for memfd we are not passing a path

[libvirt] [PATCH 3/5] qemuxml2xmltest: Add memfd tests

2019-04-01 Thread Michal Privoznik
Somehow, these were not tested. Use symlinks to point expected output back to the input. This way we can also fix some discrepancies in the input XMLs. Signed-off-by: Michal Privoznik --- .../fd-memory-no-numa-topology.xml | 14 +++--- .../fd-memory-numa-topology.xml

[libvirt] [PATCH 1/5] qemuxml2argvdata: Drop useless spaces at the beginning of lines

2019-04-01 Thread Michal Privoznik
There are three test XMLs that have useless spaces at the beginning of each line. I intend to add these to qemuxml2xmltest and make xmlout a symlink to the original XML. In order to do that the XMLs must look better than they do now. Signed-off-by: Michal Privoznik --- .../fd-memory-numa-topolog

[libvirt] [PATCH 0/5] qemu: Fix memfd with default hugetlbfs mount

2019-04-01 Thread Michal Privoznik
Michal Prívozník (5): qemuxml2argvdata: Drop useless spaces at the beginning of lines qemuxml2xmltest: Move virObjectUnref() call qemuxml2xmltest: Add memfd tests virfile: Introduce and use virFileGetDefaultHugepage qemuBuildMemoryBackendProps: Get pagesize early src/libvirt_private.sym

[libvirt] [PATCH 2/5] qemuxml2xmltest: Move virObjectUnref() call

2019-04-01 Thread Michal Privoznik
The current location looks very arbitrary. Move it to the end of the mymain() function so it is less confusing. Signed-off-by: Michal Privoznik --- tests/qemuxml2xmltest.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c inde

Re: [libvirt] [PATCH v2] qemu: fix domain unlock/unref in qemuMigrationSrcPerform

2019-04-01 Thread Michal Privoznik
On 4/1/19 3:28 PM, Nikolay Shirokovskiy wrote: qemuMigrationSrcPerform callers expect it to call virDomainObjEndAPI in any case so on error paths we miss the virDomainObjEndAPI call. To fix this let's make qemuMigrationSrcPerform callers responsible for the virDomainObjEndAPI call. Signed-off-by

Re: [libvirt] [PATCH v2 6/7] virsh: domstate: report detailed state if available

2019-04-01 Thread Bjoern Walk
Michal Privoznik [2019-04-01, 02:08PM +0200]: > On 4/1/19 1:14 PM, Bjoern Walk wrote: > > Michal Privoznik [2019-04-01, 10:49AM +0200]: > > > On 4/1/19 10:17 AM, Bjoern Walk wrote: > > > > I intent to have the new API function superseed the existing one, so I > > > > actually want to call virDoma

Re: [libvirt] [PATCH] virerror: Make error reporting prettier

2019-04-01 Thread Laine Stump
On 4/1/19 6:11 AM, Andrea Bolognani wrote: On Mon, 2019-04-01 at 10:10 +0200, Michal Privoznik wrote: So far, if something goes wrong we print an error message, e.g. like this: virsh # start fedora error: Failed to start domain fedora error: internal error: process exited while connect

[libvirt] [PATCH v2] qemu: fix domain unlock/unref in qemuMigrationSrcPerform

2019-04-01 Thread Nikolay Shirokovskiy
qemuMigrationSrcPerform callers expect it to call virDomainObjEndAPI in any case so on error paths we miss the virDomainObjEndAPI call. To fix this let's make qemuMigrationSrcPerform callers responsible for the virDomainObjEndAPI call. Signed-off-by: Nikolay Shirokovskiy --- diff to v1 [1]: - mo

[libvirt] [PATCH 09/10] util: json: Make sure that Jano's pin is not leaked to the heap

2019-04-01 Thread Peter Krempa
Use virPinIsJanos and clear the string if it accidentally contains Jano's PIN. --- src/Makefile.am| 3 +++ src/util/virjson.c | 6 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Makefile.am b/src/Makefile.am index a73f43c483..621c5ff224 100644 --- a/src/Makefile.am ++

[libvirt] [PATCH 10/10] util: json: Nuke strings when freeing JSON objects

2019-04-01 Thread Peter Krempa
We construct JSON objects e.g. for setting the VNC password but then just VIR_FREE the strings cointained inside. If it was the password string would be kept on the heap. Exchange some cpu cycles for a warm feeling of security. Signed-off-by: Peter Krempa --- src/util/virjson.c | 2 +- 1 file ch

[libvirt] [PATCH 08/10] util: Introduce 'virpin' module for dealing with PIN numbers

2019-04-01 Thread Peter Krempa
In https://www.redhat.com/archives/libvir-list/2019-February/msg01475.html I was notified that I forgot to deal with the possibility that the JSON number would contain jtomko's PIN number. I had to look around for a leaked list of PIN numbers to avoid the problem described in the review. This comm

[libvirt] [PATCH 07/10] qemu: Use VIR_TMP to stop leaking pointer to VNC password pointer to stack

2019-04-01 Thread Peter Krempa
Spare a few cpu cycles to allow us feeling a bit better about ourselves. --- src/qemu/qemu_hotplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 4e94d80f21..7f46b1fd9f 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qem

[libvirt] [PATCH 03/10] Use VIR_AUTODISPOSE_STR instead of VIR_DISPOSE_STRING where possible

2019-04-01 Thread Peter Krempa
Refactor code paths which clear strings on cleanup paths to use the automatic helper. Signed-off-by: Peter Krempa --- src/libxl/libxl_conf.c| 3 +-- src/qemu/qemu_command.c | 3 +-- src/rpc/virnetlibsshsession.c | 10 +++--- src/storage/storage_backend_rbd.c | 3

[libvirt] [PATCH 06/10] util: alloc: Introduce VIR_TMP

2019-04-01 Thread Peter Krempa
Allow preserving the holy serenity of the stack by clearing out temp pointer when leaving the scope. --- src/libvirt_private.syms | 1 + src/util/viralloc.c | 7 +++ src/util/viralloc.h | 15 +++ 3 files changed, 23 insertions(+) diff --git a/src/libvirt_private.syms b

[libvirt] [PATCH 05/10] util: alloc: Clean also stack'd data with VIR_AUTOCLEAN

2019-04-01 Thread Peter Krempa
VIR_AUTOCLEAN uses __attribute__(cleanup) to clean stack'd data types. The implementation calls the callback but did not clean the stack'd structure besides to what the called function did. This adds a memset call to clean it when unrolling the stack to achieve the same stack cleanlines as with VIR

[libvirt] [PATCH 04/10] util: buffer: Remove struct member munging

2019-04-01 Thread Peter Krempa
This was meant to stop abusing the members directly, but we don't do this for other cases. Additionally this did not stop the test from touching the members. Remove the header obscurization. Signed-off-by: Peter Krempa --- src/util/virbuffer.c | 12 src/util/virbuffer.h | 16 ++-

[libvirt] [PATCH 02/10] util: alloc: Add automatic cleanup/disposal of strings

2019-04-01 Thread Peter Krempa
VIR_AUTODISPOSE_STR is similar to VIR_AUTOFREE(char *) but uses virDispose for clearing of the stored string. This patch also refactors VIR_DISPOSE to use the new helper which is used for the new macro. Signed-off-by: Peter Krempa --- src/libvirt_private.syms | 1 + src/util/viralloc.c |

[libvirt] [PATCH 00/10] Improve handling of secrets in memory

2019-04-01 Thread Peter Krempa
Peter Krempa (10): qemu: conf: Clear spice/vnc passwords from memory when freeing conf object util: alloc: Add automatic cleanup/disposal of strings Use VIR_AUTODISPOSE_STR instead of VIR_DISPOSE_STRING where possible util: buffer: Remove struct member munging util: alloc: Clean also

[libvirt] [PATCH 01/10] qemu: conf: Clear spice/vnc passwords from memory when freeing conf object

2019-04-01 Thread Peter Krempa
We should not keep secrets randomly on the heap. Signed-off-by: Peter Krempa --- src/qemu/qemu_conf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 42122dcd97..f23a0c0222 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/

[libvirt] [RFC PATCH 8/8] news: Update for virDomainDefineJSONFlags()

2019-04-01 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- docs/news.xml | 11 +++ 1 file changed, 11 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index fcf8520132..76e8c90bf4 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -116,6 +116,17 @@ unable to saturate the network link.

[libvirt] [RFC PATCH 6/8] qemu: Add virDomainDefineJSONFlags() support

2019-04-01 Thread Andrea Bolognani
This allows us to use virDomainDefineJSONFlags() when connected to a QEMU-based hypervisor. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_driver.c | 84 ++ 1 file changed, 84 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c i

[libvirt] [RFC PATCH 4/8] Introduce the virDomainDefineJSONFlags() public API

2019-04-01 Thread Andrea Bolognani
This will be the entry point to JSON-based APIs for all non-internal users. Signed-off-by: Andrea Bolognani --- include/libvirt/libvirt-domain.h | 3 +++ src/driver-hypervisor.h | 6 + src/libvirt-domain.c | 45 src/libvirt_public.syms

[libvirt] [RFC PATCH 3/8] rpc: Add JSON to the list of fixups in gendispatch

2019-04-01 Thread Andrea Bolognani
Without this tweak, the script will generate functions and code that look like virCromulentJsonFrobnicate() instead of the expected virCromulentJSONFrobnicate(), thus making it impossible to integrate the automatically generated functions with the hand-crafted ones. Signed-off-by: Andrea Bolognani

[libvirt] [RFC PATCH 2/8] tests: Add qemujson2argvtest

2019-04-01 Thread Andrea Bolognani
This is basically a copy of the existing qemuxml2argvtest, with a couple of obvious changes. We're not using most of the features at the moment, but as the JSON-based APIs evolve and get closer to feature-parity with the XML-based ones we're definitely going to need more and more of them, so we mi

[libvirt] [RFC PATCH 5/8] remote: Implement virDomainDefineJSONFlags() support

2019-04-01 Thread Andrea Bolognani
This allows us to use virDomainDefineJSONFlags() when connected to a remote hypervisor. Signed-off-by: Andrea Bolognani --- src/remote/remote_driver.c | 3 ++- src/remote/remote_protocol.x | 19 ++- src/remote_protocol-structs | 8 3 files changed, 28 insertions(+),

[libvirt] [RFC PATCH 0/8] Introduce the virDomainDefineJSONFlags() public API

2019-04-01 Thread Andrea Bolognani
Back in 2005, when the libvirt project was started, XML was pretty much the only sensible, widely used format one could use to store structured data. A lot has changed since then, and these days you'd be hard pressed to find any API that does not use JSON for encoding information; in fact, we alrea

[libvirt] [RFC PATCH 7/8] virsh: Add JSON support to the 'define' subcommand

2019-04-01 Thread Andrea Bolognani
In order not to break user expectations (and scripts!) we need to keep parsing input files as XML by default, so JSON support is implemented as opt-in through the new --json option; a brand new --xml option is also added for consistency. That said, if the name of the input file ends in .json it's

Re: [libvirt] [PATCH] qemu: fix domain unlock/unref in qemuMigrationSrcPerform

2019-04-01 Thread Ján Tomko
On Mon, Apr 01, 2019 at 01:03:00PM +0300, Nikolay Shirokovskiy wrote: qemuMigrationSrcPerform callers expect it to call virDomainObjEndAPI in any case. Signed-off-by: Nikolay Shirokovskiy --- src/qemu/qemu_migration.c | 2 ++ 1 file changed, 2 insertions(+) Reviewed-by: Ján Tomko Jano sig

[libvirt] [RFC PATCH 1/8] conf: Introduce virDomainDefParseJSONString()

2019-04-01 Thread Andrea Bolognani
We parse just enough JSON to be able to define a domain using the new API at the moment: clearly more work is needed before it can be considered a replacement for the existing XML-based APIs, but you gotta start somewhere :) Signed-off-by: Andrea Bolognani --- include/libvirt/virterror.h | 1 +

Re: [libvirt] [PATCH] qemu: fix domain unlock/unref in qemuMigrationSrcPerform

2019-04-01 Thread Michal Privoznik
On 4/1/19 12:03 PM, Nikolay Shirokovskiy wrote: qemuMigrationSrcPerform callers expect it to call virDomainObjEndAPI in any case. Signed-off-by: Nikolay Shirokovskiy --- src/qemu/qemu_migration.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_

[libvirt] [PATCH for 5.2.0] docs: Add virt-lightning app

2019-04-01 Thread Michal Privoznik
There was this introduction made on the users list: https://www.redhat.com/archives/libvirt-users/2019-March/msg00046.html Add the application onto the list of apps known to use libvirt. Signed-off-by: Michal Privoznik --- docs/apps.html.in | 6 ++ 1 file changed, 6 insertions(+) diff --g

Re: [libvirt] [PATCH v2 6/7] virsh: domstate: report detailed state if available

2019-04-01 Thread Michal Privoznik
On 4/1/19 1:14 PM, Bjoern Walk wrote: Michal Privoznik [2019-04-01, 10:49AM +0200]: On 4/1/19 10:17 AM, Bjoern Walk wrote: I intent to have the new API function superseed the existing one, so I actually want to call virDomainGetStateParams() unconditionally and only fall back to virshDomainSta

Re: [libvirt] [PATCH v2 6/7] virsh: domstate: report detailed state if available

2019-04-01 Thread Bjoern Walk
Michal Privoznik [2019-04-01, 10:49AM +0200]: > On 4/1/19 10:17 AM, Bjoern Walk wrote: > > I intent to have the new API function superseed the existing one, so I > > actually want to call virDomainGetStateParams() unconditionally and only > > fall back to virshDomainState() when the new API is not

Re: [libvirt] [PATCH v3 4/6] travis: use declarative syntax for homebrew packages

2019-04-01 Thread Andrea Bolognani
On Mon, 2019-04-01 at 12:04 +0100, Daniel P. Berrangé wrote: > On Mon, Apr 01, 2019 at 10:08:45AM +0200, Andrea Bolognani wrote: > > On Wed, 2019-03-27 at 17:10 +, Daniel P. Berrangé wrote: > > > +addons: > > > + homebrew: > > > +packages: > > > + - ccache > > > + - rpcgen > > >

Re: [libvirt] [PATCH v3 6/6] travis: put macOS script inline in the macOS matrix entry

2019-04-01 Thread Andrea Bolognani
On Wed, 2019-03-27 at 17:10 +, Daniel P. Berrangé wrote: [...] >script: > -/bin/sh -xc "$MACOS_CMD" > +# We can't run 'distcheck' or 'syntax-check' because they fail on > +# macOS, but doing 'install' and 'dist' gives us some useful coverage > +- ./autoge

Re: [libvirt] [PATCH v3 6/6] travis: put macOS script inline in the macOS matrix entry

2019-04-01 Thread Daniel P . Berrangé
On Mon, Apr 01, 2019 at 10:15:51AM +0200, Andrea Bolognani wrote: > On Wed, 2019-03-27 at 17:10 +, Daniel P. Berrangé wrote: > [...] > > @@ -48,23 +48,15 @@ matrix: > >os: osx > >env: > > - > > PATH="/usr/local/opt/gettext/bin:/usr/local/opt/ccache/libexec:/usr/local/o

Re: [libvirt] [PATCH v3 4/6] travis: use declarative syntax for homebrew packages

2019-04-01 Thread Daniel P . Berrangé
On Mon, Apr 01, 2019 at 10:08:45AM +0200, Andrea Bolognani wrote: > On Wed, 2019-03-27 at 17:10 +, Daniel P. Berrangé wrote: > > Instead of running custom commands use the new declarative syntax for > > listing extra homebrew packages. > > s/homebrew/Homebrew/g in the commit message. > > [...

Re: [libvirt] [PATCH v3 2/6] tests: add targets for building libvirt inside docker containers

2019-04-01 Thread Andrea Bolognani
On Mon, 2019-04-01 at 11:39 +0100, Daniel P. Berrangé wrote: > On Fri, Mar 29, 2019 at 05:39:59PM +0100, Andrea Bolognani wrote: > > On Wed, 2019-03-27 at 17:10 +, Daniel P. Berrangé wrote: > > > It is neccessary to disable the gnulib submodule commit check because > > > this fails due to the w

Re: [libvirt] [PATCH] apparmor: support more QEMU architectures

2019-04-01 Thread Andrea Bolognani
On Mon, 2019-04-01 at 12:27 +0200, intrigeri wrote: > Andrea Bolognani: > > Are you okay with changing the authorship email > > address so that it matches the S-o-b and pushing the patch? > > If you don't mind doing it yourself, sure, go ahead :) Done. I've actually left the authorship informati

Re: [libvirt] [PATCH v3 2/6] tests: add targets for building libvirt inside docker containers

2019-04-01 Thread Daniel P . Berrangé
On Fri, Mar 29, 2019 at 05:39:59PM +0100, Andrea Bolognani wrote: > On Wed, 2019-03-27 at 17:10 +, Daniel P. Berrangé wrote: > > The Travis CI system uses docker containers for its build environment. > > These are pre-built and hosted under quay.io/libvirt so that developers > > can use them fo

Re: [libvirt] [PATCH 14/14] virsh-completer: introduce virshPasswordCompleter

2019-04-01 Thread Erik Skultety
> + > + > +const char *builtin_passwords[] = { > +"hunter2", /* *** */ > +"nbusr123", /* Keď nevieš, tak nefušuj */ you didn't :D :D :D :D, epic! For those who are wondering what ^this gem is, Slovakia's National Security Authority (slovak acronym NBU) used

Re: [libvirt] [PATCH] apparmor: support more QEMU architectures

2019-04-01 Thread intrigeri
Andrea Bolognani: > Are you okay with changing the authorship email > address so that it matches the S-o-b and pushing the patch? If you don't mind doing it yourself, sure, go ahead :) Thanks! -- intrigeri -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinf

Re: [libvirt] [PATCH] virerror: Make error reporting prettier

2019-04-01 Thread Andrea Bolognani
On Mon, 2019-04-01 at 10:10 +0200, Michal Privoznik wrote: > So far, if something goes wrong we print an error message, e.g. > like this: > > virsh # start fedora > error: Failed to start domain fedora > error: internal error: process exited while connecting to monitor: > 2019-04-01T08:08:4

[libvirt] [PATCH] qemu: fix domain unlock/unref in qemuMigrationSrcPerform

2019-04-01 Thread Nikolay Shirokovskiy
qemuMigrationSrcPerform callers expect it to call virDomainObjEndAPI in any case. Signed-off-by: Nikolay Shirokovskiy --- src/qemu/qemu_migration.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 419a729..ce4c443 100644 --- a/src/

[libvirt] [PATCH] news: Drop empty sections

2019-04-01 Thread Andrea Bolognani
We have occasionally failed to document certain categories of changes in the release notes, yet still left the corresponding sections in the file even though they were completely empty. Signed-off-by: Andrea Bolognani --- docs/news.xml | 6 -- 1 file changed, 6 deletions(-) diff --git a/doc

Re: [libvirt] [PATCH] apparmor: support more QEMU architectures

2019-04-01 Thread Andrea Bolognani
On Mon, 2019-04-01 at 10:31 +0200, Andrea Bolognani wrote: > On Mon, 2019-04-01 at 07:41 +, intrigeri+libv...@boum.org wrote: > > From: intrigeri > > > > Add hppa, nios2, or1k, riscv32 and riscv64 to the profile. > > > > Fixes: https://bugs.debian.org/914940 > > Signed-off-by: intrigeri > >

Re: [libvirt] [PATCH 14/14] virsh-completer: introduce virshPasswordCompleter

2019-04-01 Thread Daniel P . Berrangé
On Mon, Apr 01, 2019 at 09:33:31AM +0200, Ján Tomko wrote: > Suggest some passwords to the user. > > Signed-off-by: Ján Tomko > --- > tools/virsh-completer.c | 58 + > tools/virsh-completer.h | 4 +++ > tools/virsh-domain.c| 1 + > 3 files changed, 6

Re: [libvirt] [PATCH v2 6/7] virsh: domstate: report detailed state if available

2019-04-01 Thread Michal Privoznik
On 4/1/19 10:17 AM, Bjoern Walk wrote: Michal Privoznik [2019-03-27, 02:05PM +0100]: On 3/25/19 9:04 AM, Bjoern Walk wrote: +case VIR_DOMAIN_STATE_INFO_TYPE_QEMU_S390: { +int core; +unsigned long long psw_mask; +unsigned long long psw_addr; +const char *reas

Re: [libvirt] [PATCH] apparmor: support more QEMU architectures

2019-04-01 Thread Andrea Bolognani
On Mon, 2019-04-01 at 07:41 +, intrigeri+libv...@boum.org wrote: > From: intrigeri > > Add hppa, nios2, or1k, riscv32 and riscv64 to the profile. > > Fixes: https://bugs.debian.org/914940 > Signed-off-by: intrigeri > Reviewed-by: Andrea Bolognani The fact that git authorship and S-o-b don

Re: [libvirt] [PATCH v2 6/7] virsh: domstate: report detailed state if available

2019-04-01 Thread Bjoern Walk
Michal Privoznik [2019-03-27, 02:05PM +0100]: > On 3/25/19 9:04 AM, Bjoern Walk wrote: > > +case VIR_DOMAIN_STATE_INFO_TYPE_QEMU_S390: { > > +int core; > > +unsigned long long psw_mask; > > +unsigned long long psw_addr; > > +const char *reason; > > + > > +

Re: [libvirt] [PATCH v3 6/6] travis: put macOS script inline in the macOS matrix entry

2019-04-01 Thread Andrea Bolognani
On Wed, 2019-03-27 at 17:10 +, Daniel P. Berrangé wrote: [...] > @@ -48,23 +48,15 @@ matrix: >os: osx >env: > - > PATH="/usr/local/opt/gettext/bin:/usr/local/opt/ccache/libexec:/usr/local/opt/rpcgen/bin:$PATH" > +- VIR_TEST_DEBUG=1 Since we're not running 'mak

[libvirt] [PATCH] virerror: Make error reporting prettier

2019-04-01 Thread Michal Privoznik
So far, if something goes wrong we print an error message, e.g. like this: virsh # start fedora error: Failed to start domain fedora error: internal error: process exited while connecting to monitor: 2019-04-01T08:08:49.753850Z qemu-system-x86_64: -object memory-backend-memfd,id=ram-node0,

Re: [libvirt] [PATCH v3 5/6] travis: remove display of test-suite.log from macOS

2019-04-01 Thread Andrea Bolognani
On Wed, 2019-03-27 at 17:10 +, Daniel P. Berrangé wrote: > We are not running "make check" on macOS, so the commands to cat the > test-suite.log are not useful. > > Signed-off-by: Daniel P. Berrangé > --- > .travis.yml | 9 + > 1 file changed, 1 insertion(+), 8 deletions(-) Reviewed

Re: [libvirt] [PATCH v3 4/6] travis: use declarative syntax for homebrew packages

2019-04-01 Thread Andrea Bolognani
On Wed, 2019-03-27 at 17:10 +, Daniel P. Berrangé wrote: > Instead of running custom commands use the new declarative syntax for > listing extra homebrew packages. s/homebrew/Homebrew/g in the commit message. [...] > +addons: > + homebrew: > +packages: > + - ccache > + - rpcgen

Re: [libvirt] [PATCH v3 3/6] travis: convert ubuntu, centos & mingw builds to use new make rules

2019-04-01 Thread Andrea Bolognani
On Wed, 2019-03-27 at 17:10 +, Daniel P. Berrangé wrote: > Change the travis configuration to invoke the new cibuild-$IMAGE target > instead of directly running docker. This guarantees that when a > developer runs cibuild-$IMAGE locally, the container build setup is > identical to that used in

[libvirt] [PATCH] apparmor: support more QEMU architectures

2019-04-01 Thread intrigeri+libvirt
From: intrigeri Add hppa, nios2, or1k, riscv32 and riscv64 to the profile. Fixes: https://bugs.debian.org/914940 Signed-off-by: intrigeri Reviewed-by: Andrea Bolognani --- src/security/apparmor/libvirt-qemu | 5 + 1 file changed, 5 insertions(+) diff --git a/src/security/apparmor/libvirt

[libvirt] [PATCH v2] apparmor: support more QEMU architectures

2019-04-01 Thread intrigeri+libvirt
v2 following up to Andrea Bolognani's review (thanks!) - Adds missing Signed-off-by tag - Improves commit message - Adds Reviewed-by Andrea Bolognani -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

  1   2   >