Re: [libvirt] [RFC v2] external (pull) backup API

2018-04-11 Thread John Snow
On 04/11/2018 12:32 PM, Eric Blake wrote: > On 04/03/2018 07:01 AM, Nikolay Shirokovskiy wrote: >> Hi, all. >> >> >>

[libvirt] [PATCH v7 2/9] libxl: pass driver config to libxlMakeDomBuildInfo

2018-04-11 Thread Marek Marczykowski-Górecki
Preparation for global nestedhvm configuration - libxlMakeDomBuildInfo needs access to libxlDriverConfig. No functional change. Adjusting tests require slightly more mockup functions, because of libxlDriverConfigNew() call. Signed-off-by: Marek Marczykowski-Górecki

[libvirt] [PATCH v7 6/9] libxl: add support for CPUID features policy

2018-04-11 Thread Marek Marczykowski-Górecki
Convert CPU features policy into libxl cpuid policy settings. Use new ("libxl") syntax, which allow to enable/disable specific bits, using host CPU as a base. For this reason, only "host-passthrough" mode is accepted. Libxl do not have distinction between "force" and "required" policy (there is

[libvirt] [PATCH v7 1/9] libxl: fix libxlDriverConfigDispose for partially constructed object

2018-04-11 Thread Marek Marczykowski-Górecki
libxlDriverConfigNew() use libxlDriverConfigDispose() for cleanup in case of errors. Do not call libxlLoggerFree() on not allocated logger (NULL). Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Jim Fehlig Reviewed-by: Daniel P. Berrangé

[libvirt] [PATCH v7 5/9] xenconfig: do not override def->cpu if already set elsewhere

2018-04-11 Thread Marek Marczykowski-Górecki
This will help with adding cpuid support. Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Daniel P. Berrangé --- Changes since v4: - patch separated from "libxl: do not enable nested HVM unless global nested_hvm option enabled"

[libvirt] [PATCH v7 8/9] xenconfig: add CPUID handling to domXML <-> xl.cfg conversion

2018-04-11 Thread Marek Marczykowski-Górecki
Only "libxl" format supported for now. Special care needed around vmx/svm, because those two are translated into "nestedhvm" setting. Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Daniel P. Berrangé --- Changes since v5: - adjust

[libvirt] [PATCH v7 3/9] libxl: warn about ignored CPU mode=custom

2018-04-11 Thread Marek Marczykowski-Górecki
When support for mode=custom will be added in the future, semantics of current config will change. Reduce the surprise by emitting a warning. Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Daniel P. Berrangé --- Changes since v5: -

[libvirt] [PATCH v7 9/9] tests: add test case for CPUID in xenconfig driver

2018-04-11 Thread Marek Marczykowski-Górecki
Check conversion of "cpuid" setting, check all supported policy settings ("1", "0", "x"). Also, check interaction with "nestedhvm" - should not be included as "vmx=1" in "cpuid" setting. Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Jim Fehlig

[libvirt] [PATCH 08/10] qemu: Handle genid processing during startup/launch

2018-04-11 Thread John Ferlan
Before we generate the command line for qemu, if the domain about to be launched desires to utilize the VM Generation ID functionality, then handle both the regenerating the GUID value for backup recovery (restore operation) and the startup after snapshot as well as checking that the genid value

[libvirt] [PATCH 10/10] docs: Add news article for VM Generation ID

2018-04-11 Thread John Ferlan
Signed-off-by: John Ferlan --- docs/news.xml | 12 1 file changed, 12 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 798ab6da40..8246ef0509 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -44,6 +44,18 @@ add this controller when

[libvirt] [PATCH 09/10] qemu: Add VM Generation ID to qemu command line

2018-04-11 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1149445 If the domain requests usage of the genid functionality, then add the QEMU '-device vmgenid' to the command line providing either the supplied or generated GUID value. Add tests for both a generated and supplied GUID value. Signed-off-by: John

[libvirt] [PATCH 06/10] conf: Add VM Generation ID parse/format support

2018-04-11 Thread John Ferlan
The VM Generation ID is a mechanism to provide a unique 128-bit, cryptographically random, and integer value identifier known as the GUID (Globally Unique Identifier) to the guest OS. The value is used to help notify the guest operating system when the virtual machine is executed with a different

[libvirt] [PATCH 07/10] qemu: Add VM Generation ID device capability

2018-04-11 Thread John Ferlan
Add the query of the device objects for the vmgenid device Signed-off-by: John Ferlan --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml | 1 +

[libvirt] [PATCH 03/10] qemu: Add flags to qemuDomainMigratableDefCheckABIStability

2018-04-11 Thread John Ferlan
Allow the caller to qemuDomainMigratableDefCheckABIStability to also provide a flag to be used for virDomainDefCheckABIStabilityFlags. Signed-off-by: John Ferlan --- src/qemu/qemu_domain.c| 18 -- src/qemu/qemu_domain.h| 6 --

[libvirt] [PATCH 01/10] Check return status for virUUIDGenerate

2018-04-11 Thread John Ferlan
Although legal, a few paths were not checking a return value < 0 for failure instead they checked a non zero failure. Clean them all up to be consistent. Signed-off-by: John Ferlan --- src/conf/domain_conf.c | 2 +- src/conf/network_conf.c| 2 +-

[libvirt] [PATCH 02/10] conf: Modify last arg to virDomainDefCopy

2018-04-11 Thread John Ferlan
Rather than single boolean, let's create a virDomainDefCopyFlags and have the last argument be an unsigned int using the new VIR_DOMAIN_DEF_COPY_MIGRATABLE bit. Signed-off-by: John Ferlan --- src/conf/domain_conf.c | 8 src/conf/domain_conf.h | 6 +-

[libvirt] [PATCH] tests: Xen: use qemu-system-i386 for emulator

2018-04-11 Thread Jim Fehlig
Many of the old xm and sexpr test files used qemu-dm as the emulator. Modern Xen systems no longer use the old, forked qemu-dm, instead preferring the distro provided qemu or an "upstream" qemu that is built when the Xen tools are built. This qemu is typically installed in

Re: [libvirt] [PATCH] news: announce dropping of legacy Xen driver

2018-04-11 Thread Jim Fehlig
On 04/10/2018 02:17 AM, Andrea Bolognani wrote: On Mon, 2018-04-09 at 15:00 -0600, Jim Fehlig wrote: Signed-off-by: Jim Fehlig --- Not sure if removal of a feature is a feature, but this seems better placed under "New features" than "Improvements" or "Bug fixes". It

Re: [libvirt] [RFC v2] external (pull) backup API

2018-04-11 Thread John Snow
On 04/11/2018 09:56 AM, Eric Blake wrote: > On 04/03/2018 07:01 AM, Nikolay Shirokovskiy wrote: >> Hi, all. >> >> >>

[libvirt] [PATCH 1/2] openvz: Remove unnecessary Unref in openvzLoadDomains

2018-04-11 Thread John Ferlan
Since there is no way to get to cleanup without dom being NULL, this is a unnecessary Unref. Signed-off-by: John Ferlan --- src/openvz/openvz_conf.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/openvz/openvz_conf.c b/src/openvz/openvz_conf.c index

[libvirt] [PATCH 0/2] A couple of openvz fixups

2018-04-11 Thread John Ferlan
Patch 1 came from "the next part" of the code when I determined that the Unref was unnecessary Patch 2 is a result of Jim Fehlig's review that openvzDomainGetHostname doesn't really need the error/cleanup logic. John Ferlan (2): openvz: Remove unnecessary Unref in openvzLoadDomains openvz:

Re: [libvirt] [RFC v2] external (pull) backup API

2018-04-11 Thread Eric Blake
On 04/03/2018 07:01 AM, Nikolay Shirokovskiy wrote: > Hi, all. > > > > This is another RFC on pull backup

Re: [libvirt] [libvirt PATCH v2 07/44] Clean up qemuDomainAttachNetDevice

2018-04-11 Thread Andrea Bolognani
On Mon, 2018-04-09 at 17:20 +0200, Ján Tomko wrote: > Now that we assume -netdev support, we no longer set the VLAN > or need the hostPlugged bool. > > Signed-off-by: Ján Tomko > --- > src/qemu/qemu_hotplug.c | 42 +- > 1 file changed,

Re: [libvirt] [libvirt PATCH v2 06/44] Deprecate QEMU_CAPS_NETDEV

2018-04-11 Thread Andrea Bolognani
On Mon, 2018-04-09 at 17:19 +0200, Ján Tomko wrote: > This makes qemuDomainSupportsNetdev identical to > qemuDomainSupportsNicdev and leaves some code in > qemuDomainAttachNetDevice to be cleaned up later. [...] > diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c > index

Re: [libvirt] [PATCH 6/6] tests: qemuxml2argv: Test formatting of 'write-cache' parameter

2018-04-11 Thread Ján Tomko
On Wed, Apr 04, 2018 at 10:13:59AM +0200, Peter Krempa wrote: Signed-off-by: Peter Krempa --- tests/qemuxml2argvdata/disk-drive-write-cache.args | 45 ++ tests/qemuxml2argvdata/disk-drive-write-cache.xml | 45 ++

Re: [libvirt] [PATCH 5/6] qemu: Format 'write-cache' parameter for disk frontends

2018-04-11 Thread Ján Tomko
On Wed, Apr 04, 2018 at 10:13:58AM +0200, Peter Krempa wrote: The disk cache mode translates to various frontend and backend attributes for the qemu block layer. For the frontend device the 'writeback' parameter is used and provided as 'write-cache'. Implement this so that we can later switch to

Re: [libvirt] [PATCH 3/6] qemu: domain: Add helper for translating disk cachemode to qemu flags

2018-04-11 Thread Ján Tomko
On Wed, Apr 04, 2018 at 10:13:56AM +0200, Peter Krempa wrote: Add helper which will map values of disk cache mode to the flags which are accepted by various parts of the qemu block layer. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 75

[libvirt] [PATCH 1/8] qemu: introduce capability for virtual-css-bridge

2018-04-11 Thread Shalini Chellathurai Saroja
Let us introduce the capability QEMU_CAPS_CCW for virtual-css-bridge and replace QEMU_CAPS_VIRTIO_CCW with QEMU_CAPS_CCW in code segments which identify support for ccw devices. The virtual-css-bridge is part of the ccw support introduced in QEMU 2.7. The QEMU_CAPS_CCW capability is based on the

[libvirt] [PATCH 5/8] qemu: command line generation for vfio-ccw device

2018-04-11 Thread Shalini Chellathurai Saroja
Generates the QEMU command line for the vfio-ccw device. Signed-off-by: Shalini Chellathurai Saroja Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski Reviewed-by: Marc Hartmayer

[libvirt] [PATCH 0/8] vfio-ccw passthrough support

2018-04-11 Thread Shalini Chellathurai Saroja
Let us support the basic channel I/O passthrough infrastructure based on vfio, which have been introduced in QEMU 2.10. The current focus is to support dasd-eckd (cu_type/dev_type = 0x3990/0x3390) as the target device. Shalini Chellathurai Saroja (8): qemu: introduce capability for

[libvirt] [PATCH 6/8] tests: tests for vfio-ccw passthrough

2018-04-11 Thread Shalini Chellathurai Saroja
Let us test the following functionalities of vfio-ccw in libvirt 1. Generation of QEMU command line from domain xml file 2. Generation of dump xml from domain xml file 3. Checks duplicate/invalid addresses for vfio-ccw devices. Signed-off-by: Shalini Chellathurai Saroja

[libvirt] [PATCH 7/8] docs: documentation for vfio-ccw passthrough

2018-04-11 Thread Shalini Chellathurai Saroja
Signed-off-by: Shalini Chellathurai Saroja Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski --- docs/drvnodedev.html.in | 21 - docs/formatdomain.html.in | 20 +++- 2

Re: [libvirt] [PATCH 2/6] tests: qemuxm2argv: Add infrastructure for testing with real qemuCaps

2018-04-11 Thread Ján Tomko
s/xm/xml/ in the summary On Wed, Apr 04, 2018 at 10:13:55AM +0200, Peter Krempa wrote: Allow testing of XML->argv conversion with using a real capability map as used in the qemucapabilitiestest. This allows specifying the required qemu version with the test rather than having to enumerate all

[libvirt] [PATCH 4/8] qemu: vfio-ccw device address generation

2018-04-11 Thread Shalini Chellathurai Saroja
Introduces the vfio-ccw model for mediated devices and prime vfio-ccw devices such that CCW address will be generated. Signed-off-by: Shalini Chellathurai Saroja Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski

Re: [libvirt] [PATCH 1/6] tests: utils: Allow parsing test capability file without virCaps

2018-04-11 Thread Ján Tomko
On Wed, Apr 04, 2018 at 10:13:54AM +0200, Peter Krempa wrote: virCaps was used only to propagate the host architecture, so the function can be extracted in a way which does not require it. Signed-off-by: Peter Krempa --- tests/testutilsqemu.c | 21 +++--

[libvirt] [PATCH 2/8] qemu: introduce vfio-ccw capability

2018-04-11 Thread Shalini Chellathurai Saroja
Let us introduce the capability vfio-ccw for supporting the basic channel I/O passthrough, which have been introduced in QEMU 2.10. The current focus is to support dasd-eckd (cu_type/dev_type = 0x3990/0x3390) as the target device. Let us also introduce the capability

Re: [libvirt] [PATCH 6/6] tests: qemuxml2argv: Test formatting of 'write-cache' parameter

2018-04-11 Thread John Ferlan
On 04/04/2018 04:13 AM, Peter Krempa wrote: > Signed-off-by: Peter Krempa > --- > tests/qemuxml2argvdata/disk-drive-write-cache.args | 45 > ++ > tests/qemuxml2argvdata/disk-drive-write-cache.xml | 45 > ++ >

Re: [libvirt] [PATCH 3/6] qemu: domain: Add helper for translating disk cachemode to qemu flags

2018-04-11 Thread John Ferlan
On 04/04/2018 04:13 AM, Peter Krempa wrote: > Add helper which will map values of disk cache mode to the flags which > are accepted by various parts of the qemu block layer. > > Signed-off-by: Peter Krempa > --- > src/qemu/qemu_domain.c | 75 >

[libvirt] path for user provided all-guest-read-only content

2018-04-11 Thread Christian Ehrhardt
Feel free to read [1] for context, here the quote that made me poll for opinions: "it would be nice in the future to have some standardized path for user provided guest-read-only stuff" The TL;DR of their case is: - extra info they want to pass, but is not part of libvirts guest description

Re: [libvirt] [PATCH 1/6] tests: utils: Allow parsing test capability file without virCaps

2018-04-11 Thread John Ferlan
On 04/04/2018 04:13 AM, Peter Krempa wrote: > virCaps was used only to propagate the host architecture, so the > function can be extracted in a way which does not require it. > > Signed-off-by: Peter Krempa > --- > tests/testutilsqemu.c | 21 +++-- >

[libvirt] [PATCH v2 73/73] qemuxml2xmltest: Add status XML tests for migration params

2018-04-11 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- .../migration-in-params-in.xml| 400 + .../migration-in-params-out.xml | 1 + .../migration-out-params-in.xml | 414 ++ .../migration-out-params-out.xml

[libvirt] [PATCH v2 70/73] qemu: Drop priv->job.postcopyEnabled bool

2018-04-11 Thread Jiri Denemark
We store the flags passed to the API which started the migration. Let's use them instead of a separate bool to check if post-copy migration was requested. Signed-off-by: Jiri Denemark --- src/qemu/qemu_domain.c| 1 - src/qemu/qemu_domain.h| 1 -

[libvirt] [PATCH v2 69/73] qemu: Drop priv->job.dump_memory_only bool

2018-04-11 Thread Jiri Denemark
We store the flags passed to the API which started QEMU_ASYNC_JOB_DUMP and we can use them to check whether a memory-only dump is running. There's no need for a specific bool flag. Signed-off-by: Jiri Denemark --- src/qemu/qemu_domain.c | 1 - src/qemu/qemu_domain.h | 1 -

[libvirt] [PATCH v2 59/73] qemu: Add support for sending capabilities in migration cookie

2018-04-11 Thread Jiri Denemark
Some migration capabilities may be enabled automatically, but only if both sides of migration support them. Thus we need to be able transfer the list of supported migration capabilities in migration cookie. Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration.c|

[libvirt] [PATCH v2 66/73] qemumigparamstest: Add test data for TLS parameters

2018-04-11 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- tests/qemumigparamsdata/tls-enabled.json | 11 +++ tests/qemumigparamsdata/tls-enabled.reply | 14 ++ tests/qemumigparamsdata/tls-enabled.xml| 13 + tests/qemumigparamsdata/tls-hostname.json | 11

[libvirt] [PATCH v2 71/73] qemu: Store API flags for async jobs in status XML

2018-04-11 Thread Jiri Denemark
This will help us decide what to do when libvirtd is restarted while an async job is running. Signed-off-by: Jiri Denemark --- src/qemu/qemu_domain.c| 8 + .../migration-out-nbd-out.xml | 450 +- 2 files changed, 457

[libvirt] [PATCH v2 64/73] tests: Add tests for QEMU migration parameters

2018-04-11 Thread Jiri Denemark
This is an enhanced replacement for the original test from qemumonitorjsontest which was dropped earlier in this series. More data files with some real data will be added in the following patches. Signed-off-by: Jiri Denemark --- tests/Makefile.am |

[libvirt] [PATCH v2 30/73] qemu: Set XBZRLE cache size via migration parameters

2018-04-11 Thread Jiri Denemark
Prefer xbzrle-cache-size migration parameter over the special migrate-set-cache-size QMP command. Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration.c| 6 ++--- src/qemu/qemu_migration_params.c | 42 +---

[libvirt] [PATCH v2 40/73] qemu: Call qemuMigrationAnyCompressionParse only from driver

2018-04-11 Thread Jiri Denemark
Propagate the calls up the stack to the point where qemuMigrationParamsFromFlags is called. The end goal achieved in the following few patches is to merge compression parameters into the general migration parameters code. Signed-off-by: Jiri Denemark ---

[libvirt] [PATCH v2 38/73] qemu: Set always-on migration caps in ParamsCheck

2018-04-11 Thread Jiri Denemark
Some migration capabilities are always enabled if QEMU supports them. We can just drop the explicit code for them and let qemuMigrationParamsCheck automatically set such capabilities. QEMU_MONITOR_MIGRATION_CAPS_EVENTS would normally be one of the always on features, but it is the only feature we

[libvirt] [PATCH v2 61/73] qemu: Generalize qemuMigrationParamsGetDowntimeLimit

2018-04-11 Thread Jiri Denemark
The API is renamed as qemuMigrationParamsGetULL and it can be used with any migration parameter stored as unsigned long long. Signed-off-by: Jiri Denemark --- src/qemu/qemu_driver.c | 9 - src/qemu/qemu_migration_params.c | 15 ++-

[libvirt] [PATCH v2 19/73] qemu: Rename qemuMigrationParamsSetEmptyTLS

2018-04-11 Thread Jiri Denemark
The new name is qemuMigrationParamsDisableTLS. Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration.c| 4 ++-- src/qemu/qemu_migration_params.c | 6 +++--- src/qemu/qemu_migration_params.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git

[libvirt] [PATCH v2 48/73] qemu: Introduce qemuMigrationParamsFetch

2018-04-11 Thread Jiri Denemark
Let's separate the code which queries QEMU for migration parameters from qemuMigrationParamsCheck into a dedicated function. Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration_params.c | 56 +++- src/qemu/qemu_migration_params.h | 6

[libvirt] [PATCH v2 28/73] qemu: Drop unused qemuMonitorSetMigrationCapability

2018-04-11 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/qemu/qemu_monitor.c | 14 -- src/qemu/qemu_monitor.h | 3 -- src/qemu/qemu_monitor_json.c | 53 src/qemu/qemu_monitor_json.h | 3 -- 4 files changed, 73 deletions(-) diff --git

[libvirt] [PATCH v2 60/73] qemu: Check remote caps when enabling always-on capabilities

2018-04-11 Thread Jiri Denemark
When an always-on migration capability is supposed to be enabled on both sides of migration, each side can only enable the feature if it is enabled by the other side. Thus the source host sends a list of supported migration capabilities in the migration cookie generated in the Begin phase. The

[libvirt] [PATCH v2 51/73] util: Introduce virJSONValueObjectStealObject

2018-04-11 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/libvirt_private.syms | 1 + src/util/virjson.c | 8 src/util/virjson.h | 2 ++ 3 files changed, 11 insertions(+) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index cab324c4d7..0918e69525 100644

[libvirt] [PATCH v2 23/73] qemu: Rename qemuMigrationParamsSet

2018-04-11 Thread Jiri Denemark
The new name is qemuMigrationParamsApply and it will soon become the only API which will send all requested migration parameters and capabilities to QEMU. All other qemuMigrationParams* APIs will just operate on the qemuMigrationParams structure. Signed-off-by: Jiri Denemark

[libvirt] [PATCH v2 35/73] qemu: Use qemuMigrationParamsFromFlags everywhere

2018-04-11 Thread Jiri Denemark
Every migration entry point in qemu_driver is supposed to call qemuMigrationParamsFromFlags to transform flags and parameters into qemuMigrationParams structure and pass the result to qemuMigration* APIs. Signed-off-by: Jiri Denemark --- src/qemu/qemu_driver.c| 64

[libvirt] [PATCH v2 36/73] qemu: Hide qemuMigrationParamsNew

2018-04-11 Thread Jiri Denemark
It is no longer used outside qemu_migration_params.c. Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration_params.c | 2 +- src/qemu/qemu_migration_params.h | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/qemu/qemu_migration_params.c

[libvirt] [PATCH v2 57/73] qemu: Move migration capabilities JSON formatting

2018-04-11 Thread Jiri Denemark
We want to have all migration capabilities parsing and formatting at one place, i.e., in qemu_migration_params.c. The parsing is already there in qemuMigrationCapsCheck. Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration_params.c | 66 ++--

[libvirt] [PATCH v2 47/73] qemu: Drop qemuMigrationCompression structure

2018-04-11 Thread Jiri Denemark
By merging qemuMigrationAnyCompressionParse into qemuMigrationParamsSetCompression we can drop the useless intermediate qemuMigrationCompression structure and parse compression related typed parameters and flags directly into qemuMigrationParams. Signed-off-by: Jiri Denemark

[libvirt] [PATCH v2 54/73] qemu: Export qemuMigrationParams{To, From}JSON for tests

2018-04-11 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/qemu/Makefile.inc.am | 1 + src/qemu/qemu_migration_params.c | 5 +++-- src/qemu/qemu_migration_paramspriv.h | 31 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644

[libvirt] [PATCH v2 50/73] qemumonitorjsontest: Drop migration params test

2018-04-11 Thread Jiri Denemark
The test is mostly useless and we want to refactor migration parameters even further. The refactoring will allow us to introduce enhanced tests for migration parameters. Signed-off-by: Jiri Denemark --- tests/qemumonitorjsontest.c | 99 -

[libvirt] [PATCH v2 39/73] qemu: Set migration capabilities automatically

2018-04-11 Thread Jiri Denemark
Most migration capabilities are directly connected with virDomainMigrateFlags so qemuMigrationParamsFromFlags can automatically enable them. Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration.c| 30 - src/qemu/qemu_migration_params.c | 45

[libvirt] [PATCH v2 55/73] qemu: Move qemuMonitorMigrationParams structure

2018-04-11 Thread Jiri Denemark
It's no longer used by the monitor code so we can hide it inside qemu_migration_params.c. Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration_params.c | 36 src/qemu/qemu_monitor.h | 36 2 files

[libvirt] [PATCH v2 34/73] qemu: Introduce qemuMigrationParty enum

2018-04-11 Thread Jiri Denemark
Some migration parameters and capabilities are supposed to be set on both sides of migration while others should only be set on one side. For example, CPU throttling parameters make no sense on the destination and they can be used even if the destination is too old to support them. To make

[libvirt] [PATCH v2 52/73] qemu: Move migration parameters JSON parsing

2018-04-11 Thread Jiri Denemark
We want to have all migration parameters parsing and formatting at once place, i.e., in qemu_migration_params.c. Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration_params.c | 74 +--- src/qemu/qemu_monitor.c | 13 +-

[libvirt] [PATCH v2 46/73] qemu: Replace qemuMigrationAnyCompressionDump

2018-04-11 Thread Jiri Denemark
Since every parameter or capability set in qemuMigrationCompression structure is now reflected in qemuMigrationParams structure, we can replace qemuMigrationAnyCompressionDump with a new API which will work on qemuMigrationParams. Signed-off-by: Jiri Denemark ---

[libvirt] [PATCH v2 44/73] qemu: Move qemuMigrationAnyCompression*

2018-04-11 Thread Jiri Denemark
The code really belongs to qemu_migration_params.c. Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration.c| 140 - src/qemu/qemu_migration.h| 19 src/qemu/qemu_migration_params.c | 147 +++

[libvirt] [PATCH v2 25/73] qemu: Introduce qemuMonitorSetMigrationCapabilities

2018-04-11 Thread Jiri Denemark
Our current monitor API forces the caller to call migrate-set-capabilities QMP command for each capability separately, which is quite suboptimal. Let's add a new API for setting all capabilities at once. Signed-off-by: Jiri Denemark --- src/qemu/qemu_monitor.c | 19

[libvirt] [PATCH v2 49/73] qemu: Limit usage of qemuMonitorMigrationParams

2018-04-11 Thread Jiri Denemark
Use this internal structure only in qemu_migration_params.c and change other non-test users to use the high level qemuMigrationParams struct. Signed-off-by: Jiri Denemark --- src/qemu/qemu_driver.c | 26 +++--- src/qemu/qemu_migration_params.c

[libvirt] [PATCH v2 26/73] qemu: Set migration caps via migration params APIs

2018-04-11 Thread Jiri Denemark
Migration capabilities are closely related to migration parameters and it makes sense to keep them in a single data structure. Similarly to migration parameters the capabilities are all send to QEMU at once in qemuMigrationParamsApply, all other APIs operate on the qemuMigrationParams structure.

[libvirt] [PATCH v2 42/73] qemu: Drop qemuMigrationParamsSetCapability

2018-04-11 Thread Jiri Denemark
It's become only a tiny wrapper around virBitmapSetBit, which can easily be called directly. We don't need to call virBitmapClearBit since migParams->caps bitmap is initialized with zeros. Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration_params.c | 35

[libvirt] [PATCH v2 13/73] qemu: Store original migration params in job

2018-04-11 Thread Jiri Denemark
Any job which touches migration parameters will first store their original values (i.e., QEMU defaults) to qemuDomainJobObj to make it easier to reset them back once the job finishes. Signed-off-by: Jiri Denemark --- src/qemu/qemu_domain.c | 3 +++

[libvirt] [PATCH v2 01/73] qemu: Rename qemuMigrationAnyCapsGet as qemuMigrationCapsGet

2018-04-11 Thread Jiri Denemark
Signed-off-by: Jiri Denemark Reviewed-by: Ján Tomko --- src/qemu/qemu_driver.c| 4 ++-- src/qemu/qemu_migration.c | 10 +- src/qemu/qemu_migration.h | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git

[libvirt] [PATCH v2 16/73] qemu: Reset all migration parameters

2018-04-11 Thread Jiri Denemark
Restore the original values of all migration parameters we store in qemuDomainJobObj instead of explicitly resting only a limited set of them. The result is not strictly equivalent to the previous code wrt reseting TLS state because the previous code would only reset it if we changed it before

[libvirt] [PATCH v2 21/73] qemu: Set tlsHostname inside qemuMigrationParamsEnableTLS

2018-04-11 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration.c| 31 --- src/qemu/qemu_migration_params.c | 9 +++-- src/qemu/qemu_migration_params.h | 1 + 3 files changed, 20 insertions(+), 21 deletions(-) diff --git

[libvirt] [PATCH v2 03/73] qemu: New file for all APIs related to migration parameters

2018-04-11 Thread Jiri Denemark
In the end, this will allow us to have most of the logic around migration parameters and capabilities done in one place. Signed-off-by: Jiri Denemark --- po/POTFILES.in | 1 + src/qemu/Makefile.inc.am | 2 + src/qemu/qemu_driver.c |

[libvirt] [PATCH v2 14/73] qemu: Typedef struct qemuDomainJobObj

2018-04-11 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/qemu/qemu_domain.c | 6 +++--- src/qemu/qemu_domain.h | 8 +--- src/qemu/qemu_process.c | 4 ++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index

[libvirt] [PATCH v2 15/73] qemu: Pass job object to qemuProcessRecoverMigration{In, Out}

2018-04-11 Thread Jiri Denemark
Currently, only job->phase is passed and both APIs will need to look at more details about the job. Signed-off-by: Jiri Denemark --- src/qemu/qemu_process.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_process.c

[libvirt] [PATCH v2 33/73] qemu: Check supported caps in qemuMigrationParamsCheck

2018-04-11 Thread Jiri Denemark
Instead of checking each capability at the time we want to set it in qemuMigrationParamsSetCapability we can check all of them at once in qemuMigrationParamsCheck. Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration.c| 6 --

[libvirt] [PATCH v2 22/73] qemu: Hide cfg inside qemuMigrationParamsEnableTLS

2018-04-11 Thread Jiri Denemark
There's no real reason for qemuMigrationParamsEnableTLS to require the callers to pass a valid virQEMUDriverConfigPtr, it can just call virQEMUDriverGetConfig. Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration.c| 10 ++

[libvirt] [PATCH v2 11/73] qemu: Introduce qemuMigrationParams struct

2018-04-11 Thread Jiri Denemark
Currently migration parameters are stored in a structure which mimics the QEMU migration parameters handled by query-migrate-parameters and migrate-set-parameters. The new structure will become a libvirt's abstraction on top of QEMU migration parameters, capabilities, and related stuff.

[libvirt] [PATCH v2 10/73] qemu: Move qemuMigrationCompression struct

2018-04-11 Thread Jiri Denemark
It provides just another view on some migration parameters so let's move it close to them. The end goal is to merge compression parameters with the rest of migration parameters since it doesn't make any sense to handle them differently. Signed-off-by: Jiri Denemark ---

[libvirt] [PATCH v2 09/73] qemu: Drop qemuMigrationParamsClear

2018-04-11 Thread Jiri Denemark
It's no longer used since we do not store the struct on a stack anymore. Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration_params.c | 12 +--- src/qemu/qemu_migration_params.h | 3 --- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git

[libvirt] [PATCH v2 08/73] qemu: Allocate struct for migration parameters

2018-04-11 Thread Jiri Denemark
It will get a bit more complicated soon and storing it on a stack with {0} initializer will no longer work. We need a proper constructor. Signed-off-by: Jiri Denemark --- src/qemu/qemu_driver.c | 20 +++-- src/qemu/qemu_migration.c| 28

[libvirt] [PATCH v2 06/73] qemu: Reindent qemuMigrationParamsSetEmptyTLS

2018-04-11 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration_params.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_params.c index f78e9ad875..36a9fd3509 100644 ---

[libvirt] [PATCH v2 02/73] qemu: Rename qemuMigrationParams

2018-04-11 Thread Jiri Denemark
The function is now called qemuMigrationParamsFromFlags to better reflect what it is doing: taking migration flags and params and producing a struct with QEMU migration parameters. Signed-off-by: Jiri Denemark Reviewed-by: Ján Tomko ---

[libvirt] [PATCH v2 05/73] qemu: Move qemuMigrationCapsGet

2018-04-11 Thread Jiri Denemark
The function is connected with the code which handles migration parameters and capabilities, let's move it to qemu_migration_params.c. Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration.c| 14 -- src/qemu/qemu_migration.h| 4

[libvirt] [PATCH v2 00/73] qemu: Refactor migration parameters

2018-04-11 Thread Jiri Denemark
This series changes the way we handle migration parameters and capabilities with several goals: - make it all consistent and avoid storing the same parameters in several structs - reduce the number of QMP commands we use for setting migration capabilities - concentrate the logic in a separate

Re: [libvirt] [RFC v2] external (pull) backup API

2018-04-11 Thread Eric Blake
On 04/03/2018 07:01 AM, Nikolay Shirokovskiy wrote: > Hi, all. > > > > This is another RFC on pull backup

Re: [libvirt] [RFC PATCH 0/4] LXC - Implement save/restore domain state

2018-04-11 Thread Cedric Bosdonnat
On Wed, 2018-04-11 at 12:34 +0100, Daniel P. Berrangé wrote: > On Wed, Apr 11, 2018 at 12:29:11PM +0100, Radostin Stoyanov wrote: > > This patch set contains rebased version of Katerina's work from GSoC 2016 > > [1]. > > It allows integrates CRIU [2] with the libvirt-lxc to enable save/resore of

[libvirt] [jenkins-ci PATCH] guests: Fix intltool-update on FreeBSD

2018-04-11 Thread Andrea Bolognani
The tool became completely unusable after the switch to Perl 5.26; workaround the issue while we wait for a proper solution. Signed-off-by: Andrea Bolognani --- Using regexes to match regexes: it's regexception. guests/tasks/kludges.yml | 13 + 1 file changed,

Re: [libvirt] [PATCH 0/2] Fix lxc callers using virDomainObjListRemove

2018-04-11 Thread Michal Privoznik
On 04/02/2018 04:15 PM, John Ferlan wrote: > Details in each patch - being consistent for future adjustment. > > John Ferlan (2): > lxc: Fix possible leaked @vm in lxcDomainCreateXMLWithFiles > lxc: Fix object locking after virDomainObjListRemove > > src/lxc/lxc_driver.c | 10 +++--- >

Re: [libvirt] [PATCH v2] bhyve: Use virDomainObjListFindBy{UUID|ID}Ref

2018-04-11 Thread Michal Privoznik
On 04/02/2018 03:11 PM, John Ferlan wrote: > For bhyveDomObjFromDomain, bhyveDomainLookupByUUID, and > bhyveDomainLookupByID let's return a locked and referenced > @vm object so that callers can then use the common and more > consistent virDomainObjEndAPI in order to handle cleanup rather > than

Re: [libvirt] [PATCH 0/2] Fix lxc callers using virDomainObjListRemove

2018-04-11 Thread John Ferlan
ping? Tks, John On 04/02/2018 10:15 AM, John Ferlan wrote: > Details in each patch - being consistent for future adjustment. > > John Ferlan (2): > lxc: Fix possible leaked @vm in lxcDomainCreateXMLWithFiles > lxc: Fix object locking after virDomainObjListRemove > > src/lxc/lxc_driver.c

Re: [libvirt] [PATCH] qemu: Format gic-version=2 on the command line

2018-04-11 Thread John Ferlan
On 04/03/2018 08:57 AM, Andrea Bolognani wrote: > Up until now we have only formatted non-default GIC versions on > the command line, in order to maintain compatibility with older > QEMU versions that didn't implement the gic-version option to > begin with; however, doing so is entirely

Re: [libvirt] [PATCH v2] bhyve: Use virDomainObjListFindBy{UUID|ID}Ref

2018-04-11 Thread John Ferlan
ping? Tks, - John On 04/02/2018 09:11 AM, John Ferlan wrote: > For bhyveDomObjFromDomain, bhyveDomainLookupByUUID, and > bhyveDomainLookupByID let's return a locked and referenced > @vm object so that callers can then use the common and more > consistent virDomainObjEndAPI in order to handle

Re: [libvirt] [PATCH 5/8] driver: declare supported URI schemes in virConnectDriver struct

2018-04-11 Thread Michal Privoznik
On 04/09/2018 05:45 PM, Daniel P. Berrangé wrote: > Declare what URI schemes a driver supports in its virConnectDriver > struct. This allows us to skip trying to open the driver entirely > if the URI scheme doesn't match. > > Signed-off-by: Daniel P. Berrangé > --- >

Re: [libvirt] [PATCH 3/8] driver: introduce a driver method for probing default URIs

2018-04-11 Thread Michal Privoznik
On 04/09/2018 05:45 PM, Daniel P. Berrangé wrote: > Currently the virDrvConnectOpen method is supposed to handle both > opening an explicit URI and auto-probing a driver if no URI is > given. Introduce a dedicated virDrvConnectURIProbe method to enable the > probing functionality to be split from

  1   2   >