Re: [libvirt] [PATCH] qemu: Don't special case mdevs when assigning PCI addresses

2017-06-01 Thread Andrea Bolognani
On Thu, 2017-06-01 at 21:24 -0400, Laine Stump wrote: > > @@ -645,9 +645,6 @@ > > qemuDomainDeviceCalculatePCIConnectFlags(virDomainDeviceDefPtr dev, > >  return pcieFlags; > >  } > >   > > -if (hostdev->source.subsys.type == > > VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_MDEV) >

[libvirt] [PATCH] util: fixing wrong comparison inside virStoragePermsCopy().

2017-06-01 Thread Julio Faracco
VIR_STRDUP returns -1 if the string copy was not successful. So, the current comparison/logic is throwing an error when VIR_STRDUP() returns 1. Only when source is NULL, it is considering as a success which is not right. Signed-off-by: Julio Faracco --- src/util/virstoragefile.c | 2 +- 1 file c

[libvirt] [PATCH] util: removing dead code inside virstoragefile.

2017-06-01 Thread Julio Faracco
The host address or the socket path have already been checked at the begining of the function virStorageSourceParseNBDColonString(). So, when the parameter is not a unix socket, there is no reason to check the address again because if it does not exists, the logic will fail in the first IF condi

Re: [libvirt] [PATCH] qemu: Don't special case mdevs when assigning PCI addresses

2017-06-01 Thread Laine Stump
On 05/26/2017 06:51 AM, Andrea Bolognani wrote: > We can treat mdevs the same as all other PCI hostdevs > and figure out whether they are PCI Express or legacy PCI > by checking the size of their config space. > > Signed-off-by: Andrea Bolognani > --- > src/qemu/qemu_domain_address.c | 3 --- >

[libvirt] [PATCH go-xml] Add support for domain input address

