[libvirt] [PATCH 1/4] tests: Rename virmocklibxl.c -> libxlmock.c

2019-02-08 Thread Cole Robinson
Every other mock library is named ending in mock.c, move virmocklibxl.c to follow that pattern Signed-off-by: Cole Robinson --- tests/Makefile.am | 12 ++-- tests/{virmocklibxl.c => libxlmock.c} | 2 +- tests/libxlxml2domconfigtest.c| 2 +- 3 files changed,

[libvirt] [PATCH 2/4] tests: Create a shared library with libxl driver

2019-02-08 Thread Cole Robinson
This allows us to mock functions in the libxl driver, like is already possible for the qemu driver Signed-off-by: Cole Robinson --- tests/Makefile.am | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index c9f79a4e7d..c3f633cee

[libvirt] [PATCH 3/4] libxl: Break out libxlCapsHasPVUSB

2019-02-08 Thread Cole Robinson
No functional change, but this will allow us to mock out the function in the test suite Signed-off-by: Cole Robinson --- src/libxl/libxl_capabilities.c | 16 src/libxl/libxl_capabilities.h | 1 + 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/libxl/libxl_ca

[libvirt] [PATCH 4/4] tests: domcaps: Remove dependency on libxl PVUSB support

2019-02-08 Thread Cole Robinson
Mock out libxlCapsHasPVUSB to always return true, so test results aren't dependent on host libxl version Signed-off-by: Cole Robinson --- tests/domaincapsmock.c| 11 +++ .../domaincapsschemadata/libxl-xenfv-usb.xml | 78 --- tests/domaincapsschemadata/lib

[libvirt] [PATCH 0/4] libxl: override HAVE_PVUSB in test suite

2019-02-08 Thread Cole Robinson
There's two different domain capabilities test cases for libxl, depending on whether host libxl supports PVUSB or not. This causes pain when extending domain capabilities XML, because at least one file always needs to be updated by hand. This series adds a wrapper function for checking PVUSB, and

[libvirt] [PATCH v3 03/17] conf: Add

2019-02-08 Thread Cole Robinson
devices lack the model= attribute which is used by most other device types. bus= mostly acts as one, but it serves other purposes too like determing what target= prefix to use, and for matching against controller type= values. Extending bus= to handle additional virtio transitional devices will c

[libvirt] [PATCH v3 11/17] qemu: Support memballoon model=virtio-{non-}transitional

2019-02-08 Thread Cole Robinson
Add new model values for virtio transitional devices. Ex: * "virtio-transitional" maps to qemu "virtio-balloon-pci-transitional" * "virtio-non-transitional" maps to qemu "virtio-balloon-pci-non-transitional" Reviewed-by: Andrea Bolognani Signed-off-by: Cole Robinson --- docs/formatdomain.

[libvirt] [PATCH v3 08/17] qemu: Support rng model=virtio-{non-}transitional

2019-02-08 Thread Cole Robinson
Add new model values for virtio transitional devices. Ex: ... * "virtio-transitional" maps to qemu "virtio-rng-pci-transitional" * "virtio-non-transitional" maps to qemu "virtio-rng-pci-non-transitional" Signed-off-by: Cole Robinson --- docs/formatdomain.html.in

[libvirt] [PATCH v3 05/17] qemu: Support interface model=virtio-{non-}transitional

2019-02-08 Thread Cole Robinson
Add new model handling for virtio transitional devices. Ex: * "virtio-transitional" maps to qemu "virtio-net-pci-transitional" * "virtio-non-transitional" maps to qemu "virtio-net-pci-non-transitional" Signed-off-by: Cole Robinson --- docs/formatdomain.html.in

[libvirt] [PATCH v3 00/17] qemu: virtio-{non-}transitional support

2019-02-08 Thread Cole Robinson
v2 libvirt patches: https://www.redhat.com/archives/libvir-list/2019-January/msg00877.html v1 libvirt patches: https://www.redhat.com/archives/libvir-list/2019-January/msg00593.html Previous incomplete RFC here: https://www.redhat.com/archives/libvir-list/2019-January/msg00346.html qemu patches, qu

[libvirt] [PATCH v3 16/17] qemu: Support scsi controller model=virtio-{non-}transitional

2019-02-08 Thread Cole Robinson
Add * "virtio-transitional" maps to qemu "virtio-scsi-pci-transitional" * "virtio-non-transitional" maps to qemu "virtio-scsi-non-transitional" The naming here doesn't match the pre-existing model=virtio-scsi. The prescence of '-scsi' there seems kind of redundant as we have type='scsi' already,

[libvirt] [PATCH v3 09/17] conf: Add

2019-02-08 Thread Cole Robinson
devices lack the model= attribute which is used by most other device types. To eventually support virtio-9p-pci-{non-}traditional in qemu, let's add a standard model= attribute. The accepted values are: - virtio - virtio-transitional - virtio-non-transitional Signed-off-by: Cole Robinson --- d

[libvirt] [PATCH v3 06/17] conf: Add

2019-02-08 Thread Cole Robinson
qemu vhost-scsi devices map to XML roughly like: To support vhost-scsi-pci-{non-}traditional in qemu, we need to to extend the SCSI Host hostdev XML to handle model= value. This matches the XML model= format used for mediated devices. This is just the domain_conf bits and some XM

[libvirt] [PATCH v3 01/17] qemu: command: Add qemuCaps to BuildVirtioStr

