[libvirt] [PATCH] tools: domdisplay command is not freeing the domain pointer.

2017-07-07 Thread Julio Faracco
The command 'domdisplay' is not freeing the domain pointer properly in cleanup section. See the error below: virsh # domdisplay WINDOWS7 vnc://127.0.0.1:0 virsh # quit error: One or more references were leaked after disconnect from the hypervisor Valgrind report: ==29168== 66 (56 direct, 10 i

Re: [libvirt] [PATCH 00/12] qemu: support chardev for all machvirt config

2017-07-07 Thread Andrea Bolognani
On Mon, 2017-06-26 at 14:01 -0400, Cole Robinson wrote: > Drew pointed out that we can use -chardev with machvirt platform > serial devices like: >  >   -chardev pty,id=foo >   -serial chardev:foo >  > And indeed it looks like qemu has supported this for as long as -chardev > has been around. Wirin

Re: [libvirt] [PATCH 12/12] qemu: Rename SupportsChardev to IsPlatformDevice

2017-07-07 Thread Andrea Bolognani
On Mon, 2017-06-26 at 14:01 -0400, Cole Robinson wrote: > This is only used in qemu_command.c, so move it, and clarify that > it's really about identifying if the serial config is a platform > device or not. You're not only moving and renaming the function, you're also entirely reversing its logic

Re: [libvirt] [PATCH 11/12] qemu: command: support -chardev for platform devices

