Re: [libvirt] [PATCH 0/5] Cleanup some storage driver paths

2018-09-20 Thread Michal Privoznik
On 09/12/2018 06:08 PM, John Ferlan wrote: > See the patches for details - everything leads to the last one. > > John Ferlan (5): > storage: Clean up stateFile if refreshPool fails > storage: Clean up storagePoolUpdateStateCallback processing > storage: Create error label path for storagePoo

Re: [libvirt] [PATCH 4/5] storage: Introduce storagePoolRefreshFailCleanup

2018-09-20 Thread Michal Privoznik
On 09/12/2018 06:09 PM, John Ferlan wrote: > Create a common pool refresh failure handling method as the > same code is repeated multiple times. > > Signed-off-by: John Ferlan > --- > src/storage/storage_driver.c | 38 +--- > 1 file changed, 18 insertions(+), 20 d

Re: [libvirt] [Qemu-devel] [QEMU PATCH] net: Deprecate the old way of using a legacy net via "name" instead of "id"

2018-09-20 Thread Thomas Huth
On 2018-09-20 08:07, Markus Armbruster wrote: > Thomas Huth writes: > >> In early times, network backends were specified by a "vlan" and "name" >> tuple. With the introduction of netdevs, the "name" was replaced by an >> "id" (which is supposed to be unique), but the "name" parameter stayed >> as

Re: [libvirt] [PATCH 03/47] vircgroup: extract virCgroupV1Available

2018-09-20 Thread Pavel Hrdina
On Thu, Sep 20, 2018 at 08:28:53AM +0200, Fabiano Fidêncio wrote: > On Tue, Sep 18, 2018 at 5:45 PM, Pavel Hrdina wrote: > > > Signed-off-by: Pavel Hrdina > > --- > > src/util/vircgroup.c| 28 +--- > > src/util/vircgroupbackend.h | 7 +++ > > src/util/vircgr

Re: [libvirt] [PATCH 04/47] vircgroup: detect available backend for cgroup

2018-09-20 Thread Pavel Hrdina
On Thu, Sep 20, 2018 at 08:28:57AM +0200, Fabiano Fidêncio wrote: > On Tue, Sep 18, 2018 at 5:45 PM, Pavel Hrdina wrote: > > > We need to update one test-case because now new cgroup object will be > > created only if there is any cgroup backend available. > > > > Signed-off-by: Pavel Hrdina > >

Re: [libvirt] [PATCH 2/2] libxl: fallback to lib probe if pkgconfig file not found

2018-09-20 Thread Andrea Bolognani
On Thu, 2018-09-20 at 08:30 +0200, Michal Privoznik wrote: > On 09/19/2018 08:59 PM, Jim Fehlig wrote: > > + dnl In Fedora <= 28, the xenlight pkgconfig file is in the > > -runtime package > > + dnl https://bugzilla.redhat.com/show_bug.cgi?id=1629643 > > + dnl Until Fedora 28 reaches EOL, fallba

Re: [libvirt] [PATCH 20/47] vircgroup: extract virCgroupV1SetOwner

2018-09-20 Thread Pavel Hrdina
On Thu, Sep 20, 2018 at 08:29:56AM +0200, Fabiano Fidêncio wrote: > On Tue, Sep 18, 2018 at 5:45 PM, Pavel Hrdina wrote: > > > Signed-off-by: Pavel Hrdina > > --- > > src/util/vircgroup.c| 54 +- > > src/util/vircgroupbackend.h | 7 > > src/util/vircgro

Re: [libvirt] [PATCH 47/47] vircgroup: rename controllers to legacy

2018-09-20 Thread Pavel Hrdina
On Thu, Sep 20, 2018 at 08:31:52AM +0200, Fabiano Fidêncio wrote: > On Tue, Sep 18, 2018 at 5:46 PM, Pavel Hrdina wrote: > > > Signed-off-by: Pavel Hrdina > > > > Pavel, > > I'm not sure what your next series is doing but why renaming the > controllers to legacy? Right, I forget to add some r

Re: [libvirt] [PATCH 04/47] vircgroup: detect available backend for cgroup

2018-09-20 Thread Fabiano Fidêncio
On Thu, Sep 20, 2018 at 10:03 AM, Pavel Hrdina wrote: > On Thu, Sep 20, 2018 at 08:28:57AM +0200, Fabiano Fidêncio wrote: > > On Tue, Sep 18, 2018 at 5:45 PM, Pavel Hrdina > wrote: > > > > > We need to update one test-case because now new cgroup object will be > > > created only if there is any

Re: [libvirt] [PATCH 47/47] vircgroup: rename controllers to legacy

2018-09-20 Thread Fabiano Fidêncio
On Thu, Sep 20, 2018 at 10:11 AM, Pavel Hrdina wrote: > On Thu, Sep 20, 2018 at 08:31:52AM +0200, Fabiano Fidêncio wrote: > > On Tue, Sep 18, 2018 at 5:46 PM, Pavel Hrdina > wrote: > > > > > Signed-off-by: Pavel Hrdina > > > > > > > Pavel, > > > > I'm not sure what your next series is doing but

Re: [libvirt] [PATCH v5 07/13] conf: Introduce parser, formatter for uid and fid

