Re: [libvirt] [PATCH 02/10] util: error: Fix error message strings to play well with additional info

2018-12-05 Thread Erik Skultety
On Wed, Dec 05, 2018 at 05:47:43PM +0100, Peter Krempa wrote: > Additional information for a string is always in form of a string or > empty. Fix two offenders. One used %d as format modifier and second > always expected a string. Both are thankfully unused currently. > > Signed-off-by: Peter Kremp

Re: [libvirt] [PATCH 01/10] include: error: Add enum sentinel for virErrorNumber enum

2018-12-05 Thread Erik Skultety
On Wed, Dec 05, 2018 at 05:47:42PM +0100, Peter Krempa wrote: > We do have one for the error domain but not for the error number itself. > > Signed-off-by: Peter Krempa > --- > include/libvirt/virterror.h | 5 + > src/util/virerror.c | 1 + > 2 files changed, 6 insertions(+) Reviewed

Re: [libvirt] [PATCH 3/3] news: Mention Xen support for openvswitch

2018-12-05 Thread Michal Privoznik
On 11/16/18 11:26 PM, Jim Fehlig wrote: > Signed-off-by: Jim Fehlig > --- > docs/news.xml | 10 ++ > 1 file changed, 10 insertions(+) This will need to be rebased, but I guess you already know that. Michal -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailma

Re: [libvirt] [PATCH 2/3] xenconfig: add support for openvswitch configuration

2018-12-05 Thread Michal Privoznik
On 11/16/18 11:26 PM, Jim Fehlig wrote: > Add support for converting openvswitch interface configuration > to/from libvirt domXML and xl.cfg(5). The xl config syntax for > virtual interfaces is described in detail in the > xl-network-configuration(5) man page. The Xen Networking wiki > also contain

Re: [libvirt] [PATCH 1/3] libxl: support openvswitch interfaces

2018-12-05 Thread Michal Privoznik
On 11/16/18 11:26 PM, Jim Fehlig wrote: > It is currently possible to use s of type openvswitch > with the libxl driver in a non-standard way, e.g. > > > > > > > > This patch adds support for openvswitch s specified > in typical libvirt config > > > > > >

Re: [libvirt] [PATCH 0/3] libxl: add support for openvswitch

2018-12-05 Thread Michal Privoznik
On 11/16/18 11:26 PM, Jim Fehlig wrote: > Patch1 adds support in the driver, patch2 adds support in the > config converter, and it ends with some news... > > Jim Fehlig (3): > libxl: support openvswitch interfaces > xenconfig: add support for openvswitch configuration > news: Mention Xen sup

[libvirt] [PATCH 2/2] lxc: check actual type of interface not config type

2018-12-05 Thread Laine Stump
virLXCControllerGetNICIndexes() was deciding whether or not to add the ifindex for an interface's ifname to the list of ifindexes sent to CreateMachineWithNetwork based on the interface type stored in the config. This would be incorrect in the case of where the network was giving out macvlan inter

[libvirt] [PATCH 1/2] lxc: stop incorrectly validating interface type

2018-12-05 Thread Laine Stump
Commit 017dfa27d changed a few switch statements in the LXC code to have all possible enum values, and in the process changed the switch statement in virLXCControllerGetNICIndexes() such that it returned error status for any interfaces that weren't implemented with a veth pair when it should have j

[libvirt] [PATCH 0/2] Fix 2 small LXC network interface bugs

2018-12-05 Thread Laine Stump
(Patch 1 fixes a recently filed BZ that it just happened was easy for me to test, because I had encountered the same problem awhile back) Laine Stump (2): lxc: stop incorrectly validating interface type lxc: check actual type of interface not config type src/lxc/lxc_controller.c | 20 +++

Re: [libvirt] [PATCH for-4.0 v4 0/2] virtio: Provide version-specific variants of virtio PCI devices

2018-12-05 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20181205195704.17605-1-ehabk...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20181205195704.17605-1-ehabk...@redhat.com Subject: [libvirt] [PATCH for-4.0 v4 0/2] virtio: Provide v

[libvirt] [PATCH for-4.0 v4 1/2] virtio: Helper for registering virtio device types

2018-12-05 Thread Eduardo Habkost
Introduce a helper for registering different flavours of virtio devices. Convert code to use the helper, but keep only the existing generic types. Transitional and non-transitional device types will be added by another patch. Acked-by: Andrea Bolognani Reviewed-by: Cornelia Huck Signed-off-by:

[libvirt] [PATCH for-4.0 v4 0/2] virtio: Provide version-specific variants of virtio PCI devices