2017-07-07 Thread Andrea Bolognani
On Mon, 2017-06-26 at 14:01 -0400, Cole Robinson wrote: > @@ -1877,8 +1877,8 @@ qemuProcessMonitorReportLogError(qemuMonitorPtr mon > ATTRIBUTE_UNUSED, >   >   >  static int > -qemuProcessLookupPTYs(virDomainDefPtr def, > -  virQEMUCapsPtr qemuCaps, > +qemuProcessLookupPTYs(vir

[libvirt] [PATCH go-xml] Add support for QEMU

2017-07-07 Thread Thomas Hipp
Add support for QEMU, and add test code. Signed-off-by: Thomas Hipp --- domain.go | 50 +- domain_test.go | 20 2 files changed, 53 insertions(+), 17 deletions(-) diff --git a/domain.go b/domain.go index b9b0f77..15fdb3a

[libvirt] [PATCH] qemu: domain: Add missing newline to last element in status XML formatter

2017-07-07 Thread Peter Krempa
Commit f9758109a7 did not put a newline after the element it added. --- Pushed as trivial. src/qemu/qemu_domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 8e7404da6..9a8ae26ac 100644 --- a/src/qemu/qemu_domain.c +++

[libvirt] [PATCH] configure: fix typo in nss error message

2017-07-07 Thread Pino Toscano
This error message refers to the lack of network, not to yajl. Signed-off-by: Pino Toscano --- m4/virt-nss.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m4/virt-nss.m4 b/m4/virt-nss.m4 index 8840e7b..951a74e 100644 --- a/m4/virt-nss.m4 +++ b/m4/virt-nss.m4 @@ -37,7 +37,7

Re: [libvirt] [PATCH 10/12] qemu: caps: blacklist QEMU_CAPS_CHARDEV

2017-07-07 Thread Andrea Bolognani
On Mon, 2017-06-26 at 14:01 -0400, Cole Robinson wrote: > @@ -,12 +5551,9 @@ virQEMUCapsCacheFree(virQEMUCapsCachePtr cache) >   >  bool >  virQEMUCapsSupportsChardev(const virDomainDef *def, > -   virQEMUCapsPtr qemuCaps, > +   virQEMUCapsPtr qem

Re: [libvirt] [PATCH] qemu: Use iohelper during restore

2017-07-07 Thread John Ferlan
On 01/27/2017 05:59 AM, Shivaprasad G Bhat wrote: > Commit afe6e58 & c4caab53 made necessary changes to use io-helpers > during save and restore. The commit c4caab53 missed to remove the > redundant check in qemuDomainSaveImageOpen() because of which > virFileWrapperFdNew() is not called if bypas

Re: [libvirt] [PATCH 09/12] tests: qemuxml2argv: Add some QEMU_CAPS_CHARDEV annotations

2017-07-07 Thread Andrea Bolognani
On Mon, 2017-06-26 at 14:01 -0400, Cole Robinson wrote: > Several tests are intending to test some serial/console related > bits but aren't setting QEMU_CAPS_CHARDEV. This will soon be enabled > unconditionally so let's add it ahead of time. > > * q35-virt-manager-basic: Intended to test a virt-ma

Re: [libvirt] [PATCH 08/12] tests: qemuxml2argv: Drop old style serial testing

2017-07-07 Thread Andrea Bolognani
On Mon, 2017-06-26 at 14:01 -0400, Cole Robinson wrote: > These tests are exercising old style -serial command lines. That > code will soon be removed, so drop these tests. > > Signed-off-by: Cole Robinson Reviewed-by: Andrea Bolognani -- Andrea Bolognani / Red Hat / Virtualization -- libvir

Re: [libvirt] [PATCH 07/12] tests: qemuxml2argv: drop redundant serial testing

2017-07-07 Thread Andrea Bolognani
On Mon, 2017-06-26 at 14:01 -0400, Cole Robinson wrote: > Several cases have incidental or XML which aren't > the features being tested for. Upcoming changes will cause some > churn here, so instead drop these bits now. > > Signed-off-by: Cole Robinson Reviewed-by: Andrea Bolognani -- Andre

Re: [libvirt] [PATCH 06/12] qemu: command: always use -chardev for monitor config

2017-07-07 Thread Andrea Bolognani
On Mon, 2017-06-26 at 14:01 -0400, Cole Robinson wrote: > AFAIK there aren't any cases where we will/should hit the old code > path for our supported qemu versions, so drop the old code. > > Massive test suite churn follows > > Signed-off-by: Cole Robinson Reviewed-by: Andrea Bolognani -- An

[libvirt] [PATCH 2/2] qemuDomainSetInterfaceParameters: use the temporary params variable

2017-07-07 Thread Ján Tomko
We have a temporary pointer to the currently processed parameter. Use it to save three bytes per use. --- src/qemu/qemu_driver.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 74da8c3d0..a512f2199 100644 ---

[libvirt] [PATCH 1/2] qemuDomainSetSchedulerParametersFlags: use the value_ul variable

2017-07-07 Thread Ján Tomko
We assign the unsigned long value of the currently processed parameter to a temporary value_ul variable. Use it consistently in all cases. --- src/qemu/qemu_driver.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index cdb7

[libvirt] [PATCH 0/2] qemu: Parameter usage cleanups

2017-07-07 Thread Ján Tomko
Here be patches. Ján Tomko (2): qemuDomainSetSchedulerParametersFlags: use the value_ul variable qemuDomainSetInterfaceParameters: use the temporary params variable src/qemu/qemu_driver.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) -- 2.13.0 -- libvir-list

Re: [libvirt] [PATCH 05/12] qemu: command: Drop some QEMU_CAPS_CHARDEV checks

2017-07-07 Thread Andrea Bolognani
On Mon, 2017-06-26 at 14:01 -0400, Cole Robinson wrote: > AFAIK there aren't any cases where we should fail these checks with > supported qemu versions, so just drop them. >  > Signed-off-by: Cole Robinson > --- >  src/qemu/qemu_command.c | 15 +++ >  1 file changed, 3 insertions(+), 12

Re: [libvirt] [PATCH 04/12] qemu: command: Remove old style -parallel building

2017-07-07 Thread Andrea Bolognani
On Mon, 2017-06-26 at 14:01 -0400, Cole Robinson wrote: > AFAIK there aren't any qemu arch/machine types with platform parallel > devices that would require old style -parallel config, so we shouldn't > ever need this nowadays. >  > Remove a now redundant test >  > Signed-off-by: Cole Robinson > -

Re: [libvirt] [PATCH 03/12] tests: qemuxml2argv: Add an aarch64 pci-serial test

2017-07-07 Thread Andrea Bolognani
On Mon, 2017-06-26 at 14:01 -0400, Cole Robinson wrote: > +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-pci-serial.xml > @@ -0,0 +1,17 @@ > + > +  aarch64test > +  496d7ea8-9739-544b-4ebd-ef08be936e8b > +  1048576 > +  1048576 You can leave out here. > +  1 > +   > +hvm This should be

[libvirt] [PATCH] qemu: shared disks with cache=directsync should be safe for migration

2017-07-07 Thread Peng Hao
From: Hao Peng At present shared disks can be migrated with either readonly or cache=none. But cache=directsync should be safe for migration, because both cache=directsync and cache=none don't use the host page cache, and cache=direct write through qemu block layer cache. Signed-off-by: Peng H

Re: [libvirt] [PATCH 02/12] qemu: caps: Tweak arm conditional in SupportsChardev

2017-07-07 Thread Andrea Bolognani
On Mon, 2017-06-26 at 14:01 -0400, Cole Robinson wrote: > @@ -5568,17 +5568,22 @@ virQEMUCapsSupportsChardev(const virDomainDef *def, >  if (chr->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL && >  chr->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_SPAPRVIO) >  retur

Re: [libvirt] [PATCH] tests: Add DO_TEST_PARSE_ERROR() to qemuxml2xml

2017-07-07 Thread Peter Krempa
On Fri, Jul 07, 2017 at 13:00:10 +0200, Andrea Bolognani wrote: > On Fri, 2017-07-07 at 12:48 +0200, Peter Krempa wrote: > > > qemuxml2argv already supports the ability to include test > > > cases that are known not to make it past > XML parsing, and > > > since we want to keep qemuxml2xml in sync

Re: [libvirt] [PATCH] tests: Add DO_TEST_PARSE_ERROR() to qemuxml2xml

2017-07-07 Thread Andrea Bolognani
On Fri, 2017-07-07 at 12:48 +0200, Peter Krempa wrote: > > qemuxml2argv already supports the ability to include test > > cases that are known not to make it past XML parsing, and > > since we want to keep qemuxml2xml in sync with it as much > > as possible, we need to implement this missing feature

Re: [libvirt] [PATCH] tests: Add DO_TEST_PARSE_ERROR() to qemuxml2xml

2017-07-07 Thread Peter Krempa
On Tue, Jul 04, 2017 at 15:13:51 +0200, Andrea Bolognani wrote: > qemuxml2argv already supports the ability to include test > cases that are known not to make it past XML parsing, and > since we want to keep qemuxml2xml in sync with it as much > as possible, we need to implement this missing featur

Re: [libvirt] [PATCH] tests: enable qemu 2.9 capabilities test for s390

2017-07-07 Thread Ján Tomko
On Thu, Jul 06, 2017 at 05:08:23PM +0200, Boris Fiuczynski wrote: Adjust qemu 2.9 s390 capabilites xml and enable qemu capabilities test. Signed-off-by: Boris Fiuczynski Reviewed-by: Marc Hartmayer --- tests/qemucapabilitiesdata/caps_2.9.50.s390x.xml | 8 +--- tests/qemucapabilitiestest.c

[libvirt] [PATCH v4 7/8] tests: Add testcase for virtio-crypto parsing

2017-07-07 Thread Longpeng(Mike)
Adds XML parsing and qemu commandline tests for the virtio-crypto device support. Signed-off-by: Longpeng(Mike) --- .../qemuxml2argv-virtio-crypto-builtin.xml | 26 ++ .../qemuxml2argv-virtio-crypto.args| 22 +++ .../qemuxml2xmlout-virtio-crypt

[libvirt] [PATCH v4 5/8] qemu: Implement support for 'builtin' backend for virtio-crypto

2017-07-07 Thread Longpeng(Mike)
This patch implements support for the virtio-crypto-pci device and the builtin backend in qemu. qemu is invoked with these additional parameters if the device id enabled: (to add the backend) -object cryptodev-backend-builtin,id=objcrypto0,queues=1 (to add the device) -device virtio-crypto-pci,cr

[libvirt] [PATCH v4 3/8] conf: Parse virtio-crypto in the domain XML

2017-07-07 Thread Longpeng(Mike)
This patch parse the domain XML with virtio-crypto support, the virtio-crypto XML looks like this: Signed-off-by: Longpeng(Mike) --- src/conf/domain_conf.c | 213 - src/conf/domain_conf.h | 32 +++ src/libvirt_private.syms

[libvirt] [PATCH v4 1/8] docs: schema: Add basic documentation for the virtual

2017-07-07 Thread Longpeng(Mike)
This patch documents XML elements used for support of virtual crypto devices. In the devices section in the domain XML users may specify: to enable the crypto device for guests. Signed-off-by: Longpeng(Mike) --- docs/formatdomain.html.in | 61 +

[libvirt] [PATCH v4 4/8] caps: Add qemu capabilities about virtio-crypto

2017-07-07 Thread Longpeng(Mike)
Two capabilities bits are added to track support for those: QEMU_CAPS_DEVICE_VIRTIO_CRYPTO - for the device support and QEMU_CAPS_OBJECT_CRYPTO_BUILTIN - for the backend support. Signed-off-by: Longpeng(Mike) --- src/qemu/qemu_capabilities.c | 6 ++ src/qemu/qemu_capabil

[libvirt] [PATCH v4 6/8] qemu: virtio-crypto: add ccw support

2017-07-07 Thread Longpeng(Mike)
From: Boris Fiuczynski Add device address type ccw which is supported since qemu 2.9.0. Signed-off-by: Boris Fiuczynski Reviewed-by: Marc Hartmayer --- src/qemu/qemu_command.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_c

[libvirt] [PATCH v4 2/8] docs: news: Add virtio-crypto devices

2017-07-07 Thread Longpeng(Mike)
Signed-off-by: Longpeng(Mike) --- docs/news.xml | 10 ++ 1 file changed, 10 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index a886e2c..b766984 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -35,6 +35,16 @@ + + + qemu: Add support for vir

[libvirt] [PATCH v4 0/8] Virtio-crypto device support

2017-07-07 Thread Longpeng(Mike)
As virtio-crypto has been supported in QEMU 2.8 and the frontend driver has been merged in linux 4.10, so it's necessary to support virtio-crypto in libvirt. --- Changes since v3: - spilt the capabilities part into a separate patch. [Boris] - include Boris's virtio-crypto ccw support(PATCH 6 &

[libvirt] [PATCH v4 8/8] qemu: virtio-crypto: add test for ccw support

2017-07-07 Thread Longpeng(Mike)
From: Boris Fiuczynski Add qemu command line tests for virtio-crypto ccw support. Signed-off-by: Boris Fiuczynski Reviewed-by: Marc Hartmayer --- .../qemuxml2argv-virtio-crypto-ccw.args| 22 ++ .../qemuxml2argv-virtio-crypto-ccw.xml | 16 +++

Re: [libvirt] [PATCH v3 19/26] tests: Add tests for pSeries guests with multiple PHBs

2017-07-07 Thread Andrea Bolognani
On Wed, 2017-07-05 at 21:14 -0400, Laine Stump wrote: > > The attached patch should be squashed in to make sure the new > > test implemented in [1] works correctly. In order for the test > > case to work, [2] will need to be merged first - I plan to > > squeeze it in between patches 07 and 08 befor