2017-06-01 Thread ZhenweiPi
--- domain.go | 5 +++-- domain_test.go | 11 ++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/domain.go b/domain.go index bf0b851..dcb8f65 100644 --- a/domain.go +++ b/domain.go @@ -232,8 +232,9 @@ type DomainChardev struct { } type DomainInput struct { -

[libvirt] libvirt-tck failures after sparse stream support

2017-06-01 Thread Jim Fehlig
Hi Michal, I noticed some of the libvirt-tck tests fail with 3.4.0 RC2. I bisected the failure to commit 07c2399c01. The failing tests are 400-vol-download.t, 405-vol-download-all.t, and 410-vol-download-nonblock.t. Looking at the tests, they all create a pool and vol, write some data to the v

[libvirt] [PATCH V2] maint: add sanitizers to the build process

2017-06-01 Thread claudioandre . br
From: Claudio André Sanitizers are based on compile-time instrumentation. They are available in gcc and clang for a range of supported operation systems and platforms. More info at: https://github.com/google/sanitizers The address sanitizer finds bugs related to addressing memory: use after free

Re: [libvirt] [PATCH 1/1] CI: add code coverage analysis

2017-06-01 Thread Claudio André
Sorry, I missed the list in CC. Em 26/05/2017 04:12, Martin Kletzander escreveu: And I didn't check the documentation because I didn't like the fact that coveralls.io wanted _write_ access to my commit messages and repositories, so I didn't sign up. I'm afraid I disagree. It requires _write_

[libvirt] [PATCH v5 2/4] qemu : Add loadparm to qemu command line string

2017-06-01 Thread Farhan Ali
Introduce a new QEMU capability for loadparm and if the capability is supported by QEMU then append the loadparm value to "-machine" string of qemu command line. Also add test cases for loadparm. Signed-off-by: Farhan Ali Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski Reviewed-by: Marc

[libvirt] [PATCH v5 0/4] Loadparm support

2017-06-01 Thread Farhan Ali
This patch series introduces the support for new s390x 'loadparm' feature. The 'loadparm' can be used to select the boot entry to boot from, for a boot device. Here is a link to the QEMU patches: https://lists.nongnu.org/archive/html/qemu-devel/2017-05/msg00192.html ChangeLog - v4 -> v5:

[libvirt] [PATCH v5 1/4] conf : Add loadparm boot option for a boot device

2017-06-01 Thread Farhan Ali
Update the per device boot schema to add an optional loadparm parameter. eg: Extend the virDomainDeviceInfo to support loadparm option. Modify the appropriate functions to parse loadparm from boot device xml. Signed-off-by: Farhan Ali Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski Re

[libvirt] [PATCH v5 4/4] news: Update news for loadparm feature

2017-06-01 Thread Farhan Ali
Signed-off-by: Farhan Ali --- docs/news.xml | 11 +++ 1 file changed, 11 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index e95fe72..986d101 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -66,6 +66,17 @@ its shutdown event as well, if it is known.

Re: [libvirt] [PATCH v2 5/6] virsh: Report errors from stream callbacks

2017-06-01 Thread Daniel P. Berrange
On Thu, Jun 01, 2017 at 03:43:06PM +0200, Michal Privoznik wrote: > On 06/01/2017 03:39 PM, Daniel P. Berrange wrote: > > On Thu, Jun 01, 2017 at 02:02:13PM +0200, Michal Privoznik wrote: > >> There are couple of callbacks we pass to virStreamSendAll(), > >> virStreamRecvAll() or its sparse variant

Re: [libvirt] [PATCH 3/3] virStream: Remove callbacks on Abort/Finish

2017-06-01 Thread Martin Kletzander
On Thu, Jun 01, 2017 at 02:29:04PM +0100, Daniel P. Berrange wrote: On Thu, Jun 01, 2017 at 03:20:50PM +0200, Martin Kletzander wrote: On Thu, Jun 01, 2017 at 01:29:45PM +0100, Daniel P. Berrange wrote: > On Thu, Jun 01, 2017 at 02:24:19PM +0200, Martin Kletzander wrote: > > On Thu, Jun 01, 2017

Re: [libvirt] [PATCH v2 5/6] virsh: Report errors from stream callbacks

2017-06-01 Thread Michal Privoznik
On 06/01/2017 03:39 PM, Daniel P. Berrange wrote: > On Thu, Jun 01, 2017 at 02:02:13PM +0200, Michal Privoznik wrote: >> There are couple of callbacks we pass to virStreamSendAll(), >> virStreamRecvAll() or its sparse variants. However, none of these >> callbacks reports error if one occurs and nei

Re: [libvirt] [PATCH v2 5/6] virsh: Report errors from stream callbacks

2017-06-01 Thread Daniel P. Berrange
On Thu, Jun 01, 2017 at 02:02:13PM +0200, Michal Privoznik wrote: > There are couple of callbacks we pass to virStreamSendAll(), > virStreamRecvAll() or its sparse variants. However, none of these > callbacks reports error if one occurs and neither do the > virStream* functions leaving user with ve

Re: [libvirt] [PATCH v2 6/6] streams: Report errors if sendAll/recvAll callbacks fail

2017-06-01 Thread Daniel P. Berrange
On Thu, Jun 01, 2017 at 02:23:30PM +0200, Martin Kletzander wrote: > On Thu, Jun 01, 2017 at 01:10:45PM +0100, Daniel P. Berrange wrote: > > On Thu, Jun 01, 2017 at 02:02:14PM +0200, Michal Privoznik wrote: > > > We have couple of wrappers over our low level stream APIs: > > > virSreamRecvAll(), vi

Re: [libvirt] [PATCH 3/3] virStream: Remove callbacks on Abort/Finish

2017-06-01 Thread Daniel P. Berrange
On Thu, Jun 01, 2017 at 03:20:50PM +0200, Martin Kletzander wrote: > On Thu, Jun 01, 2017 at 01:29:45PM +0100, Daniel P. Berrange wrote: > > On Thu, Jun 01, 2017 at 02:24:19PM +0200, Martin Kletzander wrote: > > > On Thu, Jun 01, 2017 at 01:19:05PM +0100, Daniel P. Berrange wrote: > > > > On Thu, J

Re: [libvirt] [PATCH 3/3] virStream: Remove callbacks on Abort/Finish

2017-06-01 Thread Martin Kletzander
On Thu, Jun 01, 2017 at 01:29:45PM +0100, Daniel P. Berrange wrote: On Thu, Jun 01, 2017 at 02:24:19PM +0200, Martin Kletzander wrote: On Thu, Jun 01, 2017 at 01:19:05PM +0100, Daniel P. Berrange wrote: > On Thu, Jun 01, 2017 at 02:08:34PM +0200, Martin Kletzander wrote: > > Users need to remove

Re: [libvirt] [PATCH v4 3/3] news: Update news and libvirt documentation

2017-06-01 Thread Farhan Ali
Hi Peter, Thanks for reviewing the patches. I will post another patch series with the changes you requested. Thanks Farhan On 06/01/2017 02:39 AM, Peter Krempa wrote: On Wed, May 31, 2017 at 11:25:41 -0400, Farhan Ali wrote: Update news and libvirt docs for loadparm. Signed-off-by: Farhan

[libvirt] [PATCH v2] qemu: Fix serial stub console allocation

2017-06-01 Thread Erik Skultety
When adding the aliased serial stub console, the structure wasn't properly allocated (VIR_ALLOC instead of virDomainChrDefNew) which then resulted in SIGSEGV in virDomainChrSourceIsEqual during a serial device coldplug. https://bugzilla.redhat.com/show_bug.cgi?id=1434278 Signed-off-by: Erik Skult

[libvirt] [PATCH] EventRegister: Fix double deference error in libvirt_virConnectDomainEventRegisterAny

2017-06-01 Thread fangying
As descriped at https://www.spinics.net/linux/fedora/libvir/msg148562.html, even when virConnectDomainEventRegisterAny returns -1 there is still a scenario in which it will trigger the free callback. We fix the problem in the following way: (1) implement a function virObjectEventStateSetFreeCB to a

Re: [libvirt] [PATCH] audit: Fix the output message for shmem

2017-06-01 Thread Martin Kletzander
ping signature.asc Description: Digital signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 3/3] virStream: Remove callbacks on Abort/Finish