2019-02-08 Thread Cole Robinson
It will be used in future patches Reviewed-by: Andrea Bolognani Signed-off-by: Cole Robinson --- src/qemu/qemu_command.c | 30 -- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 572d3bc20f..a26f6

[libvirt] [PATCH v3 17/17] qemu: domcaps: Report disk

2019-02-08 Thread Cole Robinson
This generates new XML like: virtio virtio-transitional virtio-non-transitional Signed-off-by: Cole Robinson --- src/conf/domain_capabilities.c| 1 + src/conf/domain_capabilities.h| 1 + src/qemu/qemu_capabiliti

[libvirt] [PATCH v3 07/17] qemu: Support hostdev model=virtio-{non-}transitional

2019-02-08 Thread Cole Robinson
Add protocol=vhost model handling for virtio transitional devices. Ex: * "virtio-transitional" maps to qemu "vhost-scsi-pci-transitional" * "virtio-non-transitional" maps to qemu "vhost-scsi-pci-non-transitional" Signed-off-by: Cole Robinson --- src/qemu/qemu_command.c

[libvirt] [PATCH v3 15/17] qemu: Support virtio-serial controller model=virtio-{non-}transitional

2019-02-08 Thread Cole Robinson
Add controller type='virtio-serial' model handling for virtio transitional devices. Ex: * "virtio-transitional" maps to qemu "virtio-serial-pci-transitional" * "virtio-non-transitional" maps to qemu "virtio-serial-pci-non-transitional" Reviewed-by: Andrea Bolognani Signed-off-by: Cole Robins

[libvirt] [PATCH v3 14/17] qemu: Support input model=virtio-{non-}transitional

2019-02-08 Thread Cole Robinson
Add model handling for virtio transitional devices. Ex: ... * "virtio-transitional" maps to qemu "virtio-input-host-pci-transitional" * "virtio-non-transitional" maps to qemu "virtio-input-host-non-transitional" Reviewed-by: Andrea Bolognani Signed-off-by: Cole Robinson --- src/qem

[libvirt] [PATCH v3 12/17] qemu: Support vsock model=virtio-{non-}transitional

2019-02-08 Thread Cole Robinson
Add model handling for virtio transitional devices. Ex: ... * "virtio-transitional" maps to qemu "vhost-vsock-pci-transitional" * "virtio-non-transitional" maps to qemu "vhost-vsock-pci-non-transitional" Reviewed-by: Andrea Bolognani Signed-off-by: Cole Robinson --- docs/formatdoma

[libvirt] [PATCH v3 10/17] qemu: Support filesystem model=virtio-{non-}transitional

2019-02-08 Thread Cole Robinson
Add model handling for virtio transitional devices. Ex: ... --- src/qemu/qemu_command.c | 6 - src/qemu/qemu_domain_address.c| 14 +-- .../virtio-non-transitional.x86_64-3.1.0.args | 3 ++- ...virtio-non-transitional.x86_64-latest.arg

[libvirt] [PATCH v3 13/17] conf: Add

2019-02-08 Thread Cole Robinson
devices lack the model= attribute which is used by most other device types. To eventually support virtio-input-host-pci-{non-}traditional in qemu, let's add a standard model= attribute. This just adds the domain_conf wiring Reviewed-by: Andrea Bolognani Signed-off-by: Cole Robinson --- docs/fo

[libvirt] [PATCH v3 04/17] qemu: Support disk model=virtio-{non-}transitional

2019-02-08 Thread Cole Robinson
Add new model values for virtio transitional devices. When combined with bus='virtio': * "virtio-transitional" maps to qemu "virtio-blk-pci-transitional" * "virtio-non-transitional" maps to qemu "virtio-blk-pci-non-transitional" Signed-off-by: Cole Robinson --- src/qemu/qemu_command.c

[libvirt] [PATCH v3 02/17] qemu: capabilities: Add virtio/vhost {non-}transitional

2019-02-08 Thread Cole Robinson
Add a single QEMU_CAPS_VIRTIO_PCI_NON_TRANSITIONAL that will be set if any of the following qemu devices are found: virtio-blk-pci-transitional virtio-blk-pci-non-transitional virtio-net-pci-transitional virtio-net-pci-non-transitional vhost-scsi-pci-transitional vhost-scsi

[libvirt] [PATCH v2 24/32] tests: Fix memory leak in testCompareXMLToArgvFiles

2019-02-08 Thread John Ferlan
Only one path will consume the @def; otherwise, we need to free it. Signed-off-by: John Ferlan --- tests/storagepoolxml2argvtest.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/storagepoolxml2argvtest.c b/tests/storagepoolxml2argvtest.c index 288b81af1d..f2a8af12b0 100644 --- a/t

[libvirt] [PATCH v2 21/32] test: Use VIR_AUTOFREE for test driver

2019-02-08 Thread John Ferlan
Let's make use of the auto __cleanup capabilities cleaning up any now unnecessary goto paths. Signed-off-by: John Ferlan Reviewed-by: Erik Skultety --- src/test/test_driver.c | 169 - 1 file changed, 66 insertions(+), 103 deletions(-) diff --git a/src/te

[libvirt] [PATCH v2 27/32] util: Rename variable in virStorageSourceCopy

2019-02-08 Thread John Ferlan
To prepare for subsequent change to use VIR_AUTOPTR logic rename the @ret to @def. Signed-off-by: John Ferlan --- src/util/virstoragefile.c | 96 +++ 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/src/util/virstoragefile.c b/src/util/virstorag

