Re: [libvirt] [Qemu-devel] [PATCH RFC 4/8] target-i386: cpu: consolidate calls of object_property_parse() in x86_cpu_parse_featurestr

2016-06-03 Thread Eduardo Habkost
On Fri, Jun 03, 2016 at 11:37:49AM +0200, Igor Mammedov wrote: > On Fri, 3 Jun 2016 09:30:09 +0200 > Peter Krempa wrote: > > > On Thu, Jun 02, 2016 at 18:31:04 +0200, Igor Mammedov wrote: > > > On Thu, 2 Jun 2016 17:05:06 +0200 > > > Peter Krempa wrote:

[libvirt] [PATCH] qemu: driver: Unset log file watcher after restoring a VM save file

2016-06-03 Thread Peter Krempa
qemuProcessStart does not unset the infrastructure that retrieves errors from the qemu log file in case of migration. As this wasn't handled properly in qemuDomainSaveImageStartVM we kept the logging context/fd open for the lifetime of the VM rather than closing it after it's not needed.

Re: [libvirt] [PATCH] Fix building with -Og

2016-06-03 Thread Peter Krempa
On Fri, Jun 03, 2016 at 14:56:53 +0200, Michal Privoznik wrote: > On 03.06.2016 13:52, Peter Krempa wrote: > > On Fri, Jun 03, 2016 at 13:32:02 +0200, Martin Kletzander wrote: > > >> > > > ACK, I hope that people get tired of experimenting with bleeding edge > > compilers soon. > > Well, this

Re: [libvirt] [PATCH] Fix building with -Og

2016-06-03 Thread Martin Kletzander
On Fri, Jun 03, 2016 at 01:52:40PM +0200, Peter Krempa wrote: On Fri, Jun 03, 2016 at 13:32:02 +0200, Martin Kletzander wrote: When building using -Og, gcc sees that some variables can be used uninitialized It can be debatable whether it is possible with our codeflow, but functions should be

Re: [libvirt] [PATCH] Fix building with -Og

2016-06-03 Thread Michal Privoznik
On 03.06.2016 13:52, Peter Krempa wrote: > On Fri, Jun 03, 2016 at 13:32:02 +0200, Martin Kletzander wrote: >> > ACK, I hope that people get tired of experimenting with bleeding edge > compilers soon. Well, this is not a result of a bleeding edge compiler. This occurs on my (now ancient)

[libvirt] [PATCH] virt-host-validate: improve tests for arm/aarch64

2016-06-03 Thread Riku Voipio
ARM/Aarch64 /proc/cpuinfo has no virtualization related flags. Refactor the Qemu/KVM test a bit: 1) run the "for hardware virtualization" test only on plaforms with known cpuinfo flags (x86, s390) 2) test for /dev/kvm also on platforms where no cpu flags are set Finally Add a more generic

Re: [libvirt] [PATCH] Fix building with -Og

2016-06-03 Thread Peter Krempa
On Fri, Jun 03, 2016 at 13:32:02 +0200, Martin Kletzander wrote: > When building using -Og, gcc sees that some variables can be used > uninitialized It can be debatable whether it is possible with our > codeflow, but functions should be self-contained and initializations are > always good. The

Re: [libvirt] [Qemu-devel] [PATCH 7/9] qmp: Add runnability information to query-cpu-definitions

2016-06-03 Thread David Hildenbrand
> It is not exactly a special case (it is a read-only property like > any other), but it's worth mentioning. I will change it to: > > # If the QOM property is read-only, that means there's no known > # way to make the CPU model run in the current host. If > # absolutely no extra information will

[libvirt] [PATCH] Fix building with -Og

2016-06-03 Thread Martin Kletzander
When building using -Og, gcc sees that some variables can be used uninitialized It can be debatable whether it is possible with our codeflow, but functions should be self-contained and initializations are always good. The return instead of goto is due to actualType being used in the cleanup.

[libvirt] [PATCH v3 3/5] qemu: Use virJSONValueObjectCreate for master key

2016-06-03 Thread John Ferlan
Rather than open coding, follow the secinfo code and use the common secret object build/generate sequence. Signed-off-by: John Ferlan --- src/qemu/qemu_command.c | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git