2017-06-01 Thread Daniel P. Berrange
On Thu, Jun 01, 2017 at 02:24:19PM +0200, Martin Kletzander wrote: > On Thu, Jun 01, 2017 at 01:19:05PM +0100, Daniel P. Berrange wrote: > > On Thu, Jun 01, 2017 at 02:08:34PM +0200, Martin Kletzander wrote: > > > Users need to remove their callbacks before calling virStreamAbort() > > > or virStre

[libvirt] [PATCH 1/2] util: share code between virExec and virCommandExec

2017-06-01 Thread Cédric Bosdonnat
virCommand is a version of virExec that doesn't fork, however it is just calling execve and doesn't honors setting uid/gid and pwd. This commit moves those pieces from virExec to virCommandExec and makes virExec use virCommandExec to avoid code duplication. --- src/util/vircommand.c | 92

[libvirt] [PATCH 2/2] lxc: allow user to specify command working directory

2017-06-01 Thread Cédric Bosdonnat
Some containers may want the application to run in a special directory. Add element in the domain configuration to handle this case and use it in the lxc driver. --- docs/formatdomain.html.in| 5 + docs/schemas/domaincommon.rng| 5 + src/conf/domain_conf.c

[libvirt] [PATCH 0/2] Set lxc container working directory

2017-06-01 Thread Cédric Bosdonnat
Hi all, To get lxc containers set the workng directory I had to refactor virExec and virCommandExec to share some more code. Cédric Bosdonnat (2): util: share code between virExec and virCommandExec lxc: allow user to specify command working directory docs/formatdomain.html.in|

Re: [libvirt] [PATCH 3/3] virStream: Remove callbacks on Abort/Finish

2017-06-01 Thread Martin Kletzander
On Thu, Jun 01, 2017 at 01:19:05PM +0100, Daniel P. Berrange wrote: On Thu, Jun 01, 2017 at 02:08:34PM +0200, Martin Kletzander wrote: Users need to remove their callbacks before calling virStreamAbort() or virStreamFinish() even though that's not documented anywhere. Since it makes no sense to