2018-09-20 Thread Andrea Bolognani
On Wed, 2018-09-19 at 16:59 +0800, Yi Min Zhao wrote: > 在 2018/9/13 下午9:58, Andrea Bolognani 写道: > > I realize now that virPCIDeviceAddressIsValid() and > > virPCIDeviceAddressIsEmpty() are *not* in util/virpci, though I > > swear that I posted patches moving them over... My bad, I'll do > > that r

[libvirt] [PATCH v2 3/4] net/slirp: Deprecate the [hub_id name] parameter tuple

2018-09-20 Thread Thomas Huth
The "name" in the [hub_id name] parameter tuple is the same as a "netdev_id" (which should be unique), so specifying the hub_id here is just redundant (it was likely just necessary in the past when the network subsystem was still using "vlans" only and when it did not use unique "id"s yet). Signed

[libvirt] [PATCH v2 1/4] Makefile: Add missing dependency for qemu-deprecated.texi

2018-09-20 Thread Thomas Huth
Make sure that the docs get correctly regenerated when the file qemu-deprecated.texi has been changed. Fixes: 44c67847e32c91a6071fb0440c357b9489f08bc6 Signed-off-by: Thomas Huth --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index fe623e4..f4

[libvirt] [PATCH v2 2/4] net: Deprecate the "name" parameter of -net

2018-09-20 Thread Thomas Huth
In early times, network backends were specified by a "vlan" and "name" tuple. With the introduction of netdevs, the "name" was replaced by an "id" (which is supposed to be unique), but the "name" parameter stayed as an alias which could be used instead of "id". Unfortunately, we miss the duplicati

[libvirt] [QEMU PATCH v2 0/4] Deprecation patches net and enforce-config-section

2018-09-20 Thread Thomas Huth
Deprecate the "name" parameter for -net, and "enforce-config-section" of -machine. v2: - Split the single net patch into multiple smaller patches - Add patch to deprecate enforce-config-section Thomas Huth (4): Makefile: Add missing dependency for qemu-deprecated.texi net: Deprecate the "na

[libvirt] [PATCH v2 4/4] hw/core/machine: Officially deprecate the enforce-config-section parameter

2018-09-20 Thread Thomas Huth
Commit 16f7244842b5135543ef068a1adafd94c6965953 added this parameter to the documentation, including a note that it is deprecated. But it has never been added to the "Deprecated features" appendix, which is our official way to deprecate legacy parameters. So let's do this now. Signed-off-by: Thoma

[libvirt] what determines the type of virtual NIC in libvirt (veth or tap)?

2018-09-20 Thread Frank Wang
Hi All, I'd like to know what determines the type of virtual NIC in libvirt ? There was a problem I encountered, the vm can't get the mirror traffic while the virtual port in openvswitch is veth, If the virtual port is tun, the everything is fine. [root@allinone-247 ~]# ethtool -i vn62f717800

[libvirt] [PATCH v2 7/9] vircgroupmock: rewrite cgroup fopen mocking

2018-09-20 Thread Pavel Hrdina
Move all the cgroup data into separate files out of vircgroupmock.c and rework the fopen function to load data from files. This will make it easier to add more test cases. Reviewed-by: Fabiano Fidêncio Signed-off-by: Pavel Hrdina --- tests/vircgroupdata/all-in-one.cgroups | 7 ++ tests/v

[libvirt] [PATCH v2 1/9] vircgroup: cleanup controllers not managed by systemd on error

2018-09-20 Thread Pavel Hrdina
If virCgroupEnableMissingControllers() fails it could already create some directories, we should clean it up as well. Reviewed-by: Fabiano Fidêncio Signed-off-by: Pavel Hrdina --- src/util/vircgroup.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git

[libvirt] [PATCH v2 6/9] vircgroupmock: cleanup unused cgroup files

2018-09-20 Thread Pavel Hrdina
Reviewed-by: Fabiano Fidêncio Signed-off-by: Pavel Hrdina --- tests/vircgroupmock.c | 73 --- 1 file changed, 73 deletions(-) diff --git a/tests/vircgroupmock.c b/tests/vircgroupmock.c index d512417789..73cf876645 100644 --- a/tests/vircgroupmock.c +++ b/

[libvirt] [PATCH v2 4/9] vircgroup: introduce virCgroupTaskFlags

2018-09-20 Thread Pavel Hrdina
Use flags in virCgroupAddTaskInternal instead of boolean parameter. Following patch will add new flag to indicate thread instead of process. Signed-off-by: Pavel Hrdina --- Notes: changes in v2: - added comments for new flags src/util/vircgroup.c | 24 1 fi

[libvirt] [PATCH v2 0/9] cgroup cleanups and preparation for v2

2018-09-20 Thread Pavel Hrdina
Pavel Hrdina (9): vircgroup: cleanup controllers not managed by systemd on error vircgroup: fix bug in virCgroupEnableMissingControllers vircgroup: rename virCgroupAdd.*Task to virCgroupAdd.*Process vircgroup: introduce virCgroupTaskFlags vircgroup: introduce virCgroupAddThread vircgrou

[libvirt] [PATCH v2 3/9] vircgroup: rename virCgroupAdd.*Task to virCgroupAdd.*Process

2018-09-20 Thread Pavel Hrdina
In cgroup v2 we need to handle processes and threads differently, following patch will introduce virCgroupAddThread. Reviewed-by: Fabiano Fidêncio Signed-off-by: Pavel Hrdina --- src/libvirt-lxc.c| 2 +- src/libvirt_private.syms | 4 ++-- src/lxc/lxc_controller.c | 4 ++-- src/qemu/q