[libvirt] [PATCH v3 1/5] qemu: Move and rename qemuBuildObjectCommandlineFromJSON

2016-06-03 Thread John Ferlan
Move the module from qemu_command.c to a new module virqemu.c and rename the API to virQEMUBuildObjectCommandline. This API will then be shareable with qemu-img and the need to build a security object for luks support. Signed-off-by: John Ferlan --- po/POTFILES.in

[libvirt] [PATCH v3 5/5] secret: Move virStorageSecretType to secret_util and rename

2016-06-03 Thread John Ferlan
Move the enum into secret_util, rename it to be just virSecretLookupType. This includes quite a bit of collateral damage, but the goal is to remove the "virStorage*" and replace with the virSecretLookupType so that it's easier to to add new lookups that aren't necessarily storage pool related.

[libvirt] [PATCH v3 2/5] storage: Use virSecretGetSecretString

2016-06-03 Thread John Ferlan
Rather than inline code secret lookup for rbd/iscsi, use the common function. Signed-off-by: John Ferlan --- src/Makefile.am | 1 + src/storage/storage_backend_iscsi.c | 50 + src/storage/storage_backend_rbd.c | 48

[libvirt] [PATCH v3 4/5] qemu: Remove need for qemuBuildSecretInfoProps

2016-06-03 Thread John Ferlan
Just move the code into qemuBuildObjectSecretCommandLine. Signed-off-by: John Ferlan --- src/qemu/qemu_command.c | 57 +++-- 1 file changed, 12 insertions(+), 45 deletions(-) diff --git a/src/qemu/qemu_command.c

[libvirt] [PATCH 5/7] storage: Create helper to set input for CreateQemuImg code

2016-06-03 Thread John Ferlan
Create helper virStorageBackendCreateQemuImgSetInput to set the input Signed-off-by: John Ferlan --- src/storage/storage_backend.c | 50 +++ 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/src/storage/storage_backend.c

[libvirt] [PATCH 2/7] storage: Split out setting default secret for encryption

2016-06-03 Thread John Ferlan
Split the qcow setting of encryption secrets into a helper Signed-off-by: John Ferlan --- src/storage/storage_backend_fs.c | 79 +--- 1 file changed, 49 insertions(+), 30 deletions(-) diff --git a/src/storage/storage_backend_fs.c

[libvirt] [PATCH 0/7] Cleanup with storageencryption/qemu-img

2016-06-03 Thread John Ferlan
The first 4 patches were already posted: http://www.redhat.com/archives/libvir-list/2016-May/msg01984.htm http://www.redhat.com/archives/libvir-list/2016-May/msg02147.html There was only one small change in a comment to any of those patches. The last 3 patches are new - just trying to make

[libvirt] [PATCH 4/7] storage: Adjust qemu-img switches check

2016-06-03 Thread John Ferlan
Since we support QEMU 0.12 and later, checking for support of specific flags added prior to that isn't necessary. Thus start with the base of having the "-o options" available for the qemu-img create option and then determine whether we have the compat option for qcow2 files (which would be

[libvirt] [PATCH 3/7] storage: Split out a helper for encryption checks

2016-06-03 Thread John Ferlan
Split out a helper from virStorageBackendCreateQemuImgCmdFromVol to check the encryption - soon a new encryption sheriff will be patroling and that'll mean all sorts of new checks. Signed-off-by: John Ferlan --- src/storage/storage_backend.c | 79

[libvirt] [PATCH 7/7] storage: Create helper to set options for CreateQemuImg code

2016-06-03 Thread John Ferlan
Create a helper virStorageBackendCreateQemuImgSetOptions to set either the qemu-img -o options or the previous mechanism using -F Signed-off-by: John Ferlan --- src/storage/storage_backend.c | 58 ++- 1 file changed, 35 insertions(+),

[libvirt] [PATCH 1/7] util: Clean up code formatting in virstorageencryption