[libvirt] [PATCH v2 26/32] util: Rename variable in virStorageFileMetadataNew

2019-02-08 Thread John Ferlan
To prepare for subsequent change to use VIR_AUTOPTR logic rename the @ret to @def. Signed-off-by: John Ferlan --- src/util/virstoragefile.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 907358a8fe..a

[libvirt] [PATCH v2 32/32] util: Introduce VIR_DEFINE_AUTOPTR_FUNC for virStorageSource

2019-02-08 Thread John Ferlan
Let's make use of the auto __cleanup capabilities cleaning up any now unnecessary goto paths. Signed-off-by: John Ferlan --- src/conf/domain_conf.c| 3 +- src/qemu/qemu_domain.c| 3 +- src/qemu/qemu_driver.c| 9 +- src/qemu/qemu_migration.c

[libvirt] [PATCH v2 20/32] test: Remove unused @xml from testDomainSnapshotCreateXML

2019-02-08 Thread John Ferlan
Commit 390c06b67 added @xml, but it was never used. Signed-off-by: John Ferlan Reviewed-by: Erik Skultety --- src/test/test_driver.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index f51efa51b7..1dde92e961 100644 --- a/src/test/test_drive

[libvirt] [PATCH v2 31/32] tests: Rename variable in testStorageFileGetMetadata

2019-02-08 Thread John Ferlan
To prepare for subsequent change to use VIR_AUTOPTR logic rename the @ret to @def. Signed-off-by: John Ferlan --- tests/virstoragetest.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c index 49b8f42e6d..8d

[libvirt] [PATCH v2 30/32] util: Rename variable in virStorageSourceNewFromBacking

2019-02-08 Thread John Ferlan
To prepare for subsequent change to use VIR_AUTOPTR logic rename the @ret to @def. Signed-off-by: John Ferlan --- src/util/virstoragefile.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c ind

[libvirt] [PATCH v2 18/32] util: Use VIR_AUTOFREE for virstoragefile

2019-02-08 Thread John Ferlan
Let's make use of the auto __cleanup capabilities cleaning up any now unnecessary goto paths. Signed-off-by: John Ferlan Reviewed-by: Erik Skultety --- src/util/virstoragefile.c | 128 ++ 1 file changed, 46 insertions(+), 82 deletions(-) diff --git a/src/uti

[libvirt] [PATCH v2 23/32] storage: Use VIR_AUTOCLOSE

2019-02-08 Thread John Ferlan
Modify code to use the VIR_AUTOCLOSE logic cleaning up any now unnecessary goto paths. Signed-off-by: John Ferlan Reviewed-by: Erik Skultety --- src/storage/storage_backend_logical.c | 3 +- src/storage/storage_backend_scsi.c| 12 +-- src/storage/storage_file_fs.c | 15 +-- src/

[libvirt] [PATCH v2 15/32] storage: Use VIR_AUTOFREE for storage util

2019-02-08 Thread John Ferlan
Let's make use of the auto __cleanup capabilities cleaning up any now unnecessary goto paths. Signed-off-by: John Ferlan --- src/storage/storage_util.c | 335 + 1 file changed, 113 insertions(+), 222 deletions(-) diff --git a/src/storage/storage_util.c b/src/

[libvirt] [PATCH v2 11/32] storage: Use VIR_AUTOPTR(virCommand)

2019-02-08 Thread John Ferlan
Let's make use of the auto __cleanup capabilities cleaning up any now unnecessary goto paths. Signed-off-by: John Ferlan Reviewed-by: Erik Skultety --- src/storage/storage_backend_disk.c | 85 + src/storage/storage_backend_fs.c | 39 +++--- src/storage/storag

[libvirt] [PATCH v2 09/32] conf: Introduce VIR_DEFINE_AUTOPTR_FUNC for virStoragePoolDef

2019-02-08 Thread John Ferlan
Let's make use of the auto __cleanup capabilities cleaning up any now unnecessary goto paths. Signed-off-by: John Ferlan Reviewed-by: Erik Skultety --- src/conf/domain_conf.c | 3 +-- src/conf/storage_conf.c| 3 +-- src/conf/storage_conf.h| 1 + src/conf/v

[libvirt] [PATCH v2 29/32] util: Rename variable in virStorageSourceNewFromBackingAbsolute

2019-02-08 Thread John Ferlan
To prepare for subsequent change to use VIR_AUTOPTR logic rename the @ret to @def. Signed-off-by: John Ferlan --- src/util/virstoragefile.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c ind

[libvirt] [PATCH v2 25/32] storage: Use VIR_STEAL_PTR in storageBackendProbeTarget

2019-02-08 Thread John Ferlan
Signed-off-by: John Ferlan Reviewed-by: Erik Skultety --- src/storage/storage_util.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c index 012c6b319b..af6ab20ea6 100644 --- a/src/storage/storage_util.c +++ b/src/st

[libvirt] [PATCH v2 12/32] storage: Use VIR_AUTOFREE for storage backends

2019-02-08 Thread John Ferlan
Let's make use of the auto __cleanup capabilities. This also allows for the cleanup of some goto paths. Signed-off-by: John Ferlan --- src/storage/storage_backend.c | 9 +-- src/storage/storage_backend_disk.c | 62 ++--- src/storage/storage_backend_fs.c