[libvirt] [PATCH v2 2/9] vircgroup: fix bug in virCgroupEnableMissingControllers

2018-09-20 Thread Pavel Hrdina
If we are on host with systemd we need to build cgroup hierarchy ourselves for controllers that are not managed by systemd. As a starting parent we need to force root group because virCgroupMakeGroup() takes that parent in order to inherit values for cpuset controller. By default cpuset controlle

[libvirt] [PATCH v2 9/9] vircgrouptest: call virCgroupNewSelf instead virCgroupDetectMounts

2018-09-20 Thread Pavel Hrdina
This will be required once cgroup v2 is introduced. The cgroup detection is not simple and we will have multiple backends so we should not just jump into the middle of the detection code. In order to use virCgroupNewSelf we need to create all the remaining data files: - {name}.cgroups repres

[libvirt] [PATCH v2 5/9] vircgroup: introduce virCgroupAddThread

2018-09-20 Thread Pavel Hrdina
Once we introduce cgroup v2 support we need to handle processes and threads differently. Signed-off-by: Pavel Hrdina --- Notes: changes in v2: - added comment for new flag src/libvirt_private.syms | 1 + src/qemu/qemu_process.c | 2 +- src/util/vircgroup.c | 32 +

[libvirt] [PATCH v2 8/9] vircgrouptest: call virCgroupDetectMounts directly

2018-09-20 Thread Pavel Hrdina
Because we can set which files to return for cgroup tests there is no need to have special function tailored to run tests. Reviewed-by: Fabiano Fidêncio Signed-off-by: Pavel Hrdina --- src/libvirt_private.syms | 2 +- src/util/vircgroup.c | 21 + src/util/vircgrouppriv.

Re: [libvirt] [PATCHv2 1/4] util: Introduce monitor capability interface

2018-09-20 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Wednesday, September 19, 2018 3:39 AM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Niu, Bing ; > Ding, Jian-feng ; Zang, Rui > Subject: Re: [PATCHv2 1/4] util: Introduce monitor capability

Re: [libvirt] [PATCHv2 4/4] conf: Introduce RDT monitor host capability

2018-09-20 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Wednesday, September 19, 2018 3:47 AM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Niu, Bing ; > Ding, Jian-feng ; Zang, Rui > Subject: Re: [PATCHv2 4/4] conf: Introduce RDT monitor host c

[libvirt] [PATCHv3 0/4] Introduce x86 RDT (CMT&MBM) host capability

2018-09-20 Thread Wang Huaqiang
This series of patches introduced the x86 Cache Monitoring Technology (CMT) to libvirt by interacting with kernel resource control (resctrl) interface. CMT is one of the Intel(R) x86 CPU feature which belongs to the Resource Director Technology (RDT). CMT reports the occupancy of the last level cac

[libvirt] [PATCHv3 2/4] conf: Refactor cache bank capability structure

2018-09-20 Thread Wang Huaqiang
Move all cache banks into one data structure, this allows us to add other cache component, such as cache monitor. Signed-off-by: Wang Huaqiang Reviewed-by: John Ferlan --- src/conf/capabilities.c | 36 +--- src/conf/capabilities.h | 10 -- 2 files changed

[libvirt] [PATCHv3 1/4] util: Introduce monitor capability interface

2018-09-20 Thread Wang Huaqiang
This patch introduces the resource monitor and creates the interface for getting host capability of resource monitor from the system resource control file system. The resource monitor takes the role of RDT monitoring group and could be used to monitor the resource consumption information, such as

[libvirt] [PATCHv3 3/4] conf: Refactor memory bandwidth capability structure

2018-09-20 Thread Wang Huaqiang
Move memory bandwidth capability nodes into one data structure, this allows us to add a monitor for memory bandwidth. Signed-off-by: Wang Huaqiang Reviewed-by: John Ferlan --- src/conf/capabilities.c | 22 ++ src/conf/capabilities.h | 10 -- 2 files changed, 18 inser

[libvirt] [PATCHv3 4/4] conf: Introduce RDT monitor host capability

2018-09-20 Thread Wang Huaqiang
This patch is introducing cache monitor(CMT) to cache and memory bandwidth monitor(MBM) for monitoring CPU memory bandwidth. The host capability of the two monitors is also introduced in this patch. For CMT, the host capability is shown like: ...

[libvirt] [PATCH 0/2] tests: Add QEMU 3.0.0 capability tests for s390x

2018-09-20 Thread Boris Fiuczynski
Add capability and domcaps tests for QEMU 3.0.0 on s390x. Boris Fiuczynski (2): tests: Add capabilities data for QEMU 3.0.0 on s390x tests: domaincaps: Add QEMU 3.0 for s390x .../domaincapsschemadata/qemu_3.0.0.s390x.xml | 183 + tests/domaincapstest.c| 4 + ...

[libvirt] [PATCH 2/2] tests: domaincaps: Add QEMU 3.0 for s390x

2018-09-20 Thread Boris Fiuczynski
Signed-off-by: Boris Fiuczynski --- .../domaincapsschemadata/qemu_3.0.0.s390x.xml | 183 ++ tests/domaincapstest.c| 4 + 2 files changed, 187 insertions(+) create mode 100644 tests/domaincapsschemadata/qemu_3.0.0.s390x.xml diff --git a/tests/domaincapss