2016-06-03 Thread John Ferlan
Bring style more in line with more recent code. Signed-off-by: John Ferlan --- src/util/virstorageencryption.c | 58 +++-- 1 file changed, 27 insertions(+), 31 deletions(-) diff --git a/src/util/virstorageencryption.c

[libvirt] [PATCH 6/7] storage: Create helper to set backing for CreateQemuImg code

2016-06-03 Thread John Ferlan
Create a helper virStorageBackendCreateQemuImgSetBacking to perform the backing store set Signed-off-by: John Ferlan --- src/storage/storage_backend.c | 118 -- 1 file changed, 67 insertions(+), 51 deletions(-) diff --git

Re: [libvirt] [PATCH 0/3] Clean up some virstorageencryption code

2016-06-03 Thread John Ferlan
On 05/26/2016 05:52 PM, John Ferlan wrote: > While working through adding luks support for libvirt, I have a few patches > that aren't really germane to adding support and rather than drop a large > patch series when I'm done - I figured I'd post a few adjustments. > > In the long run the

Re: [libvirt] [PATCH] storage: Adjust qemu-img switches check

2016-06-03 Thread John Ferlan
On 05/31/2016 07:00 PM, John Ferlan wrote: > Since we support QEMU 0.12 and later, checking for support of specific flags > added prior to that isn't necessary. > > Thus start with the base of having the "-o options" available for the > qemu-img create option and then determine whether we have

Re: [libvirt] [Qemu-devel] [PATCH RFC 4/8] target-i386: cpu: consolidate calls of object_property_parse() in x86_cpu_parse_featurestr

2016-06-03 Thread Igor Mammedov
On Fri, 3 Jun 2016 09:30:09 +0200 Peter Krempa wrote: > On Thu, Jun 02, 2016 at 18:31:04 +0200, Igor Mammedov wrote: > > On Thu, 2 Jun 2016 17:05:06 +0200 > > Peter Krempa wrote: > > > On Thu, Jun 02, 2016 at 11:53:22 -0300, Eduardo Habkost wrote: > >

Re: [libvirt] [PATCH 2/2] virPerfEventIsEnabled: Don't crash on shut off domains

2016-06-03 Thread Peter Krempa
On Fri, Jun 03, 2016 at 11:02:52 +0200, Michal Privoznik wrote: > So imagine the following. You connect read only to a daemon and > try to fetch stats for a shut off domain, e.g.: > > virsh -r domstats $dom > > but all of a sudden, virsh instead of printing the stats throws > the following

Re: [libvirt] [PATCH 1/2] Drop virPerfGetEventFd

2016-06-03 Thread Peter Krempa
On Fri, Jun 03, 2016 at 11:02:51 +0200, Michal Privoznik wrote: > This function is not used anywhere. Moreover, the code that would > use lives in virperf.c and therefore has access to the FD anyway. > Well, for instance virPerfReadEvent is doing just that. > > Signed-off-by: Michal Privoznik

[libvirt] [PATCH 1/2] Drop virPerfGetEventFd

2016-06-03 Thread Michal Privoznik
This function is not used anywhere. Moreover, the code that would use lives in virperf.c and therefore has access to the FD anyway. Well, for instance virPerfReadEvent is doing just that. Signed-off-by: Michal Privoznik --- src/libvirt_private.syms | 1 -

[libvirt] [PATCH 2/2] virPerfEventIsEnabled: Don't crash on shut off domains

2016-06-03 Thread Michal Privoznik
So imagine the following. You connect read only to a daemon and try to fetch stats for a shut off domain, e.g.: virsh -r domstats $dom but all of a sudden, virsh instead of printing the stats throws the following error at you: error: Disconnected from qemu:///system due to I/O error

[libvirt] [PATCH 0/2] Fix a virperf related crasher

2016-06-03 Thread Michal Privoznik
I've ran into a crasher. Worse crasher over RO connection. Michal Privoznik (2): Drop virPerfGetEventFd virPerfEventIsEnabled: Don't crash on shut off domains src/libvirt_private.syms | 1 - src/util/virperf.c | 22 +++--- src/util/virperf.h | 3 --- 3 files

Re: [libvirt] Plan for the next release

