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

2018-09-20 Thread Peter Xu
On Thu, Sep 20, 2018 at 10:50:16AM +0200, Thomas Huth wrote: > 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

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

2018-09-20 Thread Bjoern Walk
John Ferlan [2018-09-20, 04:30PM -0400]: > > > On 09/20/2018 06:20 AM, Boris Fiuczynski wrote: > > 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

[libvirt] [PATCH v4 0/4] qemu: Fix deadlock if create qemuProcessReconnect thread failed

2018-09-20 Thread Wang Yechao
v3 patch: https://www.redhat.com/archives/libvir-list/2018-September/msg00950.html --- Changes in v4: - Split up v3 into four parts Wang Yechao (4): qemu: Split up qemuDomainRemoveInactive qemu: Create a qemuDomainRemoveInactiveLocked qemu: Create a qemuDomainRemoveInactiveJobLocked

[libvirt] [PATCH v4 4/4] qemu: Fix deadlock if create qemuProcessReconnect thread failed

2018-09-20 Thread Wang Yechao
qemuProcessReconnectHelper has hold lock on doms, if create qemuProcessReconnect thread failed, calls qemuDomainRemoveInactiveJob will lead to deadlock. Modify qemuProcessReconnectHelper to call qemuDomainRemoveInactiveJobLocked. Signed-off-by: Wang Yechao --- src/qemu/qemu_process.c | 2 +- 1

[libvirt] [PATCH v4 3/4] qemu: Create a qemuDomainRemoveInactiveJobLocked

2018-09-20 Thread Wang Yechao
Create a qemuDomainRemoveInactiveJobLocked which copies qemuDomainRemoveInactiveJob except of course calling virDomainObjListRemoveLocked. Signed-off-by: Wang Yechao --- src/qemu/qemu_domain.c | 21 + src/qemu/qemu_domain.h | 3 +++ 2 files changed, 24 insertions(+) diff

[libvirt] [PATCH v4 1/4] qemu: Split up qemuDomainRemoveInactive

2018-09-20 Thread Wang Yechao
Split up qemuDomainRemoveInactive into qemuDomainRemoveInactiveCommon and virDomainObjListRemove Signed-off-by: Wang Yechao --- src/qemu/qemu_domain.c | 38 +++--- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/src/qemu/qemu_domain.c

[libvirt] [PATCH v4 2/4] qemu: Create a qemuDomainRemoveInactiveLocked

2018-09-20 Thread Wang Yechao
Create a qemuDomainRemoveInactiveLocked which is a copy of qemuDomainRemoveInactive except that instead of calling virDomainObjListRemove it calls virDomainObjListRemoveLocked. Signed-off-by: Wang Yechao --- src/qemu/qemu_domain.c | 22 ++ 1 file changed, 22 insertions(+)

[libvirt] [PATCH] qemuProcess: update hostdevs before connectting qemu monitor

2018-09-20 Thread Wu Zongyong
In a following case: virsh start $domain service libvirtd stop the guest from within the $domain service libvirtd start Notice that PCI devices which have been assigned to the $domain will still be bound to stub drivers instead rebound to host drivers. In that case the call

[libvirt] [PATCH 0/3] Fix some Coverity found issues.

2018-09-20 Thread John Ferlan
Updated to a more recent Coverity checker and it found some new issues. The last one perhaps could be a false positive, I don't really know for sure, but there's enough instances that I figured it was worth the patch. John Ferlan (3): conf: Alter when ctxt->node is set lxc: Resolve memory

[libvirt] [PATCH 3/3] tests: Resolve possible overrun

2018-09-20 Thread John Ferlan
Coverity noted that each of the fmemopen called used the strlen value in order to allocate space, but that neglected space for terminating null string. So just add 1 to the strlen. Signed-off-by: John Ferlan --- tests/vircgroupmock.c | 21 - 1 file changed, 12 insertions(+),

[libvirt] [PATCH 1/3] conf: Alter when ctxt->node is set

2018-09-20 Thread John Ferlan
In virDomainMemoryDefParseXML and virDomainVideoDefParseXML if the VIR_ALLOC fails and NULL is returned, then the alteration to ctxt->node isn't reversed. Found by Coverity Signed-off-by: John Ferlan --- src/conf/domain_conf.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

[libvirt] [PATCH 2/3] lxc: Resolve memory leak

2018-09-20 Thread John Ferlan
Commit 40b5c99a modified the virConfGetValue callers to use virConfGetValueString. However, using the virConfGetValueString resulted in leaking the returned @value string in each case. So, let's modify each instance to use the VIR_AUTOFREE(char *) syntax. In some instances changing the variable

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

2018-09-20 Thread Fabiano Fidêncio
On Thu, Sep 20, 2018 at 10:20 PM, John Ferlan wrote: > > > On 09/20/2018 09:28 AM, Fabiano Fidêncio wrote: > > Signed-off-by: Fabiano Fidêncio > > --- > > src/xenconfig/xen_common.c | 27 +-- > > 1 file changed, 13 insertions(+), 14 deletions(-) > > > > diff --git

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

2018-09-20 Thread Fabiano Fidêncio
On Thu, Sep 20, 2018 at 10:19 PM, John Ferlan wrote: > > > 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

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

2018-09-20 Thread Fabiano Fidêncio
On Thu, Sep 20, 2018 at 10:18 PM, John Ferlan wrote: > > > 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

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

2018-09-20 Thread Fabiano Fidêncio
On Thu, Sep 20, 2018 at 10:17 PM, John Ferlan wrote: > > > 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

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 06:20 AM, Boris Fiuczynski wrote: > 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 |

Re: [libvirt] [libvirt PATCH v7 6/6] xen_common: Change xenParseCharDev 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 | 27 +-- > 1 file changed, 13 insertions(+), 14 deletions(-) > > diff --git a/src/xenconfig/xen_common.c b/src/xenconfig/xen_common.c > index

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

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

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

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

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 > --- >

[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

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 >

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".

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

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

[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

[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

[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 +++

[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 +++

[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 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

[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 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

[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 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

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.

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

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 >>

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

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 >

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

[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

[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

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

[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

[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

[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 +++

[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 --

[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

[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(-)

[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

[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

[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

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 > --- >

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

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

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] [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] [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

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

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

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

[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 ---

[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 +++

[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 +++

[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

[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 ---

[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

[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

[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

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

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 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] [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

[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/

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

[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

[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

[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] [PATCHv3 0/4] Introduce x86 RDT (CMT) 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

[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

[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

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

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

[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 ++--

[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

[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

[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 +

[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 +++

[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

[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

  1   2   >