[PATCH v4 4/4] tests: update LXC config dataset to support V3 indexes

2020-02-02 Thread Julio Faracco
LXC version 3 config files are still using network old style definition. So, as LXC supports it now, they can be converted to use this new definition. Signed-off-by: Julio Faracco --- .../lxcconf2xml-ethernet-v3.config| 16 - .../lxcconf2xml-fstab-v3.config |

[PATCH v4 3/4] lxc: remove domain definition from lxc network struct

2020-02-02 Thread Julio Faracco
Domain definition is useless now inside network structure. This pointer was required because new network definition was being added each time that a new network type appeared. So, this should be processed into old function `lxcNetworkParseDataType()`. Now, as it was moved to an array, it can be

[PATCH v4 2/4] lxc: add LXC version 3 network parser

2020-02-02 Thread Julio Faracco
LXC version 3 or higher introduced indexes for network interfaces. Libvirt should be able to parse entries like `lxc.net.2.KEY`. This commit adds functions to parse this type of field. That's why array structures are so important this time. Signed-off-by: Julio Faracco --- src/lxc/lxc_native.c

[PATCH v4 0/4] This series implement support for network syntax settings for LXC 3.X.

2020-02-02 Thread Julio Faracco
Old: lxc.network.type = veth lxc.network.flags = up lxc.network.link = virbr0 New: lxc.net.0.type = veth lxc.net.0.flags = up lxc.net.0.link = virbr0 v1-v2: Moving sscanf to virStrToLong_ull according Daniel's suggestion. v2-v3: Adding missing g_autofree from `suffix` variable. v2-v4: Removing

[PATCH v4 1/4] lxc: refactor lxcNetworkParseData pointers to use new structures

2020-02-02 Thread Julio Faracco
Struct lxcNetworkParseData is being used as a single pointer which iterates through LXC config lines. It means that it will be applied as a network each time that a new type appears. After, the same struct is used to populate a new network interface. This commit changes this logic to multiple

Re: [PATCH 0/5] Add support for SPAPR vTPM for pSeries VM

2020-02-02 Thread Marc-André Lureau
On Fri, Jan 31, 2020 at 10:17 PM Stefan Berger wrote: > > QEMU 5.0 will have SPAPR vTPM support. This series of patches > adds support for the XML and command line creation of the > SPAPR vTPM for pSeries VMs along with test cases. > > Regards, >Stefan > > Stefan Berger (5): > conf: Add

[libvirt PATCH 2/4] qemu: tpm: use g_autofree

2020-02-02 Thread Ján Tomko
Mark eligible declarations as g_autofree and remove the corresponding VIR_FREE calls. Signed-off-by: Ján Tomko --- src/qemu/qemu_tpm.c | 30 ++ 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/src/qemu/qemu_tpm.c b/src/qemu/qemu_tpm.c index

[libvirt PATCH 3/4] qemu: tpm: use g_autoptr where applicable

2020-02-02 Thread Ján Tomko
This requires stealing one cmd pointer before returning it. Signed-off-by: Ján Tomko --- src/qemu/qemu_tpm.c | 26 -- 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/src/qemu/qemu_tpm.c b/src/qemu/qemu_tpm.c index cfe7eb1846..f9cea2ffde 100644 ---

[libvirt PATCH 4/4] qemu: tpm: remove unused labels

2020-02-02 Thread Ján Tomko
Remove all the labels that are now redundant. Signed-off-by: Ján Tomko --- src/qemu/qemu_tpm.c | 74 + 1 file changed, 27 insertions(+), 47 deletions(-) diff --git a/src/qemu/qemu_tpm.c b/src/qemu/qemu_tpm.c index f9cea2ffde..f3562d7dfe 100644 ---

[libvirt PATCH 1/4] qemu: tpm: remove unused pidfile variable

2020-02-02 Thread Ján Tomko
qemuExtTPMSetupCgroup declares pidfile but never uses it. Signed-off-by: Ján Tomko --- src/qemu/qemu_tpm.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/qemu/qemu_tpm.c b/src/qemu/qemu_tpm.c index 6741373583..385f4c74f7 100644 --- a/src/qemu/qemu_tpm.c +++ b/src/qemu/qemu_tpm.c @@