2016-06-03 Thread Jean-Marc Liger
Hi, EL6's build needs to add a new libnl-devel dependancy : DEBUG util.py:417: --> Processing Dependency: libnl.so.1()(64bit) for package: netcf-libs-0.2.4-4.el6.x86_64 checking for LIBNL... no configure: error: libnl-devel >= 1.1 is required for macvtap support Here is my diff for EL6 :

Re: [libvirt] [PATCH v3] virDomainChrGetDomainPtrsInternal: Return an integer

2016-06-03 Thread Peter Krempa
On Fri, Jun 03, 2016 at 09:24:56 +0200, Michal Privoznik wrote: > There's this problem on the recent gcc-6.1: > > In file included from conf/domain_conf.c:37:0: > conf/domain_conf.c: In function 'virDomainChrPreAlloc': > conf/domain_conf.c:14109:35: error: potential null pointer dereference >

Re: [libvirt] [PATCH RFC 4/8] target-i386: cpu: consolidate calls of object_property_parse() in x86_cpu_parse_featurestr

2016-06-03 Thread Peter Krempa
On Thu, Jun 02, 2016 at 18:31:04 +0200, Igor Mammedov wrote: > On Thu, 2 Jun 2016 17:05:06 +0200 > Peter Krempa wrote: > > On Thu, Jun 02, 2016 at 11:53:22 -0300, Eduardo Habkost wrote: > > > On Thu, Jun 02, 2016 at 02:22:22PM +0200, Igor Mammedov wrote: [...] > > I couldn't

[libvirt] [PATCH v3] virDomainChrGetDomainPtrsInternal: Return an integer

2016-06-03 Thread Michal Privoznik
There's this problem on the recent gcc-6.1: In file included from conf/domain_conf.c:37:0: conf/domain_conf.c: In function 'virDomainChrPreAlloc': conf/domain_conf.c:14109:35: error: potential null pointer dereference [-Werror=null-dereference] return VIR_REALLOC_N(*arrPtr, *cntPtr + 1);

Re: [libvirt] [PATCH 00/10] vz: improve locking in getting domain statistics

2016-06-03 Thread Nikolay Shirokovskiy
This patch series is superseded by https://www.redhat.com/archives/libvir-list/2016-June/msg00065.html which is more simple. On 02.06.2016 14:24, Nikolay Shirokovskiy wrote: > Current stats cache uses same lock as domain cache, namely lock > of virDomainObjPtr. First this is not necessary,

[libvirt] [PATCH 2/3] vz: use consistent naming for different domain object in vz_driver.c

2016-06-03 Thread Nikolay Shirokovskiy
Naming scheme is next: virDomainPtr domain; virDomainObjPtr dom; Signed-off-by: Nikolay Shirokovskiy --- src/vz/vz_driver.c | 158 ++--- 1 file changed, 79 insertions(+), 79 deletions(-) diff --git

[libvirt] [PATCH 0/3] keep subscription to performance events thru domain lifetime

2016-06-03 Thread Nikolay Shirokovskiy
Patches 1-2 are simple preparation steps. Patch 3 do the job. Nikolay Shirokovskiy (3): vz: simplify refcount on sdkdom in prlsdkLoadDomain vz: use consistent naming for different domain object in vz_driver.c vz: keep subscription to performance events thru domain lifetime

[libvirt] [PATCH 3/3] vz: keep subscription to performance events thru domain lifetime

2016-06-03 Thread Nikolay Shirokovskiy
The approach of subscribing on first stat API call and then waiting for receiving of performance event from sdk to process the call originates in times when every vz libvirt connections spawns its own sdk connection. Thus without this waiting virsh stat call would return empty stats. Now with

[libvirt] [PATCH 1/3] vz: simplify refcount on sdkdom in prlsdkLoadDomain

2016-06-03 Thread Nikolay Shirokovskiy
Signed-off-by: Nikolay Shirokovskiy --- src/vz/vz_sdk.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index 7eb78ca..73bf748 100644 --- a/src/vz/vz_sdk.c +++ b/src/vz/vz_sdk.c @@ -1615,17 +1615,16 @@