Re: [libvirt] [PATCH] virhostdev: Fix PCI devices are still attatched to stub driver bug

2018-09-20 Thread Wuzongyong (Euler Dept)
> $SUBJ: > > s/attatched/attached > > s/bug// > > On 08/31/2018 03:34 AM, Wu Zongyong wrote: > > So, first off - I believe there are two things going on in this one patch. > Even though there is "some relationship" between the issues, the libvirtd > restart is kind of a corner case, while the c

[libvirt] [jenkins-ci PATCH] Forcefully remove build/ directory for autotools builds

2018-09-20 Thread Andrea Bolognani
Normally this shouldn't be needed, because 'git clean -xdf' is executed after updating the git repository and before starting the build; however, some RPM builds (notably libvirt's) internally use git to apply patches, and if one of those fails it will leave a git repository inside of build/ behind

Re: [libvirt] [libvirt PATCH v6 15/15] xen_common: Change xenParseCharDev to using virConfGetValueStringList

2018-09-20 Thread Fabiano Fidêncio
On Thu, Sep 20, 2018 at 12:12 AM, John Ferlan wrote: > > > On 09/18/2018 02:48 PM, Fabiano Fidêncio wrote: > > Signed-off-by: Fabiano Fidêncio > > --- > > src/xenconfig/xen_common.c | 23 +++ > > 1 file changed, 11 insertions(+), 12 deletions(-) > > > > diff --git a/src/xenc

Re: [libvirt] [PATCH 0/2] tests: Add QEMU 3.0.0 capability tests for s390x

2018-09-20 Thread Bjoern Walk
Boris Fiuczynski [2018-09-20, 12:20PM +0200]: > Add capability and domcaps tests for QEMU 3.0.0 on s390x. > > Boris Fiuczynski (2): > tests: Add capabilities data for QEMU 3.0.0 on s390x > tests: domaincaps: Add QEMU 3.0 for s390x > > .../domaincapsschemadata/qemu_3.0.0.s390x.xml | 183 +

Re: [libvirt] [PATCH 0/2] tests: Add QEMU 3.0.0 capability tests for s390x

2018-09-20 Thread John Ferlan
On 09/20/2018 07:20 AM, Bjoern Walk wrote: > Boris Fiuczynski [2018-09-20, 12:20PM +0200]: >> Add capability and domcaps tests for QEMU 3.0.0 on s390x. >> >> Boris Fiuczynski (2): >> tests: Add capabilities data for QEMU 3.0.0 on s390x >> tests: domaincaps: Add QEMU 3.0 for s390x >> >> ...

Re: [libvirt] [PATCH 4/5] storage: Introduce storagePoolRefreshFailCleanup

2018-09-20 Thread John Ferlan
On 09/20/2018 03:30 AM, Michal Privoznik wrote: > On 09/12/2018 06:09 PM, John Ferlan wrote: >> Create a common pool refresh failure handling method as the >> same code is repeated multiple times. >> >> Signed-off-by: John Ferlan >> --- >> src/storage/storage_driver.c | 38 +---

[libvirt] [PATCH] Remove ignore_value or void from unlink calls

2018-09-20 Thread John Ferlan
There seems to be no need to add the ignore_value wrapper or caste with (void) to the unlink() calls, so let's just remove them. I assume at one point in time Coverity complained. So, let's just be consistent - those that care to check the return status can and those that don't can just have the na

[libvirt] [libvirt PATCH v7 0/6] Finish the conversion to virConfGetValue* functions

2018-09-20 Thread Fabiano Fidêncio
This patchset finishes the conversion to virConfGetValue* functions, started by Daniel Berrange a few months ago. Please, mind that although we could make virConfGetValue* functions more generic in order to support numbers and booleans as strings, that doesn't seem the safest path to take. The sid

[libvirt] [libvirt PATCH v7 1/6] xen_common: Change xenConfigCopyStringInternal to using virConfGetValueString

2018-09-20 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio Reviewed-by: John Ferlan --- src/xenconfig/xen_common.c | 18 -- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/src/xenconfig/xen_common.c b/src/xenconfig/xen_common.c index 36a9d27c80..a35e1aff58 100644 --- a/src/xenconfig/xen_comm

[libvirt] [libvirt PATCH v7 3/6] xen_common: Change xenConfigGetString to using virConfGetValueString

2018-09-20 Thread Fabiano Fidêncio
This change actually changes the behaviour of xenConfigGetString() as now it returns a newly-allocated string. Unfortunately, there's not much that can be done in order to avoid that and all the callers have to be changed in order to avoid leaking the return value. Also, as a side-effect of the c

[libvirt] [libvirt PATCH v7 6/6] xen_common: Change xenParseCharDev to using virConfGetValueStringList

2018-09-20 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- src/xenconfig/xen_common.c | 27 +-- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/src/xenconfig/xen_common.c b/src/xenconfig/xen_common.c index 058f35825e..21f1f4a24c 100644 --- a/src/xenconfig/xen_common.c +++ b/src/x

[libvirt] [libvirt PATCH v7 2/6] xen_common: Change xenConfigGetUUID to using virConfGetValueString

2018-09-20 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio Reviewed-by: John Ferlan --- src/xenconfig/xen_common.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/xenconfig/xen_common.c b/src/xenconfig/xen_common.c index a35e1aff58..587bab2b19 100644 --- a/src/xenconfig/xen_