Re: [libvirt] [PATCH v2 6/6] streams: Report errors if sendAll/recvAll callbacks fail

2017-06-01 Thread Martin Kletzander
On Thu, Jun 01, 2017 at 01:10:45PM +0100, Daniel P. Berrange wrote: On Thu, Jun 01, 2017 at 02:02:14PM +0200, Michal Privoznik wrote: We have couple of wrappers over our low level stream APIs: virSreamRecvAll(), virStreamSendAll() and their sparse stream variants. All of them take some callbacks

Re: [libvirt] [PATCH 3/3] virStream: Remove callbacks on Abort/Finish

2017-06-01 Thread Daniel P. Berrange
On Thu, Jun 01, 2017 at 02:08:34PM +0200, Martin Kletzander wrote: > Users need to remove their callbacks before calling virStreamAbort() > or virStreamFinish() even though that's not documented anywhere. > Since it makes no sense to keep those callbacks, we can remove them > when the stream is bei

Re: [libvirt] [PATCH 0/2] Two simple sparse streams fixes

2017-06-01 Thread Martin Kletzander
On Wed, May 31, 2017 at 03:08:16PM +0200, Pino Toscano wrote: On Wednesday, 31 May 2017 13:03:38 CEST Martin Kletzander wrote: - vol-download --sparse --offset $source_file_size --length 1 /path/to/source.file destination.file - Every now and then (not always) it gets stuck waiting for

Re: [libvirt] [PATCH v2 6/6] streams: Report errors if sendAll/recvAll callbacks fail

2017-06-01 Thread Daniel P. Berrange
On Thu, Jun 01, 2017 at 02:02:14PM +0200, Michal Privoznik wrote: > We have couple of wrappers over our low level stream APIs: > virSreamRecvAll(), virStreamSendAll() and their sparse stream > variants. All of them take some callbacks and call them at > appropriate times. If a callback fails it abo

[libvirt] [PATCH 1/3] Make virNetClientStreamEventRemoveCallback's errors optional

2017-06-01 Thread Martin Kletzander
There will be new place for this function to be called, but we need not to report error from there. Since the virNetClientStream structure is private, there is no way to check for st->cb from outside this file, so we need to make the error reporting optional. The function name is already long eno

[libvirt] [PATCH 2/3] remote: Consolidate remoteStream{Abort, Finish} functions

2017-06-01 Thread Martin Kletzander
They do the same thing with only one difference. Let's put them together (like we already do with virFDStreamCloseInt) so that future changes don't miss one of the implementations. Also to clean up the code. Signed-off-by: Martin Kletzander --- src/remote/remote_driver.c | 39 +

[libvirt] [PATCH 3/3] virStream: Remove callbacks on Abort/Finish

2017-06-01 Thread Martin Kletzander
Users need to remove their callbacks before calling virStreamAbort() or virStreamFinish() even though that's not documented anywhere. Since it makes no sense to keep those callbacks, we can remove them when the stream is being aborted or finished. That way it is also more intuitive for developers

[libvirt] [PATCH 0/3] Behave better for users of virStream

2017-06-01 Thread Martin Kletzander
So I was playing with one program and I was getting weird behaviour. It was also mentioned on the list by someone for some other client they were writing. I found out what we were both missing was callback removal before/after finish/abort was called. The problem is that was not intuitive at all.

Re: [libvirt] [RFC] Version numbers outside of releases

2017-06-01 Thread Daniel P. Berrange
On Thu, Jun 01, 2017 at 02:05:04PM +0200, Andrea Bolognani wrote: > On Thu, 2017-06-01 at 12:21 +0100, Daniel P. Berrange wrote: > > This is not that attractive from POV the language bindings. > >  > > eg in the Go code, I need to make usage of the new APIs > > conditional at compile time. For exam

Re: [libvirt] [RFC] Version numbers outside of releases