2018-12-05 Thread Eduardo Habkost
Existing modern-only device types are not being touched by v3, as they don't need separate variants. However, I plan to implement separate cleanups in the code that calls virtio_pci_force_virtio_1(), first, and then propose additional changes (e.g. deprecating disable-legacy and disable-modern in

[libvirt] [PATCH for-4.0 v4 2/2] virtio: Provide version-specific variants of virtio PCI devices

2018-12-05 Thread Eduardo Habkost
Many of the current virtio-*-pci device types actually represent 3 different types of devices: * virtio 1.0 non-transitional devices * virtio 1.0 transitional devices * virtio 0.9 ("legacy device" in virtio 1.0 terminology) That would be just an annoyance if it didn't break our device/bus compatib

Re: [libvirt] [Qemu-devel] [RFC 0/2] Attempt to implement the standby feature for assigned network devices

2018-12-05 Thread Daniel P . Berrangé
On Wed, Dec 05, 2018 at 06:09:16PM +0100, Peter Krempa wrote: > On Wed, Dec 05, 2018 at 10:18:29 -0600, Michael Roth wrote: > > Quoting Sameeh Jubran (2018-10-25 13:01:10) > > > On Thu, Oct 25, 2018 at 5:06 PM Sameeh Jubran wrote: > > > > From: Sameeh Jubran > > > > Migration support: > > > > > >

Re: [libvirt] [Qemu-devel] [RFC 0/2] Attempt to implement the standby feature for assigned network devices

2018-12-05 Thread Daniel P . Berrangé
On Wed, Dec 05, 2018 at 12:22:18PM -0500, Michael S. Tsirkin wrote: > On Wed, Dec 05, 2018 at 06:09:16PM +0100, Peter Krempa wrote: > > From managements point of view, bundling all this together is really not > > a good idea since it creates a very big matrix of failure scenarios. > > I think this

Re: [libvirt] [Qemu-devel] [RFC 0/2] Attempt to implement the standby feature for assigned network devices

2018-12-05 Thread Michael S. Tsirkin
On Wed, Dec 05, 2018 at 06:09:16PM +0100, Peter Krempa wrote: > From managements point of view, bundling all this together is really not > a good idea since it creates a very big matrix of failure scenarios. I think this is clear. This is why we are doing it in QEMU where we can actually do all th

Re: [libvirt] [Qemu-devel] [RFC 0/2] Attempt to implement the standby feature for assigned network devices

2018-12-05 Thread Peter Krempa
On Wed, Dec 05, 2018 at 10:18:29 -0600, Michael Roth wrote: > Quoting Sameeh Jubran (2018-10-25 13:01:10) > > On Thu, Oct 25, 2018 at 5:06 PM Sameeh Jubran wrote: > > > From: Sameeh Jubran > > > Migration support: > > > > > > Pre migration or during setup phase of the migration we should send an

[libvirt] [PATCH 10/10] tests: virerror: Make sure that error messages stay in correct order

2018-12-05 Thread Peter Krempa
Since we don't look up the error message according to the error code but they have to be in the correct order in virErrorMsgStrings, we need to make sure that they stay in the correct order. Signed-off-by: Peter Krempa --- tests/virerrortest.c | 20 1 file changed, 20 insert

[libvirt] [PATCH 05/10] tests: Add test for virErrorMsg message constraints

2018-12-05 Thread Peter Krempa
Make sure that we don't add any broken error message strings any more. This ensures that both the version with and without additional info is populated, the version without info does not have any formatting modifiers and the version with info has exactly one. Signed-off-by: Peter Krempa --- tes

[libvirt] [PATCH 07/10] DO NOT PUSH: Make sure that error messages are not moved around

2018-12-05 Thread Peter Krempa
Add a virerrortest case that makes sure that all error messages stay the same while refactoring. This patch will not be pushed upstream to avoid polluting the git history. --- tests/virerrormessages.txt | 101 + tests/virerrortest.c | 25 + 2 file

[libvirt] [PATCH 08/10] util: error: Use a more declarative approach in virErrorMsg

2018-12-05 Thread Peter Krempa
Use a macro to declare how the strings for individual error codes. This unifies the used condition and will allow simplifying the code further. Signed-off-by: Peter Krempa --- src/libvirt_private.syms | 1 + src/util/virerror.c | 792 +-- src/util/virer

[libvirt] [PATCH 06/10] util: error: Improve docs for virErrorMsg

2018-12-05 Thread Peter Krempa
Clarify how @info is used and how the returned values look like. Signed-off-by: Peter Krempa --- src/util/virerror.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/util/virerror.c b/src/util/virerror.c index be23712a60..7444d671bb 100644 --- a/src/util/virerro