[libvirt PATCH 0/4] qemu: tpm: use g_auto

2020-02-02 Thread Ján Tomko
Ján Tomko (4): qemu: tpm: remove unused pidfile variable qemu: tpm: use g_autofree qemu: tpm: use g_autoptr where applicable qemu: tpm: remove unused labels src/qemu/qemu_tpm.c | 130 +++- 1 file changed, 44 insertions(+), 86 deletions(-) --

[libvirt PATCH 3/3] virBufferTrim: do not accept len

2020-02-02 Thread Ján Tomko
Always trim the full specified suffix. All of the callers outside of tests were passing either strlen or the actual length of the string. Signed-off-by: Ján Tomko --- src/conf/domain_addr.c | 2 +- src/conf/domain_conf.c | 6 +++--- src/cpu/cpu_x86.c | 6 +++---

[libvirt PATCH 2/3] Use virBufferTrimLen when applicable

2020-02-02 Thread Ján Tomko
Replace all the cases that only supply the length and do not care about matching a suffix, as well as that one test case that does. Signed-off-by: Ján Tomko --- src/lxc/lxc_container.c | 2 +- tests/virbuftest.c | 6 +++--- tools/vsh.c | 2 +- 3 files changed, 5 insertions(+),

[libvirt PATCH 1/3] util: introduce virBufferTrimLen

2020-02-02 Thread Ján Tomko
Just like the existing virBufferTrim, but only does one thing at a time. Signed-off-by: Ján Tomko --- src/libvirt_private.syms | 1 + src/util/virbuffer.c | 19 +++ src/util/virbuffer.h | 1 + 3 files changed, 21 insertions(+) diff --git a/src/libvirt_private.syms

[libvirt PATCH 0/3] Clean up usage of virBufferTrim

2020-02-02 Thread Ján Tomko
Before it was possible to supply a matching suffix, a length of chars to trim, or both. However the combination of the two was only used in tests. Split the function into two. Ján Tomko (3): util: introduce virBufferTrimLen Use virBufferTrimLen when applicable virBufferTrim: do not accept

Re: [PATCH 2/7] tests: Drop viratomictest

2020-02-02 Thread Ján Tomko
On Sat, Feb 01, 2020 at 07:33:44AM +0100, Michal Privoznik wrote: In future commits our virAtomic* APIs will be replaced with their GLib variants. Instead of trying to update the test after each commit and eventually removing the test anyway, remove it upfront and save the hassle.

Re: [PATCH 7/7] Drop virAtomic module

2020-02-02 Thread Ján Tomko
On Sat, Feb 01, 2020 at 07:33:49AM +0100, Michal Privoznik wrote: Now, that every use of virAtomic was replaced with its g_atomic s/,// equivalent, let's remove the module. Signed-off-by: Michal Privoznik --- configure.ac | 1 - m4/virt-atomic.m4 | 77

Re: [PATCH 6/7] src: Drop virAtomicIntDecAndTest() with g_atomic_int_dec_and_test()

2020-02-02 Thread Ján Tomko
On Sat, Feb 01, 2020 at 07:33:48AM +0100, Michal Privoznik wrote: Signed-off-by: Michal Privoznik --- src/libxl/libxl_domain.c | 2 +- src/lxc/lxc_process.c | 2 +- src/nwfilter/nwfilter_dhcpsnoop.c | 8 src/qemu/qemu_process.c | 2 +-

Re: [PATCH 5/7] src: Replace virAtomicIntInc() with g_atomic_int_add()

2020-02-02 Thread Ján Tomko
On Sat, Feb 01, 2020 at 07:33:47AM +0100, Michal Privoznik wrote: Signed-off-by: Michal Privoznik --- src/libxl/libxl_domain.c | 2 +- src/libxl/libxl_driver.c | 2 +- src/lxc/lxc_process.c | 4 ++-- src/nwfilter/nwfilter_dhcpsnoop.c | 10 +-

Re: [PATCH 4/7] src: Replace virAtomicIntSet() with g_atomic_int_set()