[libvirt] [libvirt PATCH v7 5/6] xen_common: Change xenParseVfbs to using virConfGetValueStringList

2018-09-20 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio --- src/xenconfig/xen_common.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/xenconfig/xen_common.c b/src/xenconfig/xen_common.c index 9133998cd7..058f35825e 100644 --- a/src/xenconfig/xen_common.c +++ b/src/xenconfig/x

[libvirt] [libvirt PATCH v7 4/6] xen_common: Change xenParsePCIList to using virConfGetValueStringList

2018-09-20 Thread Fabiano Fidêncio
The `if(!list || list->type != VIR_CONF_LIST)` check couldn't be written in a 100% similar way. Instead, we're just checking whether `virConfGetValueStringList() <= 0` and creating a new function to: - return -1 in case virConfGetValueStringList fails either due to some allocation failure or when

Re: [libvirt] [Qemu-devel] [QEMU PATCH] net: Deprecate the old way of using a legacy net via "name" instead of "id"

2018-09-20 Thread Philippe Mathieu-Daudé
On 9/19/18 10:12 PM, Thomas Huth wrote: > In early times, network backends were specified by a "vlan" and "name" > tuple. With the introduction of netdevs, the "name" was replaced by an > "id" (which is supposed to be unique), but the "name" parameter stayed > as an alias which could be used instea

Re: [libvirt] [Qemu-devel] [PATCH v2 1/4] Makefile: Add missing dependency for qemu-deprecated.texi

2018-09-20 Thread Philippe Mathieu-Daudé
On 9/20/18 10:50 AM, Thomas Huth wrote: > Make sure that the docs get correctly regenerated when the > file qemu-deprecated.texi has been changed. > > Fixes: 44c67847e32c91a6071fb0440c357b9489f08bc6 > Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé > --- > Makefile | 2 +- > 1

Re: [libvirt] [Qemu-devel] [PATCH v2 2/4] net: Deprecate the "name" parameter of -net

2018-09-20 Thread Philippe Mathieu-Daudé
On 9/20/18 10:50 AM, Thomas Huth wrote: > In early times, network backends were specified by a "vlan" and "name" > tuple. With the introduction of netdevs, the "name" was replaced by an > "id" (which is supposed to be unique), but the "name" parameter stayed > as an alias which could be used inste

Re: [libvirt] [Qemu-devel] [PATCH v2 3/4] net/slirp: Deprecate the [hub_id name] parameter tuple

2018-09-20 Thread Philippe Mathieu-Daudé
On 9/20/18 10:50 AM, Thomas Huth wrote: > The "name" in the [hub_id name] parameter tuple is the same as a > "netdev_id" (which should be unique), so specifying the hub_id here > is just redundant (it was likely just necessary in the past when > the network subsystem was still using "vlans" only an

Re: [libvirt] [PATCH 2/2] libxl: fallback to lib probe if pkgconfig file not found

2018-09-20 Thread Jim Fehlig
On 9/20/18 12:30 AM, Michal Privoznik wrote: On 09/19/2018 08:59 PM, Jim Fehlig wrote: With the assumption that all Xen >= 4.6 contains a pkgconfig file for libxenlight, commit 5bdcef13 dropped the fallback check to probe libxenlight with LIBVIRT_CHECK_LIB. At the time it was not known that the

Re: [libvirt] [PATCH] Remove ignore_value or void from unlink calls

2018-09-20 Thread Erik Skultety
On Thu, Sep 20, 2018 at 08:12:06AM -0400, John Ferlan wrote: > There seems to be no need to add the ignore_value wrapper or > caste with (void) to the unlink() calls, so let's just remove > them. I assume at one point in time Coverity complained. So, > let's just be consistent - those that care to

Re: [libvirt] [jenkins-ci PATCH] Forcefully remove build/ directory for autotools builds

2018-09-20 Thread Erik Skultety
On Thu, Sep 20, 2018 at 12:37:12PM +0200, Andrea Bolognani wrote: > Normally this shouldn't be needed, because 'git clean -xdf' is > executed after updating the git repository and before starting > the build; however, some RPM builds (notably libvirt's) > internally use git to apply patches, and if

Re: [libvirt] [PATCH 2/2] libxl: fallback to lib probe if pkgconfig file not found

2018-09-20 Thread Michal Privoznik
On 09/20/2018 04:13 PM, Jim Fehlig wrote: > On 9/20/18 12:30 AM, Michal Privoznik wrote: >> > > Over the years my ranting about such workarounds has ebbed as they have > become commonplace throughout the stack: kernel works around hardware > bugs, runtimes work around kernel bugs, apps work aroun

Re: [libvirt] [jenkins-ci PATCH] guests: Hash test user password dynamically

2018-09-20 Thread Andrea Bolognani
Ping? :) On Tue, 2018-09-04 at 14:34 +0200, Andrea Bolognani wrote: > Current versions of Ansible support the password_hash() > filter, so we can avoid hardcoding a pre-computed hash > and make what's happening a bit clearer. > > Signed-off-by: Andrea Bolognani > --- > guests/playbooks/update/t

[libvirt] [PATCH 00/11] qemu: Improve / cleanup QEMU binary handling