[libvirt] [PATCH v2 22/32] tests: Use VIR_AUTOFREE for various storage tests

2019-02-08 Thread John Ferlan
Let's make use of the auto __cleanup capabilities cleaning up any now unnecessary goto paths. Signed-off-by: John Ferlan Reviewed-by: Erik Skultety --- tests/storagebackendsheepdogtest.c | 50 -- tests/storagepoolxml2argvtest.c| 18 +++ tests/storagepoolx

[libvirt] [PATCH v2 17/32] util: Use VIR_STEAL_PTR in virstoragefile

2019-02-08 Thread John Ferlan
virStorageFileGetRelativeBackingPath and virStorageFileGetMetadataRecurse open coded. Signed-off-by: John Ferlan Reviewed-by: Erik Skultety --- src/util/virstoragefile.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile

[libvirt] [PATCH v2 14/32] util: Fix virStorageBackendSCSINewLun error handling

2019-02-08 Thread John Ferlan
Commit a523770c3 added @retval return processing for virStorageBackendUpdateVolInfo in order to allow a -2 to be return; however, upon successful completion @retval = 0 and if either the virStorageBackendSCSISerial or the virStoragePoolObjAddVol failed, the method would return 0, but not add the @v

[libvirt] [PATCH v2 28/32] util: Rename variable in virStorageSourceNewFromBackingRelative

2019-02-08 Thread John Ferlan
To prepare for subsequent change to use VIR_AUTOPTR logic rename the @ret to @def. Signed-off-by: John Ferlan --- src/util/virstoragefile.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c ind

[libvirt] [PATCH v2 10/32] storage: Use VIR_AUTOPTR(virString)

2019-02-08 Thread John Ferlan
Let's make use of the auto __cleanup capabilities cleaning up any now unnecessary goto paths. Signed-off-by: John Ferlan Reviewed-by: Erik Skultety --- src/storage/storage_backend_iscsi_direct.c | 3 +- src/storage/storage_backend_sheepdog.c | 6 +-- src/storage/storage_backend_zfs.c

[libvirt] [PATCH v2 13/32] storage: Use VIR_AUTOFREE for storage driver

2019-02-08 Thread John Ferlan
Let's make use of the auto __cleanup capabilities cleaning up any now unnecessary goto paths. Signed-off-by: John Ferlan Reviewed-by: Erik Skultety --- src/storage/storage_driver.c | 70 1 file changed, 23 insertions(+), 47 deletions(-) diff --git a/src/sto

[libvirt] [PATCH v2 19/32] test: Cleanup testDomainRenameCallback

2019-02-08 Thread John Ferlan
Rather than have a need for old_dom_name, let's just VIR_FREE the old name first, then use VIR_STEAL_PTR to handle the swap from the old name to the new name. Signed-off-by: John Ferlan Reviewed-by: Erik Skultety --- src/test/test_driver.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletio

[libvirt] [PATCH v2 06/32] conf: Rework virStorageVolDefParseXML

2019-02-08 Thread John Ferlan
Rather than having an error path, let's rework the code to allocate and fill into an @def variable and then steal that into @ret when we are successful leaving just a cleanup: path. Signed-off-by: John Ferlan Reviewed-by: Erik Skultety --- src/conf/storage_conf.c | 113 -

[libvirt] [PATCH v2 16/32] conf: Use VIR_AUTOFREE for storage_conf

2019-02-08 Thread John Ferlan
Let's make use of the auto __cleanup capabilities cleaning up any now unnecessary goto paths. Signed-off-by: John Ferlan Reviewed-by: Erik Skultety --- src/conf/storage_conf.c | 179 +--- 1 file changed, 74 insertions(+), 105 deletions(-) diff --git a/src/co

[libvirt] [PATCH v2 07/32] conf: Introduce VIR_DEFINE_AUTOPTR_FUNC for virStorageVolDef

2019-02-08 Thread John Ferlan
Let's make use of the auto __cleanup capabilities cleaning up any now unnecessary goto paths. Signed-off-by: John Ferlan Reviewed-by: Erik Skultety --- src/conf/storage_conf.c| 3 +-- src/conf/storage_conf.h| 1 + src/esx/esx_storage_backend_vmfs.c

[libvirt] [PATCH v2 08/32] conf: Rework virStoragePoolDefParseXML

2019-02-08 Thread John Ferlan
Rather than having an error path, let's rework the code to allocate and fill into an @def variable and then steal that into @ret when we are successful leaving just a cleanup: path. Signed-off-by: John Ferlan --- src/conf/storage_conf.c | 114 1 file chan

[libvirt] [PATCH v2 03/32] util: Introduce VIR_DEFINE_AUTOPTR_FUNC for virStorageAuthDef

2019-02-08 Thread John Ferlan
Let's make use of the auto __cleanup capabilities cleaning up any now unnecessary goto paths. Signed-off-by: John Ferlan Reviewed-by: Erik Skultety --- src/conf/domain_conf.c| 26 ++ src/conf/storage_conf.c | 3 +-- src/qemu/qemu_parse_command.c | 3 +--

[libvirt] [PATCH v2 00/32] Make use of autofree within storage code

2019-02-08 Thread John Ferlan
v1: https://www.redhat.com/archives/libvir-list/2019-February/msg00187.html Much of this was R-by'd for V1 with caveats for splitting things out, etc. Still since there isn't an end of release rush ;-) - I figure reposting everything before doing any sort of push would be more prudent and conserva