[libvirt] [PATCH 04/10] util: error: Export virErrorMsg for use in testsuite

2018-12-05 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/Makefile.am | 1 + src/libvirt_private.syms | 1 + src/util/Makefile.inc.am | 1 + src/util/virerror.c | 5 - src/util/virerrorpriv.h | 28 5 files changed, 35 insertions(+), 1 deletion(-) create mode 100644

[libvirt] [PATCH 03/10] util: error: Add error message versions with info for some error codes

2018-12-05 Thread Peter Krempa
Few error codes were missing the version of the message with additional info. In case of the modified messages it's not very likely they'll ever report any additional data, but for the sake of consistency we'll provide them. Signed-off-by: Peter Krempa --- src/util/virerror.c | 15 --

[libvirt] [PATCH 00/10] error: Refactor error message string convertor and add tests

2018-12-05 Thread Peter Krempa
Make sure that all the error messages have both versions (info and non-info) and store them in a sorted array rather than a giant switch. Patch 7/10 adds a test that ensures that no messages were harmed during the refactor. That commit will not be pushed (along with the corresponding revert) to av

[libvirt] [PATCH 09/10] Revert "DO NOT PUSH: Make sure that error messages are not moved around"

2018-12-05 Thread Peter Krempa
This reverts commit 8bce541955c7427ee78c4f6aac7a07808640fdaa. --- tests/virerrormessages.txt | 101 - tests/virerrortest.c | 25 - 2 files changed, 126 deletions(-) delete mode 100644 tests/virerrormessages.txt diff --git a/tests/virerrormessage

[libvirt] [PATCH 01/10] include: error: Add enum sentinel for virErrorNumber enum

2018-12-05 Thread Peter Krempa
We do have one for the error domain but not for the error number itself. Signed-off-by: Peter Krempa --- include/libvirt/virterror.h | 5 + src/util/virerror.c | 1 + 2 files changed, 6 insertions(+) diff --git a/include/libvirt/virterror.h b/include/libvirt/virterror.h index 57aadb

[libvirt] [PATCH 02/10] util: error: Fix error message strings to play well with additional info

2018-12-05 Thread Peter Krempa
Additional information for a string is always in form of a string or empty. Fix two offenders. One used %d as format modifier and second always expected a string. Both are thankfully unused currently. Signed-off-by: Peter Krempa --- src/util/virerror.c | 10 -- 1 file changed, 8 insertio

Re: [libvirt] [Qemu-devel] [RFC 0/2] Attempt to implement the standby feature for assigned network devices

2018-12-05 Thread Michael Roth
Quoting Sameeh Jubran (2018-10-25 13:01:10) > On Thu, Oct 25, 2018 at 5:06 PM Sameeh Jubran wrote: > > > > From: Sameeh Jubran > > > > Hi all, > > > > Background: > > > > There has been a few attempts to implement the standby feature for vfio > > assigned devices which aims to enable the migratio

Re: [libvirt] [PATCH] qemu: Add support for postcopy-requests migration statistics

2018-12-05 Thread Ján Tomko
On Fri, Nov 16, 2018 at 02:32:33PM +0100, Jiri Denemark wrote: QEMU can report how many times during post-copy migration the domain running on the destination host tried to access a page which has not been migrated yet. Signed-off-by: Jiri Denemark --- include/libvirt/libvirt-domain.h | 10

Re: [libvirt] [PATCH 0/5] Various cleanups and fixes (blockdev-add saga)

2018-12-05 Thread Ján Tomko
On Wed, Dec 05, 2018 at 02:20:11PM +0100, Peter Krempa wrote: Few random patches extracted from my blockdev series. Peter Krempa (5): tests: qemuxml2xml: Add few debug statements for status XML testing util: xml: Always consume args of virXMLFormatElement qemu: domain: Initialize proper eleme

[libvirt] [PATCH 0/5] Various cleanups and fixes (blockdev-add saga)

2018-12-05 Thread Peter Krempa
Few random patches extracted from my blockdev series. Peter Krempa (5): tests: qemuxml2xml: Add few debug statements for status XML testing util: xml: Always consume args of virXMLFormatElement qemu: domain: Initialize proper element in qemuDomainPrepareStorageSourceBlockdev conf: snap

[libvirt] [PATCH 5/5] tests: qemuxml2argv: Remove disks from few tests which don't need them