2018-09-20 Thread Andrea Bolognani
This is the output of 'virsh capabilities' on my laptop: hvm 64 /usr/bin/qemu-system-x86_64 pc-i440fx-3.0 pc pc-q35-3.0 q35 /usr/bin/qemu-kvm pc-i440fx-3.0 pc pc-q35-3.0 q35

[libvirt] [PATCH 01/11] qemu: Move comments to virQEMUCapsGuestIsNative()

2018-09-20 Thread Andrea Bolognani
The function performing the checks, rather than its callers, should contain comments explaining the rationale behind said checks. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_capabilities.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_capabili

[libvirt] [PATCH 02/11] qemu: Don't duplicate binary name in capabilities

2018-09-20 Thread Andrea Bolognani
virCapabilitiesAddGuestDomain() takes an optional binary name: this is intended for cases where a certain domain type can't use the default one registered for the guest architecture, but has to use a special binary instead. The current code, however, will pass 'binary' again when 'kvmbin' is not d

[libvirt] [PATCH 04/11] qemu: Stop looking after finding the first binary

2018-09-20 Thread Andrea Bolognani
When the guest is native, we are currently looking at potential KVM binaries regardless of whether or not we have already located a QEMU binary suitable to run the guest. This made sense back when KVM support was not part of QEMU proper, but these days the KVM binaries are in most cases just trivi

[libvirt] [PATCH 11/11] qemu: Prefer qemu-system-* binaries

2018-09-20 Thread Andrea Bolognani
We already prefer them in capabilities, and domcapabilities should be consistent with that. This commit is best viewed with 'git show -w'. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_capabilities.c | 33 + 1 file changed, 25 insertions(+), 8 deletions(-) d

[libvirt] [PATCH 06/11] qemu: Remove unnecessary variables

2018-09-20 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/qemu/qemu_capabilities.c | 20 +++- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index aa2de9018c..01be627af0 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/q

[libvirt] [PATCH 05/11] qemu: Expect a single binary in virQEMUCapsInitGuest()

2018-09-20 Thread Andrea Bolognani
We're only ever passing a single binary when calling this function, so we can remove all code dealing with the possibility of a second binary being specified. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_capabilities.c | 19 --- src/qemu/qemu_capabilities.h | 2 -- tests/qe

[libvirt] [PATCH 03/11] qemu: Move armv7l-on-aarch64 special case

2018-09-20 Thread Andrea Bolognani
When running an armv7l guest on an aarch64 hosts, the qemu-system-aarch64 binary should be our first choice instead of qemu-system-arm since the former can take advantage of KVM acceleration. Move the special case to virQEMUCapsFindBinaryForArch() so that it's handled along with all other cases ra

[libvirt] [PATCH 07/11] qemu: Don't look for "qemu-kvm" and "kvm" binaries

2018-09-20 Thread Andrea Bolognani
Both Fedora's qemu-kvm and Debian's/Ubuntu's kvm are nothing more than paper-thin wrappers around the native QEMU binary, so we gain nothing by looking for them. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_capabilities.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/qemu/qemu_ca

Re: [libvirt] [PATCH] virhostdev: Fix PCI devices are still attatched to stub driver bug

2018-09-20 Thread John Ferlan
On 09/20/2018 06:35 AM, Wuzongyong (Euler Dept) wrote: >> $SUBJ: >> >> s/attatched/attached >> >> s/bug// >> >> On 08/31/2018 03:34 AM, Wu Zongyong wrote: >> >> So, first off - I believe there are two things going on in this one patch. >> Even though there is "some relationship" between the issu

[libvirt] [PATCH 08/11] qemu: Simplify QEMU binary search

2018-09-20 Thread Andrea Bolognani
Now that we have reduced the number of sensible options down to either the native QEMU binary or RHEL's qemu-kvm, we can make virQEMUCapsInitGuest() a bit simpler. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_capabilities.c | 29 +++-- 1 file changed, 7 insertions(+)

[libvirt] [PATCH 09/11] qemu: Rename qemubinCaps => qemuCaps

2018-09-20 Thread Andrea Bolognani
The latter is used throughout libvirt, so use it here as well for consistency. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_capabilities.c | 16 src/qemu/qemu_capabilities.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_capabilities.c

[libvirt] [PATCH 10/11] qemu: Refactor virQEMUCapsCacheLookupByArch()

2018-09-20 Thread Andrea Bolognani
The new implementation contains less duplicated code and is easier to extend. This commit is best viewed with 'git show -w'. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_capabilities.c | 35 ++- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a

Re: [libvirt] what determines the type of virtual NIC in libvirt (veth or tap)?

2018-09-20 Thread Laine Stump
On 09/20/2018 04:52 AM, Frank Wang wrote: > Hi All, > > I'd like to know what determines the type of virtual NIC in libvirt ? > There was a problem I encountered, the vm can't get the mirror traffic > while the virtual port in openvswitch is veth, If the virtual port is > tun, the everything is fin

Re: [libvirt] [PATCHv3 1/4] util: Introduce monitor capability interface

2018-09-20 Thread John Ferlan
On 09/20/2018 06:10 AM, Wang Huaqiang wrote: > This patch introduces the resource monitor and creates the interface > for getting host capability of resource monitor from the system resource > control file system. > > The resource monitor takes the role of RDT monitoring group and could be > us

Re: [libvirt] [PATCHv3 4/4] conf: Introduce RDT monitor host capability