[libvirt] [PATCH v2 05/32] storage: Use VIR_STEAL_PTR for gluster volume processing

2019-02-08 Thread John Ferlan
Signed-off-by: John Ferlan Reviewed-by: Erik Skultety --- src/storage/storage_backend_gluster.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/storage/storage_backend_gluster.c b/src/storage/storage_backend_gluster.c index 559189fd1d..6759d7f1e5 100644 --- a/src/s

[libvirt] [PATCH v2 04/32] conf: Introduce VIR_DEFINE_AUTOPTR_FUNC for virStoragePoolSource

2019-02-08 Thread John Ferlan
Let's make use of the auto __cleanup capabilities cleaning up any now unnecessary goto paths. Signed-off-by: John Ferlan Reviewed-by: Erik Skultety --- src/conf/storage_conf.c| 4 ++-- src/conf/storage_conf.h| 2 ++ src/storage/storage_backend_fs.c

[libvirt] [PATCH v2 02/32] util: Rework virStorageAuthDefCopy

2019-02-08 Thread John Ferlan
Rather than having an error path, let's rework the code to allocate and fill into an @authdef variable and then steal that into @ret when we are successful leaving just a cleanup: path. Signed-off-by: John Ferlan Reviewed-by: Erik Skultety --- src/util/virstoragefile.c | 26 +---

[libvirt] [PATCH v2 01/32] conf, util, qemu: Use VIR_STEAL_PTR for authdef processing

2019-02-08 Thread John Ferlan
Signed-off-by: John Ferlan Reviewed-by: Erik Skultety --- src/conf/domain_conf.c| 3 +-- src/conf/storage_conf.c | 3 +-- src/qemu/qemu_parse_command.c | 3 +-- src/util/virstoragefile.c | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/conf/domain_con

Re: [libvirt] [PATCH v1 1/1] virhostcpu.c: consider empty NUMA nodes in topology validation

2019-02-08 Thread Daniel Henrique Barboza
On 2/8/19 3:07 PM, Andrea Bolognani wrote: On Fri, 2019-02-08 at 14:14 +0100, Jiri Denemark wrote: On Fri, Feb 08, 2019 at 11:03:34 -0200, Daniel Henrique Barboza wrote: Some devices creates empty (= cpu-less) NUMA nodes to host its memory. This results in topologies where the following sani

Re: [libvirt] [PATCH v1 1/1] virhostcpu.c: consider empty NUMA nodes in topology validation

2019-02-08 Thread Andrea Bolognani
On Fri, 2019-02-08 at 14:14 +0100, Jiri Denemark wrote: > On Fri, Feb 08, 2019 at 11:03:34 -0200, Daniel Henrique Barboza wrote: > > Some devices creates empty (= cpu-less) NUMA nodes to host > > its memory. This results in topologies where the following > > sanity rule does not apply as is: > > >

Re: [libvirt] [PATCH 2/2] tests: Document procedure to build QEMU for *.replies generation

2019-02-08 Thread John Ferlan
On 2/7/19 3:28 AM, Pavel Hrdina wrote: > On Wed, Feb 06, 2019 at 03:38:03PM -0500, Cole Robinson wrote: >> On 1/23/19 3:59 PM, John Ferlan wrote: >>> Add some comments to describe how to set up the QEMU environment >>> prior to running the qemucapsprobe in order to allow for the >>> creation of

[libvirt] [jenkins-ci PATCH 4/5] jenkins: Fix a couple small issues in README

2019-02-08 Thread Andrea Bolognani
Jobs have been renamed a while ago, and all Perl projects have moved from ExtUtils::MakeMaker to Module::Build. Signed-off-by: Andrea Bolognani --- jenkins/README.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jenkins/README.markdown b/jenkins/README.markdown in

[libvirt] [jenkins-ci PATCH 1/5] jenkins: Move all Jenkins-related files

2019-02-08 Thread Andrea Bolognani
While the repository was initially intended to only store the Jenkins-level job definitions, its scope has since been expanded by adding tools to manage the guests such jobs will ultimately be executed on; in fact, the latter currently takes up almost ten times as many lines of code as the former.

[libvirt] [jenkins-ci PATCH 3/5] guests: Fix a small issue in README

2019-02-08 Thread Andrea Bolognani
We've split the 32-bit and 64-bit MinGW builds for a while, so the relevant examples need to be updated. Signed-off-by: Andrea Bolognani --- guests/README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guests/README.markdown b/guests/README.markdown index 65beb6a..a

[libvirt] [PATCH] qemu: do not format in qemu caps XML

2019-02-08 Thread Ján Tomko
Since commit a7424faff QMP is always used. Also, commit 932534e8 removed the last use of this apart from: * parsing/formatting this in the caps cache * using it as a temporary variable to know when to report an error Signed-off-by: Ján Tomko --- Note that the second use should be removed by this

[libvirt] [jenkins-ci PATCH 5/5] jenkins: Add YAML start of document marker

2019-02-08 Thread Andrea Bolognani
It's best practice to have it, and that's already the case for all Ansible-related files. Add it to Jenkins-related files as well. Signed-off-by: Andrea Bolognani --- jenkins/jobs/autotools.yaml | 2 +- jenkins/jobs/defaults.yaml| 2 +- jenkins/jobs/generic.