2020-02-02 Thread Ján Tomko
On Sat, Feb 01, 2020 at 07:33:46AM +0100, Michal Privoznik wrote: Signed-off-by: Michal Privoznik --- src/nwfilter/nwfilter_dhcpsnoop.c | 2 +- src/test/test_driver.c| 4 ++-- src/util/viratomic.h | 9 - src/util/virobject.c | 2 +-

Re: [PATCH 3/7] src: Replace virAtomicIntGet() with g_atomic_int_get()

2020-02-02 Thread Ján Tomko
On Sat, Feb 01, 2020 at 07:33:45AM +0100, Michal Privoznik wrote: Signed-off-by: Michal Privoznik --- src/nwfilter/nwfilter_dhcpsnoop.c | 12 ++-- src/util/viratomic.h | 9 - src/util/virsystemd.c | 6 +++--- 3 files changed, 9 insertions(+), 18

Re: [PATCH 1/7] test_driver: Replace virAtomicIntAdd() with virAtomicIntInc()

2020-02-02 Thread Ján Tomko
On Sat, Feb 01, 2020 at 07:33:43AM +0100, Michal Privoznik wrote: Instead of calling virAtomicIntAdd(, 1); we can call virAtomicIntInc() directly. Signed-off-by: Michal Privoznik --- src/test/test_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH 1/5] conf: Add support for tpm-spapr to domain XML

2020-02-02 Thread Ján Tomko
On Fri, Jan 31, 2020 at 04:17:39PM -0500, Stefan Berger wrote: From: Stefan Berger This patch adds support for the tpm-spapr device model for ppc64. The XML for this type of TPM looks as follows: Extend the documentation. Signed-off-by: Stefan Berger --- docs/formatdomain.html.in

Re: [libvirt PATCH 3/5] cpu: Add the kvm-no-adjvtime CPU feature

2020-02-02 Thread Ján Tomko
On Fri, Jan 31, 2020 at 05:39:50PM +0100, Andrea Bolognani wrote: The feature is currently available on ARM only, and so it only needs to be known to the corresponding CPU driver. Signed-off-by: Andrea Bolognani --- src/cpu_map/arm_features.xml | 3 +++ 1 file changed, 3 insertions(+) diff

Re: [libvirt PATCH 4/5] qemu: Validate the kvm-no-adjvtime CPU feature

2020-02-02 Thread Ján Tomko
On Fri, Jan 31, 2020 at 05:39:51PM +0100, Andrea Bolognani wrote: Error out if the QEMU binary doesn't support it. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_domain.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_domain.c

Re: [libvirt PATCH 2/5] qemu: Add the QEMU_CAPS_CPU_KVM_NO_ADJVTIME capability

2020-02-02 Thread Ján Tomko
On Fri, Jan 31, 2020 at 05:39:49PM +0100, Andrea Bolognani wrote: We will use this capability to detect whether the QEMU binary supports the kvm-no-adjvtime CPU feature. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h

Re: [libvirt PATCH 1/5] tests: Add capabilities for QEMU 5.0.0 on aarch64

2020-02-02 Thread Ján Tomko
On Fri, Jan 31, 2020 at 05:39:48PM +0100, Andrea Bolognani wrote: This is the first QEMU version that supports the kvm-no-adjvtime CPU feature. s/is/will be/ s/supports/will support/ Signed-off-by: Andrea Bolognani FYI the sign-off is not present in the version you pushed to gitlab.

[libvirt PATCH] rpc: gendispatch: trim Flags from the return struct name

2020-02-02 Thread Ján Tomko
This lets it generate the remote dispatch for StorageVolGetInfoFlags. Signed-off-by: Ján Tomko --- src/remote/remote_daemon_dispatch.c | 35 - src/remote/remote_protocol.x| 2 +- src/rpc/gendispatch.pl | 1 + 3 files changed, 2 insertions(+),

Re: [libvirt PATCH v2 39/56] util: import an event loop impl based on GMainContext

2020-02-02 Thread Ján Tomko
On Tue, Jan 28, 2020 at 01:11:20PM +, Daniel P. Berrangé wrote: The libvirt-glib project has provided a GMainContext based event loop impl for applications. This imports it and sets it up for use by libvirt as the primary event loop. This remains a private impl detail of libvirt. IOW,