2018-09-20 Thread John Ferlan
On 09/20/2018 06:10 AM, Wang Huaqiang wrote: > This patch is introducing cache monitor(CMT) to cache and > memory bandwidth monitor(MBM) for monitoring CPU memory > bandwidth. > The host capability of the two monitors is also introduced > in this patch. > > For CMT, the host capability is shown

Re: [libvirt] [PATCH 2/2] libxl: fallback to lib probe if pkgconfig file not found

2018-09-20 Thread Laine Stump
On 09/20/2018 10:40 AM, Michal Privoznik wrote: > On 09/20/2018 04:13 PM, Jim Fehlig wrote: >> On 9/20/18 12:30 AM, Michal Privoznik wrote: >>> >> Over the years my ranting about such workarounds has ebbed as they have >> become commonplace throughout the stack: kernel works around hardware >> bug

Re: [libvirt] [PATCHv3 1/4] util: Introduce monitor capability interface

2018-09-20 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Friday, September 21, 2018 12:16 AM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Niu, Bing ; > Ding, Jian-feng ; Zang, Rui > Subject: Re: [PATCHv3 1/4] util: Introduce monitor capability i

Re: [libvirt] [PATCH v3] qemu: fix deadlock if create qemuProcessReconnect thread failed

2018-09-20 Thread John Ferlan
On 09/19/2018 10:27 PM, Wang Yechao wrote: > qemuProcessReconnectHelper has hold lock on doms, if create > qemuProcessReconnect thread failed, calls qemuDomainRemoveInactiveJob > will lead to deadlock. > > Add a qemuDomainRemoveInactiveJobLocked, modify qemuProcessReconnectHelper > to call it.

[libvirt] [PATCH 02/11] qemu: Introduce qemuDomainUpdateQEMUCaps()

2018-09-20 Thread Marc Hartmayer
This function updates the used QEMU capabilities of @vm by querying the QEMU capabilities cache. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- src/qemu/qemu_domain.c | 25 + src/qemu/qemu_domain.h | 4 src/qemu/qemu_process.c | 14 +++---

[libvirt] [PATCH 08/11] conf: Use domainPostParseData(Alloc|Free) in virDomainDefValidate