[libvirt] [jenkins-ci PATCH 2/5] README: Add short overview of the repository

2019-02-08 Thread Andrea Bolognani
Now that we have moved all Jenkins-specific files, including the corresponding README, to their own directory, we need to have a short explanation of what the repository is about and how to navigate it. Signed-off-by: Andrea Bolognani --- README.markdown | 14 ++ 1 file changed, 14 i

[libvirt] [jenkins-ci PATCH 0/5] Tidy up top-level directory and fix a few small issues

2019-02-08 Thread Andrea Bolognani
Andrea Bolognani (5): jenkins: Move all Jenkins-related files README: Add short overview of the repository guests: Fix a small issue in README jenkins: Fix a couple small issues in README jenkins: Add YAML start of document marker README.markdown | 56 -

Re: [libvirt] [PATCH 1/2] tests: Add mocking for qemuMonitorJSONGetSEVCapabilities

2019-02-08 Thread John Ferlan
On 2/7/19 3:36 AM, Erik Skultety wrote: > On Wed, Feb 06, 2019 at 03:32:44PM -0500, Cole Robinson wrote: >> On 1/23/19 3:59 PM, John Ferlan wrote: >>> Commit d4005609 added "altered" capabilities replies output >>> in order to fake a 'query-sev-capabilities' reply from QEMU. >>> This worked fine

Re: [libvirt] [PATCH 9/9] rpc: client: stream: fix multi thread abort/finish

2019-02-08 Thread Michal Privoznik
On 2/7/19 1:58 PM, Nikolay Shirokovskiy wrote: If 2 threads call abort for example then one of them will hang because client will send 2 abort messages and server will reply only on first of them, the second will be ignored. And on server reply client changes the state only one of abort message t

Re: [libvirt] [PATCH 3/9] rpc: remove unused virNetClientSendNoReply

2019-02-08 Thread Michal Privoznik
On 2/7/19 1:58 PM, Nikolay Shirokovskiy wrote: Signed-off-by: Nikolay Shirokovskiy --- src/libvirt_remote.syms | 1 - src/rpc/virnetclient.c | 22 -- 2 files changed, 23 deletions(-) Forgot to remove it from the header file. Michal -- libvir-list mailing list libvi

Re: [libvirt] [PATCH 6/9] rpc: client: incapsulate error checks

2019-02-08 Thread Michal Privoznik
On 2/7/19 1:58 PM, Nikolay Shirokovskiy wrote: Checking virNetClientStreamRaiseError without client lock is racy which is fixed in [1] for example. Thus let's remove such checks when we are sending message to server. And in other cases (like virNetClientStreamRecvHole for example) let's move the

Re: [libvirt] [PATCH 0/9] rpc: make client streams multi-thread safer

2019-02-08 Thread Michal Privoznik
On 2/7/19 1:58 PM, Nikolay Shirokovskiy wrote: Nikolay Shirokovskiy (9): rpc: fix race on stream abort/finish and server side abort rpc: use single function to send stream messages rpc: remove unused virNetClientSendNoReply rpc: fix propagation of errors from server rpc: add mising

Re: [libvirt] [PATCH 15/15] util: Introduce VIR_DEFINE_AUTOPTR_FUNC for virStorageSource

2019-02-08 Thread John Ferlan
On 2/8/19 3:07 AM, Erik Skultety wrote: > On Wed, Feb 06, 2019 at 08:41:47AM -0500, John Ferlan wrote: >> Let's make use of the auto __cleanup capabilities cleaning up any >> now unnecessary goto paths. A few methods were modified to use a >> more common methodology of defining/using @def and th

Re: [libvirt] [PATCH 09/15] storage: Use VIR_AUTOFREE for storage util

2019-02-08 Thread John Ferlan
On 2/7/19 9:32 AM, Erik Skultety wrote: > On Wed, Feb 06, 2019 at 08:41:41AM -0500, John Ferlan wrote: >> Let's make use of the auto __cleanup capabilities cleaning up any >> now unnecessary goto paths. >> >> Signed-off-by: John Ferlan >> --- > > [snip] > >> @@ -3804,7 +3713,7 @@ virStorageBa

Re: [libvirt] [PATCH 07/15] storage: Use VIR_AUTOFREE for storage backends

2019-02-08 Thread John Ferlan
[...] >> diff --git a/src/storage/storage_backend_iscsi_direct.c >> b/src/storage/storage_backend_iscsi_direct.c >> index 82fa4d7a25..6458b0f835 100644 >> --- a/src/storage/storage_backend_iscsi_direct.c >> +++ b/src/storage/storage_backend_iscsi_direct.c >> @@ -421,15 +421,14 @@ virISCSIDirectUp

[libvirt] [PATCH v2 2/3] qemu: Add support for parallel migration

2019-02-08 Thread Jiri Denemark
The VIR_MIGRATE_PARALLEL flag is implemented using QEMU's multifd migration capability and the corresponding multifd-channels migration parameter. Signed-off-by: Jiri Denemark --- Notes: QEMU still uses the x- prefix for multifd capability and multifd-channels, but Juan already sent a se

[libvirt] [PATCH v2 1/3] Public API for parallel migration

2019-02-08 Thread Jiri Denemark
This patch adds a new VIR_MIGRATE_PARALLEL flag for migration APIs which will ask the hypervisor to use multiple parallel connections for migrating a domain. The number of parallel connections can be set using VIR_MIGRATE_PARAM_PARALLEL_CONNECTIONS typed parameter. Signed-off-by: Jiri Denemark --