2018-12-05 Thread Peter Krempa
Remove the disk from tests focusing on other aspects so that change to -blockdev will touch less tests. Signed-off-by: Peter Krempa --- .../channel-unix-guestfwd.x86_64-2.5.0.args | 2 -- .../channel-unix-guestfwd.x86_64-latest.args| 2 -- tests/qemuxml2argvdata/c

[libvirt] [PATCH 1/5] tests: qemuxml2xml: Add few debug statements for status XML testing

2018-12-05 Thread Peter Krempa
Add markers for allowing test debugging if one of the steps fails without setting a proper error. Signed-off-by: Peter Krempa --- tests/qemuxml2xmltest.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 25ab990a4

[libvirt] [PATCH 4/5] conf: snapshot: Remove file format check from parser

2018-12-05 Thread Peter Krempa
We already have a way stricter check in the code which is doing the snapshot so duplicating it in the parser does not make much sense. Also gets rid of an ugly ternary operator. Signed-off-by: Peter Krempa --- src/conf/snapshot_conf.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletio

[libvirt] [PATCH 2/5] util: xml: Always consume args of virXMLFormatElement

2018-12-05 Thread Peter Krempa
The function clears and frees the passed buffers on success, but not in one case of failure. Modify the control flow that the args are always consumed, record it in the docs and remove few pointless cleanup paths in callers. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 12 ++-

[libvirt] [PATCH 3/5] qemu: domain: Initialize proper element in qemuDomainPrepareStorageSourceBlockdev

2018-12-05 Thread Peter Krempa
We are preparing a certain disk source passed in as '@src' so the individual functions should use that rather than disk->src which corresponds to the top level element of the chain only. Without this change TLS and persistent reservations would not work for backing images of a chain when using -bl

Re: [libvirt] [PATCH v2] qemuDomainRemoveRNGDevice: Remove associated chardev too

2018-12-05 Thread Ján Tomko
On Tue, Dec 04, 2018 at 04:06:50PM +0100, Michal Privoznik wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1656014 An RNG device can consists of more devices than RND device itself. For instance, in case of EGD there is a chardev that connects to EGD daemon and feeds the qemu with random data

Re: [libvirt] [PATCH libvirt-python] virNodeInfo.memory is in KiB

2018-12-05 Thread Philipp Hahn
Hello Daniel, Am 05.12.18 um 13:10 schrieb Daniel P. Berrangé: > On Wed, Dec 05, 2018 at 01:01:13PM +0100, Philipp Hahn wrote: >> but the Python library does an extra left shift of 10 bits returning MiB >> instead: ... >>> # ./a.out >>> 4041088 >> >>> # python -c 'import >>> libvirt;c=libvirt.op

Re: [libvirt] [PATCH RFC v2] qemu: fix deadlock when waiting in non async jobs

2018-12-05 Thread Nikolay Shirokovskiy
ping On 18.10.2018 11:55, Nikolay Shirokovskiy wrote: > > > On 17.10.2018 23:04, John Ferlan wrote: >> >> >> On 10/16/18 3:22 AM, Nikolay Shirokovskiy wrote: >>> >>> >>> On 16.10.2018 03:00, John Ferlan wrote: On 10/8/18 4:10 AM, Nikolay Shirokovskiy wrote: > Block job abort o

Re: [libvirt] [PATCH libvirt-python] virNodeInfo.memory is in KiB

2018-12-05 Thread Daniel P . Berrangé
On Wed, Dec 05, 2018 at 01:01:13PM +0100, Philipp Hahn wrote: > but the Python library does an extra left shift of 10 bits returning MiB > instead: > > > # cat y.c > > #include > > #include > > #include > > int main(void) { > > virConnectPtr conn = virConnectOpen("qemu:///system"); > >

[libvirt] [PATCH libvirt-python] virNodeInfo.memory is in KiB

2018-12-05 Thread Philipp Hahn
but the Python library does an extra left shift of 10 bits returning MiB instead: > # cat y.c > #include > #include > #include > int main(void) { > virConnectPtr conn = virConnectOpen("qemu:///system"); > virNodeInfo info; > int rv = virNodeGetInfo(conn, &info); >

Re: [libvirt] [PATCH] Fix minor typos in messages and docs

2018-12-05 Thread Ján Tomko
From 89a859c1229283cdb8d8e877ee1a81972f7e5af1 Mon Sep 17 00:00:00 2001 From: Yuri Chornoivan Date: Tue, 4 Dec 2018 19:08:14 +0200 Subject: [PATCH] Fix minor typos in messages and docs Signed-off-by: Yuri Chornoivan --- config-post.h | 2 +- include/libvirt/libvirt-even