2018-09-20 Thread Marc Hartmayer
For the usage of the parameter @parseOpqaue within virDomainDefValidate it must be ensured that the parameter @parseOpaque is not NULL. But since there are code paths where virDomainDefValidate is called with @parseOpaque == NULL (e.g. the function call of virDomainDefParseNode with @parseOpqaue ==

[libvirt] [PATCH 11/11] qemu: Use @parseOpaque in qemuDomainDeviceDefValidate

2018-09-20 Thread Marc Hartmayer
Since each code path ensures that @parseOpaque cannot be NULL, we can use the argument instead of using virQEMUCapsCacheLookup where the QEMU capabilities may have been changed during the libvirt job. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- src/qemu/qemu_domain.c | 12 ++

[libvirt] [PATCH 01/11] qemu: Use VIR_STEAL_PTR macro

2018-09-20 Thread Marc Hartmayer
Signed-off-by: Marc Hartmayer Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski Reviewed-by: Stefan Zimmermann --- src/qemu/qemu_domain.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 2fd8a2a268cd..06aa1fac5d0b

[libvirt] [PATCH 00/11] Avoid numerous calls of virQEMUCapsCacheLookup

2018-09-20 Thread Marc Hartmayer
For a domain definition there are numerous calls of virQEMUCapsCacheLookup (the same applies to the domain start). This slows down the process since virQEMUCapsCacheLookup validates that the QEMU capabilitites are still valid (among other things, a fork is done for this if the user for the QEMU pro

[libvirt] [PATCH 04/11] conf: Use getParseOpaque() in virDomainObjSetDefTransient

2018-09-20 Thread Marc Hartmayer
This allows the QEMU driver to use the originally used QEMU capabilities for copying the domain. It avoids the usage of a possible changed QEMU capability as virQEMUCapsCacheLookup might return a different QEMU capability than used before (for example when during the job the QEMU binary has been re

[libvirt] [PATCH 06/11] conf: Get rid of virDomainDeviceDefPostParseOne

2018-09-20 Thread Marc Hartmayer
Move the domainPostParseDataAlloc/Free calls to virDomainDeviceDefParse. As an consequence virDomainDeviceDefPostParseOne is superfluous and can therefore be removed. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- src/conf/domain_conf.c | 37 +++-

[libvirt] [PATCH 10/11] conf: Extend virDomainDeviceDefValidate(Callback) for parseOpaque

2018-09-20 Thread Marc Hartmayer
Add parseOpaque parameter to virDomainDeviceDefValidate(Callback). But don't use it for now. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- src/conf/domain_conf.c | 10 ++ src/conf/domain_conf.h | 3 ++- src/qemu/qemu_domain.c | 3 ++- src/vz/vz_driver.c | 3 ++-

[libvirt] [PATCH 05/11] conf: Add function description for virDomainDefPostParse

2018-09-20 Thread Marc Hartmayer
Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- src/conf/domain_conf.c | 13 + 1 file changed, 13 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index a3f2fcb0a001..3c307d325a89 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_con

[libvirt] [PATCH 09/11] qemu: Use @parseOpaque in qemuDomainDefValidate

2018-09-20 Thread Marc Hartmayer
Since the previous commit made sure that @parseOpaque is always set to a non-NULL value we can use it now. This avoids the usage of a possible different QEMU capability than before, since virQEMUCapsCacheLookup could return a different QEMU capability than used before (e.g. if during the job the u

[libvirt] [PATCH 07/11] conf: Extend virDomainDefValidate(Callback) for parseOpaque

2018-09-20 Thread Marc Hartmayer
Add @parseOpaque argument to virDomainDefValidate and virDomainDefValidateCallback, but don't use it for now since it's not ensured that it's always a non-NULL value. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- src/conf/domain_conf.c | 11 +++ src/conf/domain_conf.h

[libvirt] [PATCH 03/11] qemu: Pass QEMUCaps to virDomainDefPostParse

2018-09-20 Thread Marc Hartmayer
...although priv->qemuCaps will be NULL in almost every case when the post parse callback has failed. That may change in the future. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- src/qemu/qemu_process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qe

Re: [libvirt] [Qemu-devel] [PATCH v2 4/4] hw/core/machine: Officially deprecate the enforce-config-section parameter

2018-09-20 Thread Markus Armbruster
Thomas Huth writes: > Commit 16f7244842b5135543ef068a1adafd94c6965953 added this parameter > to the documentation, including a note that it is deprecated. But it > has never been added to the "Deprecated features" appendix, which is > our official way to deprecate legacy parameters. So let's do t

Re: [libvirt] [Qemu-devel] [PATCH v2 1/4] Makefile: Add missing dependency for qemu-deprecated.texi

2018-09-20 Thread Markus Armbruster
Thomas Huth writes: > Make sure that the docs get correctly regenerated when the > file qemu-deprecated.texi has been changed. > > Fixes: 44c67847e32c91a6071fb0440c357b9489f08bc6 > Signed-off-by: Thomas Huth > --- > Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [libvirt] [Qemu-devel] [PATCH v2 3/4] net/slirp: Deprecate the [hub_id name] parameter tuple

2018-09-20 Thread Markus Armbruster
Thomas Huth writes: > The "name" in the [hub_id name] parameter tuple is the same as a > "netdev_id" (which should be unique), so specifying the hub_id here > is just redundant (it was likely just necessary in the past when > the network subsystem was still using "vlans" only and when it did > no

Re: [libvirt] [Qemu-devel] [PATCH v2 2/4] net: Deprecate the "name" parameter of -net

2018-09-20 Thread Markus Armbruster
Thomas Huth writes: > In early times, network backends were specified by a "vlan" and "name" > tuple. With the introduction of netdevs, the "name" was replaced by an > "id" (which is supposed to be unique), but the "name" parameter stayed > as an alias which could be used instead of "id". Unfort

[libvirt] [PATCH] util: Fix travis build error

2018-09-20 Thread John Ferlan
Commit 12093f1f used %ld instead of %zd for a size_t. Signed-off-by: John Ferlan --- Sigh, always something simple. Pushed under the build breaker rule. src/util/virresctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c ind

Re: [libvirt] [jenkins-ci PATCH] guests: Hash test user password dynamically

2018-09-20 Thread Fabiano Fidêncio
On Tue, Sep 4, 2018 at 2:34 PM, Andrea Bolognani wrote: > Current versions of Ansible support the password_hash() > filter, so we can avoid hardcoding a pre-computed hash > and make what's happening a bit clearer. > > Signed-off-by: Andrea Bolognani > Reviewed-by: Fabiano Fidêncio > --- > g

Re: [libvirt] [PATCH v2 0/9] cgroup cleanups and preparation for v2

2018-09-20 Thread Fabiano Fidêncio
On Thu, Sep 20, 2018 at 10:54 AM, Pavel Hrdina wrote: > Pavel Hrdina (9): > vircgroup: cleanup controllers not managed by systemd on error > vircgroup: fix bug in virCgroupEnableMissingControllers > vircgroup: rename virCgroupAdd.*Task to virCgroupAdd.*Process > vircgroup: introduce virCg

Re: [libvirt] [libvirt PATCH v7 3/6] xen_common: Change xenConfigGetString to using virConfGetValueString

2018-09-20 Thread John Ferlan
On 09/20/2018 09:28 AM, Fabiano Fidêncio wrote: > This change actually changes the behaviour of xenConfigGetString() as > now it returns a newly-allocated string. > > Unfortunately, there's not much that can be done in order to avoid that > and all the callers have to be changed in order to avoi

Re: [libvirt] [libvirt PATCH v7 4/6] xen_common: Change xenParsePCIList to using virConfGetValueStringList

2018-09-20 Thread John Ferlan
On 09/20/2018 09:28 AM, Fabiano Fidêncio wrote: > The `if(!list || list->type != VIR_CONF_LIST)` check couldn't be > written in a 100% similar way. Instead, we're just checking whether > `virConfGetValueStringList() <= 0` and creating a new function to: > - return -1 in case virConfGetValueString

Re: [libvirt] [libvirt PATCH v7 5/6] xen_common: Change xenParseVfbs to using virConfGetValueStringList

2018-09-20 Thread John Ferlan
On 09/20/2018 09:28 AM, Fabiano Fidêncio wrote: > Signed-off-by: Fabiano Fidêncio > --- > src/xenconfig/xen_common.c | 18 +++--- > 1 file changed, 11 insertions(+), 7 deletions(-) > > diff --git a/src/xenconfig/xen_common.c b/src/xenconfig/xen_common.c > index 9133998cd7..058f3582

  1   2   >