[libvirt] [PATCH v2 0/3] qemu: Add support for parallel migration

2019-02-08 Thread Jiri Denemark
This series adds a new VIR_MIGRATE_PARALLEL flag for migration APIs which will ask the hypervisor to use multiple parallel connections for migrating a domain. The number of parallel connections can be set using VIR_MIGRATE_PARAM_PARALLEL_CONNECTIONS typed parameter. Version 2: - rebased Jiri Dene

[libvirt] [PATCH v2 3/3] virsh: Add options for parallel migration

2019-02-08 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- tools/virsh-domain.c | 19 +++ tools/virsh.pod | 7 +++ 2 files changed, 26 insertions(+) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 8b20059335..c704faf7e1 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c

Re: [libvirt] [PATCH v2 2/2] qemu: implement debugcon-isa chardev

2019-02-08 Thread Andrea Bolognani
On Thu, 2019-02-07 at 14:31 +0300, Nikolay Shirokovskiy wrote: [...] > @@ -393,9 +393,11 @@ qemuBuildDeviceAddressStr(virBufferPtr buf, >info->addr.ccw.ssid, >info->addr.ccw.devno); > } else if (info->type == VIR_DOMAIN_DEVICE_ADD

Re: [libvirt] [PATCH 04/15] conf: Introduce VIR_DEFINE_AUTOPTR_FUNC for virStoragePoolDef

2019-02-08 Thread John Ferlan
[...] >> @@ -1590,14 +1590,12 @@ virStoragePoolObjLoad(virStoragePoolObjListPtr pools, >> _("Storage pool config filename '%s' does " >> "not match pool name '%s'"), >> path, def->name); >> -virStoragePoolDefFree(

Re: [libvirt] [PATCH v2 1/2] conf: add debugcon chardev guest interface

2019-02-08 Thread Andrea Bolognani
On Thu, 2019-02-07 at 14:31 +0300, Nikolay Shirokovskiy wrote: [...] > @@ -4392,6 +4393,9 @@ virDomainDefAddConsoleCompat(virDomainDefPtr def) > > switch ((virDomainChrSerialTargetType) def->serials[0]->targetType) { > case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_ISA: > +i

Re: [libvirt] [PATCH] docs: storage: owner/group default to libvirtd UID/GID

2019-02-08 Thread Michal Privoznik
On 2/7/19 12:36 AM, Cole Robinson wrote: Commit fafcc818f changed the docs to say that when creating a pool directory or file volume with no owner/group specified, they will be inherited from the parent directory. This isn't correct now and doesn't seem to have ever been correct In reality defau

Re: [libvirt] [PATCH 2/3] qemu: Add support for parallel migration

2019-02-08 Thread Michal Privoznik
On 2/6/19 5:09 PM, Jiri Denemark wrote: The VIR_MIGRATE_PARALLEL flag is implemented using QEMU's multifd migration capability and the corresponding multifd-channels migration parameter. Signed-off-by: Jiri Denemark --- Notes: QEMU still uses the x- prefix for multifd capability and multi

Re: [libvirt] [PATCH 0/9] qemu: Make qemu_domain more organized and consistent

2019-02-08 Thread Michal Privoznik
On 2/6/19 2:46 PM, Andrea Bolognani wrote: A while ago I was looking at the code and got annoyed by the lack of consistency, both internal and external. This series addresses most of it. Andrea Bolognani (9): qemu: Remove redundant condition qemu: Use more specific prefixes qemu: Move f

Re: [libvirt] [PATCH v1 1/1] virhostcpu.c: consider empty NUMA nodes in topology validation

2019-02-08 Thread Jiri Denemark
On Fri, Feb 08, 2019 at 11:03:34 -0200, Daniel Henrique Barboza wrote: > Some devices creates empty (= cpu-less) NUMA nodes to host > its memory. This results in topologies where the following > sanity rule does not apply as is: > > nodes * sockets * cores * threads = total_cpus > > As a result,

[libvirt] [PATCH v1 1/1] virhostcpu.c: consider empty NUMA nodes in topology validation

2019-02-08 Thread Daniel Henrique Barboza
Some devices creates empty (= cpu-less) NUMA nodes to host its memory. This results in topologies where the following sanity rule does not apply as is: nodes * sockets * cores * threads = total_cpus As a result, a call to 'virsh nodeinfo' will return the default value (1) to nodes, sockets and th

Re: [libvirt] [PATCH] util: Use a semicolon for all VIR_DEFINE_AUTOPTR_FUNC

2019-02-08 Thread Erik Skultety
On Fri, Feb 08, 2019 at 06:52:08AM -0500, John Ferlan wrote: > For consistency, let's use the semicolon for all definitions. > > Signed-off-by: John Ferlan > --- > > As discussed in the other series - Reviewed-by: Erik Skultety -- libvir-list mailing list libvir-list@redhat.com https://www.red

[libvirt] [PATCH] util: Use a semicolon for all VIR_DEFINE_AUTOPTR_FUNC

2019-02-08 Thread John Ferlan
For consistency, let's use the semicolon for all definitions. Signed-off-by: John Ferlan --- As discussed in the other series - src/qemu/qemu_migration_params.h | 2 +- src/util/virauthconfig.h | 2 +- src/util/virbitmap.h | 2 +- src/util/virbuffer.c | 2 +-

Re: [libvirt] [PATCH] docs: Update the AMD SEV's spec URL

2019-02-08 Thread Andrea Bolognani
On Fri, 2019-02-08 at 11:46 +0100, Erik Skultety wrote: > Luckily, the new URL still points to the same location, the only change > is in the document name where an escaped space (%20) was replaced by an > underscore. > > Signed-off-by: Erik Skultety > --- > docs/formatdomain.html.in | 4 ++-

[libvirt] [PATCH 1/5] tools: Cleanup packet-libvirt.h

2019-02-08 Thread Michal Privoznik
Move the majority of the packet-libvirt.h content into packet-libvirt.c and expose only register functions which are the only ones that are not static. The rationale behind is that packet-libvirt.h will be included from packet.c and therefore the header file needs to be as clean as possible. Sign

[libvirt] [PATCH 5/5] tools: Drop support for pre-2.4.0 wireshark

2019-02-08 Thread Michal Privoznik
The wireshark-2.4.0 is almost 2 years old now. Assuming anybody interested in running latest libvirt doesn't run old wireshark, it is safe to do this. It also simplifies the code. Signed-off-by: Michal Privoznik --- libvirt.spec.in | 8 ++ m4/virt-wireshark.m4

[libvirt] [PATCH 2/5] tools: Keep wireshark plugin registration code in git

2019-02-08 Thread Michal Privoznik
In order to be able to dissect libvirt protocol the wireshark plugin needs to be registered. So far this plugin registration code was generated on every build using a script that was copied over from wireshark's tools/ directory. This is suboptimal, because the way that plugins register changes ac

[libvirt] [PATCH 0/5] tools: Adapt to newer wireshark

2019-02-08 Thread Michal Privoznik
While implementing some other feature I wanted to use wireshark to debug a migration issue. Only then I found that our wireshark plugin is no longer being loaded. Here are the fixes. Michal Prívozník (5): tools: Cleanup packet-libvirt.h tools: Keep wireshark plugin registration code in git w

[libvirt] [PATCH 4/5] m4: Put wireshark plugin into epan/ directory

2019-02-08 Thread Michal Privoznik
Since wirshark-2.5.0 toplevel plugins are no longer loaded. Only plugins from epan/, wiretap/ or codecs/ subdirs are. Update the plugin dir we generate. This is safe to do even for older wiresharks, since they load plugins from there too. Signed-off-by: Michal Privoznik --- libvirt.spec.in

[libvirt] [PATCH 3/5] wireshark: Provide registration code for newer wireshark

2019-02-08 Thread Michal Privoznik
As advertised in previous commits, wireshark has changed the way that plugins register. In fact, it has done so two times since the last time we've touched our code (wireshark v2.5.0 and v2.9.0). Use the wireshark script from respective releases to generate newer registration callbacks and put them

Re: [libvirt] [Qemu-devel] [PATCH v3 16/17] qmp: Deprecate query-events in favor of query-qmp-schema

2019-02-08 Thread Peter Krempa
On Thu, Feb 07, 2019 at 14:46:41 +0100, Markus Armbruster wrote: > Peter Krempa writes: > > > On Wed, Feb 06, 2019 at 12:42:05 -0600, Eric Blake wrote: > >> Adding libvirt in cc > >> > >> On 2/6/19 12:17 PM, Markus Armbruster wrote: > >> > query-events doesn't reflect compile-time configuration.

[libvirt] [PATCH] docs: Update the AMD SEV's spec URL

2019-02-08 Thread Erik Skultety
Luckily, the new URL still points to the same location, the only change is in the document name where an escaped space (%20) was replaced by an underscore. Signed-off-by: Erik Skultety --- docs/formatdomain.html.in | 4 ++-- docs/formatdomaincaps.html.in | 2 +- 2 files changed, 3 insertions

Re: [libvirt] [jenkins-ci PATCH v2 0/9] Add support for cross compiling libvirt via Debian

2019-02-08 Thread Andrea Bolognani
On Tue, 2019-02-05 at 17:52 +, Daniel P. Berrangé wrote: > Changed in v2: > > - Fix multiple package name mistakes > - Modify lcitool to generate cross-arch docker files > - Add --no-install-recommended flag to apt-get > - Add DEBIAN_FRONTEND=noninteractive env to apt-get > - Improve erro

Re: [libvirt] [jenkins-ci PATCH v2 9/9] docker: add a makefile for building docker images locally

2019-02-08 Thread Andrea Bolognani
On Tue, 2019-02-05 at 17:53 +, Daniel P. Berrangé wrote: [...] > +++ b/dockerfiles/Makefile So this is basically very similar to https://libvirt.org/git/?p=libvirt-dockerfiles.git;a=blob;f=refresh and I feel like it belongs to that repository rather than this one. That causes a bit of inc

Re: [libvirt] [PATCH v2 31/32] qemu: Use the 'device_id' property of SCSI disks to avoid regressing

2019-02-08 Thread Peter Krempa
On Fri, Feb 08, 2019 at 08:29:07 +0100, Peter Krempa wrote: > On Thu, Feb 07, 2019 at 18:15:06 +0100, Ján Tomko wrote: > > On Mon, Feb 04, 2019 at 04:47:04PM +0100, Peter Krempa wrote: > > > QEMU accidentally exposed the id of -drive (or same value as disk > > > serial, if provided) in one of the i

  1   2   >