2017-06-01 Thread Andrea Bolognani
On Thu, 2017-06-01 at 12:21 +0100, Daniel P. Berrange wrote: > This is not that attractive from POV the language bindings. >  > eg in the Go code, I need to make usage of the new APIs > conditional at compile time. For example for the new APIs > added in 3.4.0 I have code like >  >   func (v *Strea

[libvirt] [PATCH v2 0/6] Fix error reporting in streams

2017-06-01 Thread Michal Privoznik
Technically, just 1/6 and 2/6 are v2. The rest is brand new. Whatever. Michal Privoznik (6): virfdstream: Check for thread error more frequently fdstream: Report error from the I/O thread virStream*All: Call virStreamAbort() more frequently virStream*All: Preserve reported error virsh: R

[libvirt] [PATCH v2 5/6] virsh: Report errors from stream callbacks

2017-06-01 Thread Michal Privoznik
There are couple of callbacks we pass to virStreamSendAll(), virStreamRecvAll() or its sparse variants. However, none of these callbacks reports error if one occurs and neither do the virStream* functions leaving user with very unhelpful error message: error: cannot receive data from volume fedo

[libvirt] [PATCH v2 4/6] virStream*All: Preserve reported error

2017-06-01 Thread Michal Privoznik
If one these four functions fail (virStreamRecvAll, virStreamSendAll, virStreamSparseRecvAll, virStreamSparseSendAll) the stream is aborted by calling virStreamAbort(). This is, however, an public API - therefore the first thing it does is error reset. At that point any error that caused us to abor

[libvirt] [PATCH v2 6/6] streams: Report errors if sendAll/recvAll callbacks fail

2017-06-01 Thread Michal Privoznik
We have couple of wrappers over our low level stream APIs: virSreamRecvAll(), virStreamSendAll() and their sparse stream variants. All of them take some callbacks and call them at appropriate times. If a callback fails it aborts the whole operation. However, if it so happens that the callback fails

[libvirt] [PATCH v2 2/6] fdstream: Report error from the I/O thread

2017-06-01 Thread Michal Privoznik
Problem with our error reporting is that the error object is a thread local variable. That means if there's an error reported within the I/O thread it gets logged and everything, but later when the event loop aborts the stream it doesn't see the original error. So we are left with some generic erro

[libvirt] [PATCH v2 1/6] virfdstream: Check for thread error more frequently

2017-06-01 Thread Michal Privoznik
When the I/O thread quits (e.g. due to an I/O error, lseek() error, whatever), any subsequent virFDStream API should return error too. Moreover, when invoking stream event callback, we must set the VIR_STREAM_EVENT_ERROR flag so that the callback knows something bad happened. Signed-off-by: Michal

[libvirt] [PATCH v2 3/6] virStream*All: Call virStreamAbort() more frequently

2017-06-01 Thread Michal Privoznik
Our documentation to all four virStreamRecvAll, virStreamSendAll, virStreamSparseRecvAll, virStreamSparseSendAll says that if these functions fail, virStreamAbort() is called. But that is not necessarily true. For instance all of these functions allocate a buffer to work with. If the allocation fai

Re: [libvirt] [PATCH 0/2] Two simple sparse streams fixes

2017-06-01 Thread Michal Privoznik
On 05/31/2017 01:03 PM, Martin Kletzander wrote: > On Tue, May 30, 2017 at 12:44:21PM +0200, Michal Privoznik wrote: >> I've been experimenting with sparse streams and found a bug. If you >> try to >> download a volume which doesn't support sparseness here's what happens: >> >> # virsh vol-download

Re: [libvirt] [PATCH 09/18] Add virtio-related options to interfaces

2017-06-01 Thread Jason Wang
On 2017年05月30日 21:09, Daniel P. Berrange wrote: On Tue, May 30, 2017 at 02:50:32PM +0200, Ján Tomko wrote: Feels like we could just use 'iommu=on' as the name. Also, I'm unclear whether we actually need the 'ats' attribute. From the description it sounds like if we have devi

Re: [libvirt] [RFC] Version numbers outside of releases

2017-06-01 Thread Martin Kletzander
On Thu, Jun 01, 2017 at 01:13:05PM +0200, Andrea Bolognani wrote: Our current practice when it comes to bumping the version number for libvirt is to do so immediately after a release, eg. right after 3.4.0 is released later today someone will push a commit that changes configure.ac to use 3.5.0 i

Re: [libvirt] [RFC] Version numbers outside of releases

2017-06-01 Thread Daniel P. Berrange
On Thu, Jun 01, 2017 at 01:13:05PM +0200, Andrea Bolognani wrote: > Our current practice when it comes to bumping the version > number for libvirt is to do so immediately after a release, > eg. right after 3.4.0 is released later today someone will > push a commit that changes configure.ac to use 3

[libvirt] [RFC] Version numbers outside of releases

2017-06-01 Thread Andrea Bolognani
Our current practice when it comes to bumping the version number for libvirt is to do so immediately after a release, eg. right after 3.4.0 is released later today someone will push a commit that changes configure.ac to use 3.5.0 instead. As a consequence, builds made from master will always carry

[libvirt] [PATCH go-xml] Add support for domain input address

2017-06-01 Thread zhenwei.pi
--- domain.go | 5 +++-- domain_test.go | 11 ++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/domain.go b/domain.go index bf0b851..dcb8f65 100644 --- a/domain.go +++ b/domain.go @@ -232,8 +232,9 @@ type DomainChardev struct { } type DomainInput struct { -

Re: [libvirt] [PATCH] qemu: Fix serial stub console allocation

2017-06-01 Thread Erik Skultety
On Mon, May 29, 2017 at 02:33:04PM +0200, Peter Krempa wrote: > On Mon, May 29, 2017 at 13:11:09 +0200, Erik Skultety wrote: > > When adding the aliased serial stub console, the structure wasn't > > properly allocated (VIR_ALLOC instead of virDomainChrDefNew) which then > > resulted in SIGSEGV in v

[libvirt] [PATCH] Fix closing XML element in news file

2017-06-01 Thread Daniel P. Berrange
Signed-off-by: Daniel P. Berrange --- Pushed as a trivial build fix docs/news.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/news.xml b/docs/news.xml index 6ff01ca..e95fe72 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -108,7 +108,7 @@ Endp

Re: [libvirt] [PATCH v3 1/2] virDomainXMLOption: Introduce virDomainABIStabilityDomain

2017-06-01 Thread Jiri Denemark
On Fri, May 26, 2017 at 11:58:44 +0200, Michal Privoznik wrote: > While checking for ABI stability, drivers might pose additional > checks that are not valid for general case. For instance, qemu > driver might check some memory backing attributes because of how > qemu works. But those attributes ma

Re: [libvirt] [PATCH] Add some news items for the 3.4.0 release

2017-06-01 Thread Martin Kletzander
On Thu, Jun 01, 2017 at 09:48:45AM +0200, Andrea Bolognani wrote: On Wed, 2017-05-31 at 17:44 +0200, Martin Kletzander wrote: > @@ -407,7 +404,7 @@ >   NVDIMM is new type of memory introduced into QEMU 2.6. The idea is >   that we have a non-volatile memory module that keeps the

Re: [libvirt] [PATCH go-xml] Add support for device sound

2017-06-01 Thread Daniel P. Berrange
On Thu, Jun 01, 2017 at 10:58:06AM +0800, zhenwei.pi wrote: > --- > domain.go | 11 +++ > domain_test.go | 20 > 2 files changed, 31 insertions(+) Thanks for your contribution, pushed to git Regards, Daniel -- |: https://berrange.com -o-https://www.fl

Re: [libvirt] [PATCH] Add some news items for the 3.4.0 release

2017-06-01 Thread Andrea Bolognani
On Wed, 2017-05-31 at 17:44 +0200, Martin Kletzander wrote: > > @@ -407,7 +404,7 @@ > >   NVDIMM is new type of memory introduced into QEMU 2.6. The idea is > >   that we have a non-volatile memory module that keeps the data > >   persistent across domain reboots and offers