Re: [libvirt] hash: failed on concurrent iterating.

2018-04-04 Thread Michal Privoznik
On 04/04/2018 11:50 AM, Zhangzijian wrote: >> -Original Message- >> From: libvir-list-boun...@redhat.com [mailto:libvir-list-boun...@redhat.com] >> On Behalf Of Michal Privoznik >> Sent: Wednesday, April 04, 2018 5:21 PM >> To: zhangzijian (Cloud); libvir-list@redhat.com >> Cc: huangyong

Re: [libvirt] hash: failed on concurrent iterating.

2018-04-04 Thread Erik Skultety
On Wed, Apr 04, 2018 at 12:05:34PM +0100, Daniel P. Berrangé wrote: > On Wed, Apr 04, 2018 at 12:37:11PM +0200, Erik Skultety wrote: > > On Wed, Apr 04, 2018 at 09:50:29AM +, Zhangzijian wrote: > > > > -Original Message- > > > > From: libvir-list-boun...@redhat.com > > > >

Re: [libvirt] hash: failed on concurrent iterating.

2018-04-04 Thread Zhangzijian
> -Original Message- > From: libvir-list-boun...@redhat.com [mailto:libvir-list-boun...@redhat.com] > On Behalf Of Michal Privoznik > Sent: Wednesday, April 04, 2018 5:21 PM > To: zhangzijian (Cloud); libvir-list@redhat.com > Cc: huangyong (Cloud) > Subject: Re: [libvirt] hash: failed on

Re: [libvirt] hash: failed on concurrent iterating.

2018-04-04 Thread Erik Skultety
On Wed, Apr 04, 2018 at 09:50:29AM +, Zhangzijian wrote: > > -Original Message- > > From: libvir-list-boun...@redhat.com [mailto:libvir-list-boun...@redhat.com] > > On Behalf Of Michal Privoznik > > Sent: Wednesday, April 04, 2018 5:21 PM > > To: zhangzijian (Cloud);

Re: [libvirt] [PATCH v1 2/2] tests: add qemu-img test for preallocation=falloc

2018-04-04 Thread Michal Privoznik
On 04/03/2018 04:14 PM, Wim Ten Have wrote: > From: Wim ten Have > > Signed-off-by: Wim ten Have > --- > tests/storagevolxml2argvdata/qcow2-nocapacity-convert-prealloc.argv | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [libvirt] hash: failed on concurrent iterating.

2018-04-04 Thread Daniel P . Berrangé
On Wed, Apr 04, 2018 at 12:37:11PM +0200, Erik Skultety wrote: > On Wed, Apr 04, 2018 at 09:50:29AM +, Zhangzijian wrote: > > > -Original Message- > > > From: libvir-list-boun...@redhat.com > > > [mailto:libvir-list-boun...@redhat.com] > > > On Behalf Of Michal Privoznik > > > Sent:

Re: [libvirt] [PATCH v1 1/2] storage: extend preallocation flags support for qemu-img

2018-04-04 Thread Michal Privoznik
On 04/03/2018 04:14 PM, Wim Ten Have wrote: > From: Wim ten Have > > This patch adds support to qcow2 formatted filesystem object storage by > instructing qemu-img to build them with preallocation=falloc whenever the > XML described storage matches its . For all other

[libvirt] [dbus PATCH 0/5] Introduce Network Interface

2018-04-04 Thread Katerina Koukiou
This patchset introduces also some basic methods and properties for Network interface. More functionality will be added in following patchsets. New functions are covered by the test suite. Katerina Koukiou (5): Introduce Network Interface Implement ListNetworks method for Connect interface

Re: [libvirt] [dbus PATCH 0/5] Introduce Network Interface

2018-04-04 Thread Katerina Koukiou
On Wed, 2018-04-04 at 14:01 +0200, Katerina Koukiou wrote: > This patchset introduces also some basic methods and properties for > Network interface. > More functionality will be added in following patchsets. > New functions are covered by the test suite. > > Katerina Koukiou (5): > Introduce

[libvirt] [dbus PATCH v2 5/5] Implement NetworkLookupByName method for Connect interface

2018-04-04 Thread Katerina Koukiou
Signed-off-by: Katerina Koukiou --- data/org.libvirt.Connect.xml | 6 ++ src/connect.c| 29 + test/test_connect.py | 11 +++ 3 files changed, 46 insertions(+) diff --git a/data/org.libvirt.Connect.xml

Re: [libvirt] [Question] Any plan about supporting MBA (Memory Bandwidth Allocation) in libvirt ?

2018-04-04 Thread Pavel Hrdina
On Wed, Apr 04, 2018 at 08:36:09AM +, Zhanghailiang wrote: > Hi, > > Intel RDT/MBA has been supported by kernel for a time, we also support CAT in > libvirt, which is part of RDT. > but I didn't find any discussion or patches about MBA feature in Libvirt, > does anyone propose supporting it

Re: [libvirt] [PATCH v5 09/10] virsh: implement new command for launch security

2018-04-04 Thread Erik Skultety
On Wed, Apr 04, 2018 at 07:36:37AM -0500, Brijesh Singh wrote: > > > On 4/3/18 9:32 AM, Erik Skultety wrote: > > On Mon, Apr 02, 2018 at 09:18:55AM -0500, Brijesh Singh wrote: > >> Add new 'launch-security' command, the command can be used to get or set > >> the launch security information when

Re: [libvirt] [PATCH 01/11] docs: Tweak PCI controller model documentation

2018-04-04 Thread John Ferlan
On 04/04/2018 04:39 AM, Andrea Bolognani wrote: > On Tue, 2018-04-03 at 19:11 -0400, John Ferlan wrote: >> On 03/28/2018 10:06 AM, Andrea Bolognani wrote: >>> Instead of first listing the models on their own, and then >>> listing them again grouped by the libvirt release they were >>> introduced

Re: [libvirt] [PATCH v5 09/10] virsh: implement new command for launch security

2018-04-04 Thread Brijesh Singh
On 4/2/18 6:31 PM, John Ferlan wrote: > > On 04/02/2018 10:18 AM, Brijesh Singh wrote: >> Add new 'launch-security' command, the command can be used to get or set >> the launch security information when booting encrypted VMs. >> >> Signed-off-by: Brijesh Singh >> --- >>

[libvirt] [dbus PATCH 3/5] Implement virtDBusUtilVirNetworkFromBusPath helper function.

2018-04-04 Thread Katerina Koukiou
Signed-off-by: Katerina Koukiou --- src/util.c | 13 + src/util.h | 5 + 2 files changed, 18 insertions(+) diff --git a/src/util.c b/src/util.c index fe40a96..03a0f10 100644 --- a/src/util.c +++ b/src/util.c @@ -152,6 +152,19 @@

Re: [libvirt] [PATCH 08/11] conf: Prefer pcie-to-pci-bridge to dmi-to-pci-bridge

2018-04-04 Thread John Ferlan
On 04/04/2018 05:04 AM, Andrea Bolognani wrote: > On Tue, 2018-04-03 at 19:13 -0400, John Ferlan wrote: > [...] >>> needDMIToPCIBridge = true; >>> +needPCIeToPCIBridge = true; >>> for (i = 0; i < addrs->nbuses; i++) { >>> if

Re: [libvirt] [PATCH v5 09/10] virsh: implement new command for launch security

2018-04-04 Thread Erik Skultety
On Tue, Apr 03, 2018 at 04:55:42PM +0200, Erik Skultety wrote: > > > +}, > > > +{.name = NULL} > > > +}; > > > + > > > +static const vshCmdOptDef opts_launch_security[] = { > > > +VIRSH_COMMON_OPT_DOMAIN_FULL(0), > > > +{.name = "get", > > > + .type = VSH_OT_STRING, > > > +

Re: [libvirt] [PATCH v5 05/10] qemu: add support to launch SEV guest

2018-04-04 Thread Brijesh Singh
On 4/2/18 6:04 PM, John Ferlan wrote: > > On 04/02/2018 10:18 AM, Brijesh Singh wrote: >> QEMU >= 2.12 provides 'sev-guest' object which is used to launch encrypted >> VMs on AMD platform using SEV feature. The various inputs required to >> launch SEV guest is provided through the tag. A

[libvirt] [dbus PATCH v2 4/5] Implement Name property for Network interface

2018-04-04 Thread Katerina Koukiou
This commit also introduces the virtDBusNetworkGetVirNetwork static function which is needed for the virtDBusNetworkGetName. Signed-off-by: Katerina Koukiou --- data/org.libvirt.Network.xml | 4 src/network.c| 43

Re: [libvirt] [PATCH v5 09/10] virsh: implement new command for launch security

2018-04-04 Thread Brijesh Singh
On 4/3/18 9:32 AM, Erik Skultety wrote: > On Mon, Apr 02, 2018 at 09:18:55AM -0500, Brijesh Singh wrote: >> Add new 'launch-security' command, the command can be used to get or set >> the launch security information when booting encrypted VMs. >> >> Signed-off-by: Brijesh Singh

[libvirt] [dbus PATCH 1/5] Introduce Network Interface

2018-04-04 Thread Katerina Koukiou
Signed-off-by: Katerina Koukiou --- data/Makefile.am | 3 ++- data/org.libvirt.Network.xml | 7 + src/Makefile.am | 3 ++- src/connect.c| 5 src/connect.h| 1 + src/network.c| 64

[libvirt] [dbus PATCH 2/5] Implement ListNetworks method for Connect interface

2018-04-04 Thread Katerina Koukiou
Signed-off-by: Katerina Koukiou --- data/org.libvirt.Connect.xml | 6 ++ src/connect.c| 41 + 2 files changed, 47 insertions(+) diff --git a/data/org.libvirt.Connect.xml b/data/org.libvirt.Connect.xml index

[libvirt] [dbus PATCH 5/5] Implement NetworkLookupByName method for Connect interface

2018-04-04 Thread Katerina Koukiou
Signed-off-by: Katerina Koukiou --- data/org.libvirt.Connect.xml | 6 ++ src/connect.c| 29 + test/test_connect.py | 11 +++ 3 files changed, 46 insertions(+) diff --git a/data/org.libvirt.Connect.xml

[libvirt] [dbus PATCH 4/5] Implement Name property for Network interface

2018-04-04 Thread Katerina Koukiou
This commit also introduces the virtDBusNetworkGetVirNetwork static function which is needed for the virtDBusNetworkGetName. Signed-off-by: Katerina Koukiou --- data/org.libvirt.Network.xml | 4 src/network.c| 43

[libvirt] how to expose missing libxl APIs in xml?

2018-04-04 Thread Olaf Hering
libvirt lacks support for various API interfaces provided by libxl. There is probably no list to track the items not supported by libvirt. Where should such list be maintained, in libvirt.git? The specific case I have right now is this member of libxl_domain_build_info:

Re: [libvirt] [dbus PATCH v2 1/5] Introduce Network Interface

2018-04-04 Thread Katerina Koukiou
On Wed, 2018-04-04 at 14:26 +0200, Katerina Koukiou wrote: > Signed-off-by: Katerina Koukiou > --- > data/Makefile.am | 3 ++- > data/org.libvirt.Network.xml | 7 + > src/Makefile.am | 3 ++- > src/connect.c| 5 >

Re: [libvirt] [PATCH v5 05/10] qemu: add support to launch SEV guest

2018-04-04 Thread John Ferlan
[...] >>> +VIR_DEBUG("policy=0x%x cbitpos=%d reduced_phys_bits=%d", >>> + sev->policy, sev->cbitpos, sev->reduced_phys_bits); >>> + >>> +virBufferAsprintf(, "sev-guest,id=sev0,cbitpos=%d", sev->cbitpos); >>> +virBufferAsprintf(, ",reduced-phys-bits=%d", >>>

Re: [libvirt] [PATCH v2 3/3] test: Need to relock afer virDomainObjListRemove

2018-04-04 Thread John Ferlan
On 04/04/2018 02:57 AM, Marc Hartmayer wrote: > On Mon, Apr 02, 2018 at 02:27 PM +0200, John Ferlan > wrote: >> For all @dom's fetched from a testDomObjFromDomain because >> virDomainObjListRemove will return an unlocked domain object >> we should relock it prior to the

[libvirt] [dbus PATCH v2 1/5] Introduce Network Interface

2018-04-04 Thread Katerina Koukiou
Signed-off-by: Katerina Koukiou --- data/Makefile.am | 3 ++- data/org.libvirt.Network.xml | 7 + src/Makefile.am | 3 ++- src/connect.c| 5 src/connect.h| 1 + src/network.c| 64

[libvirt] [dbus PATCH v2 3/5] Implement virtDBusUtilVirNetworkFromBusPath helper function.

2018-04-04 Thread Katerina Koukiou
Signed-off-by: Katerina Koukiou --- src/util.c | 13 + src/util.h | 5 + 2 files changed, 18 insertions(+) diff --git a/src/util.c b/src/util.c index fe40a96..03a0f10 100644 --- a/src/util.c +++ b/src/util.c @@ -152,6 +152,19 @@

[libvirt] [dbus PATCH v2 2/5] Implement ListNetworks method for Connect interface

2018-04-04 Thread Katerina Koukiou
Signed-off-by: Katerina Koukiou --- data/org.libvirt.Connect.xml | 6 ++ src/connect.c| 41 + 2 files changed, 47 insertions(+) diff --git a/data/org.libvirt.Connect.xml b/data/org.libvirt.Connect.xml index

[libvirt] [dbus PATCH v2 0/5] Introduce Network Interface

2018-04-04 Thread Katerina Koukiou
This patchset introduces also some basic methods and properties for Network interface. More functionality will be added in following patchsets. New functions are covered by the test suite. Changes from v1: I forgot to the test_network.py in v1. Katerina Koukiou (5): Introduce Network Interface

[libvirt] [PATCH 19/68] qemu: Rename qemuMigrationParamsAddTLSObjects

2018-04-04 Thread Jiri Denemark
The new name is qemuMigrationParamsEnableTLS. Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration.c| 12 ++-- src/qemu/qemu_migration_params.c | 18 +- src/qemu/qemu_migration_params.h | 16 3 files changed, 23

[libvirt] [PATCH 07/68] qemu: Allocate struct for migration parameters

2018-04-04 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 06/68] qemu: Make qemuMigrationParamsFree follow common pattern

2018-04-04 Thread Jiri Denemark
Our *Free functions usually do not take a double pointer and the caller has to make sure it doesn't use the stale pointer after the *Free function returns. Signed-off-by: Jiri Denemark --- src/qemu/qemu_driver.c | 2 +- src/qemu/qemu_migration_params.c | 10

[libvirt] [PATCH 23/68] qemu: Hide internals of qemuMigrationParams struct

2018-04-04 Thread Jiri Denemark
All users of migration parameters are supposed to use APIs provided by qemu_migration_params.c without having to worry about the internals. Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration_params.c | 5 + src/qemu/qemu_migration_params.h | 3 --- 2 files

[libvirt] [PATCH 10/68] qemu: Introduce qemuMigrationParams struct

2018-04-04 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 22/68] qemu: Rename qemuMigrationParamsSet

2018-04-04 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 42/68] qemu: Move qemuMigrationParamsSetCompression

2018-04-04 Thread Jiri Denemark
The API will soon be called from qemuMigrationParamsFromFlags. Let's move it to avoid the need to add a forward declaration. Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration_params.c | 59 1 file changed, 30 insertions(+), 29

[libvirt] [PATCH 28/68] qemu: Add support for xbzrle-cache-size migration parameter

2018-04-04 Thread Jiri Denemark
Originally QEMU provided query-migrate-cache-size and migrate-set-cache-size QMP commands for querying/setting XBZRLE cache size. In version 2.11 QEMU added support for XBZRLE cache size to the general migration paramaters commands. This patch adds support for this parameter to libvirt to make

[libvirt] [PATCH 34/68] qemu: Use qemuMigrationParamsFromFlags everywhere

2018-04-04 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

Re: [libvirt] [dbus PATCH v2 1/5] Introduce Network Interface

2018-04-04 Thread Pavel Hrdina
On Wed, Apr 04, 2018 at 02:26:09PM +0200, Katerina Koukiou wrote: > Signed-off-by: Katerina Koukiou > --- > data/Makefile.am | 3 ++- > data/org.libvirt.Network.xml | 7 + > src/Makefile.am | 3 ++- > src/connect.c| 5 >

[libvirt] [PATCH 05/68] qemu: Reindent qemuMigrationParamsSetEmptyTLS

2018-04-04 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 72ecafd057..69fbeaefa9 100644 ---

[libvirt] [PATCHv3 3/6] tests: add qemumonitorjson tests for query-cpus-fast

2018-04-04 Thread Viktor Mihajlovski
Extended the json monitor test program with support for query-cpus-fast and added a sample file set for x86 data obtained using the it. Also extend the test program to recognize the halted property. Signed-off-by: Viktor Mihajlovski ---

[libvirt] [PATCHv3 0/6] Use query-cpus-fast instead of query-cpus

2018-04-04 Thread Viktor Mihajlovski
The QEMU monitor commmand query-cpus is deprecated starting with QEMU 2.12.0 because it can adversely affect the performance of a running virtual machine. This series enables libvirt to use the new query-cpus-fast interface if supported by the local QEMU instance and is required in order to

[libvirt] [PATCHv3 4/6] qemu: add architecture-specific CPU info handling

2018-04-04 Thread Viktor Mihajlovski
Extract architecture specific data from query-cpus[-fast] if available. A new function qemuMonitorJSONExtractCPUArchInfo() can then call architecture-specific extraction handlers. Initially, there's a handler for s390 cpu info to set the halted property depending on the s390 cpu state returned by

[libvirt] [PATCH 66/68] qemu: Store API flags for async jobs in status XML

2018-04-04 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

Re: [libvirt] [PATCH v3 2/3] qemu_cgroup: Handle device mapper targets properly

2018-04-04 Thread Peter Krempa
On Tue, Apr 03, 2018 at 11:03:26 +0200, Michal Privoznik wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1557769 This BZ is private. Please don't use links which can't be viewed by the public. > > Problem with device mapper targets is that there can be several > other devices 'hidden'

Re: [libvirt] [PATCH v3 3/3] news: Document device mapper fix

2018-04-04 Thread Peter Krempa
On Tue, Apr 03, 2018 at 11:03:27 +0200, Michal Privoznik wrote: > Signed-off-by: Michal Privoznik > --- > docs/news.xml | 10 ++ > 1 file changed, 10 insertions(+) > > diff --git a/docs/news.xml b/docs/news.xml > index 87f52e83ef..065b60b6eb 100644 > ---

Re: [libvirt] [PATCH v5 03/10] conf: introduce launch-security element in domain

2018-04-04 Thread John Ferlan
[...] >> >> Hopefully hexuint will suffice over time... On the other hand, this >> patch uses virXPathULongHex in order to parse. >> > > IIRC, I was not able to find anything other than hexuint in > basictypes.rng and also was not able to a function like > virXPathUIntHex(..). If you can point

[libvirt] [PATCH 02/68] qemu: Rename qemuMigrationAnyCapsGet as qemuMigrationCapsGet

2018-04-04 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- 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 a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index

[libvirt] [PATCH 48/68] qemu: Limit usage of qemuMonitorMigrationParams

2018-04-04 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 35/68] qemu: Hide qemuMigrationParamsNew

2018-04-04 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 63/68] qemu: Properly avoid cancelling memory-only dump

2018-04-04 Thread Jiri Denemark
migrate_cancel QMP command cannot be used for cancelling memory-only dumps and priv->job.dump_memory_only is used for reporting an error if someone calls virDomainAbortJob when memory-only dump job is running. Since commit 150930e3098 the dump_memory_only flag is set only dump-guest-memory

[libvirt] [PATCH 20/68] qemu: Set tlsHostname inside qemuMigrationParamsEnableTLS

2018-04-04 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 64/68] qemu: Drop priv->job.dump_memory_only bool

2018-04-04 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 54/68] qemu: Refactor qemuMigrationParams

2018-04-04 Thread Jiri Denemark
Adding support for new migration parameter requires a lot of places to be changed (most likely by copy engineering): new variables to store the parameter value and the associated *_set bool, JSON formatter and parser, XML formatter and parser (to be added soon), and the actual code to set the

[libvirt] [PATCH 31/68] qemu: Move ParamsCheck closer to ParamsApply on Src side

2018-04-04 Thread Jiri Denemark
We reached the point when qemuMigrationParamsApply is the only API which sends migration parameters and capabilities to QEMU. Thus all but the TLS parameters can be set before we ask QEMU for the current values of all parameters in qemuMigrationParamsCheck. Supported migration capabilities are

[libvirt] [PATCH 29/68] qemu: Set XBZRLE cache size via migration parameters

2018-04-04 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 32/68] qemu: Check supported caps in qemuMigrationParamsCheck

2018-04-04 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 30/68] qemu: Move ParamsCheck closer to ParamsApply on Dst side

2018-04-04 Thread Jiri Denemark
We reached the point when qemuMigrationParamsApply is the only API which sends migration parameters and capabilities to QEMU. Thus all but the TLS parameters can be set before we ask QEMU for the current values of all parameters in qemuMigrationParamsCheck. Supported migration capabilities are

[libvirt] [PATCH 36/68] qemu: Drop qemuMigrationParamsSetPostCopy

2018-04-04 Thread Jiri Denemark
It's just a tiny wrapper around qemuMigrationParamsSetCapability and setting priv->job.postcopyEnabled is not something qemuMigrationParams code should be doing anyway so let the callers do it. Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration.c| 16

[libvirt] [PATCH 56/68] qemu: Set migration parameters automatically

2018-04-04 Thread Jiri Denemark
Most QEMU migration parameters directly correspond to VIR_MIGRATE_PARAM_* typed parameters and qemuMigrationParamsFromFlags can automatically set them according to a static mapping between libvirt and QEMU parameters. Signed-off-by: Jiri Denemark ---

[libvirt] [PATCH 03/68] qemu: Rename qemuMigrationParams

2018-04-04 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 --- src/qemu/qemu_driver.c| 2 +- src/qemu/qemu_migration.c

[libvirt] [PATCHv3 2/6] qemu: use query-cpus-fast in JSON monitor

2018-04-04 Thread Viktor Mihajlovski
Use query-cpus-fast instead of query-cpus if supported by QEMU. Based on the QEMU_CAPS_QUERY_CPUS_FAST capability. Signed-off-by: Viktor Mihajlovski --- src/qemu/qemu_domain.c | 14 +++--- src/qemu/qemu_monitor.c | 30

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

2018-04-04 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

Re: [libvirt] [dbus PATCH v2 3/5] Implement virtDBusUtilVirNetworkFromBusPath helper function.

2018-04-04 Thread Pavel Hrdina
On Wed, Apr 04, 2018 at 02:26:11PM +0200, Katerina Koukiou wrote: > Signed-off-by: Katerina Koukiou > --- > src/util.c | 13 + > src/util.h | 5 + > 2 files changed, 18 insertions(+) This can be squashed into the first patch. You are introducing support

[libvirt] [PATCH 53/68] qemu: Move qemuMonitorMigrationParams structure

2018-04-04 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 26/68] qemu: Do not use qemuMonitorSetMigrationCapability

2018-04-04 Thread Jiri Denemark
Rework all remaining callers of qemuMonitorSetMigrationCapability to use the new qemuMonitorSetMigrationCapabilities API. Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration.c | 11 --- tests/qemumonitorjsontest.c | 16 +++- 2 files changed, 19

[libvirt] [PATCH 44/68] qemu: Hide qemuMigrationParamsSetCompression

2018-04-04 Thread Jiri Denemark
There's no need to call this API explicitly in the migration code. We can pass the compression parameters to qemuMigrationParamsFromFlags and it can internally call qemuMigrationParamsSetCompression to apply them to the qemuMigrationParams structure. Signed-off-by: Jiri Denemark

[libvirt] [PATCH 60/68] qemumigparamstest: Add basic test data

2018-04-04 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- tests/qemumigparamsdata/basic.json | 9 + tests/qemumigparamsdata/basic.reply | 12 tests/qemumigparamsdata/basic.xml | 11 +++ tests/qemumigparamsdata/empty.json | 3 +++ tests/qemumigparamsdata/empty.reply

[libvirt] [PATCH 55/68] qemu: Generalize qemuMigrationParamsGetDowntimeLimit

2018-04-04 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 15/68] qemu: Reset all migration parameters

2018-04-04 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 16/68] qemu: Drop qemuMigrationParamsCheckSetupTLS

2018-04-04 Thread Jiri Denemark
The code can be merged directly in qemuMigrationParamsAddTLSObjects. Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration.c| 15 --- src/qemu/qemu_migration_params.c | 73 ++-- src/qemu/qemu_migration_params.h | 6 --- 3 files

[libvirt] [PATCH 59/68] tests: Add tests for QEMU migration parameters

2018-04-04 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 25/68] qemu: Set migration caps via migration params APIs

2018-04-04 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 45/68] qemu: Replace qemuMigrationAnyCompressionDump

2018-04-04 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 38/68] qemu: Set migration capabilities automatically

2018-04-04 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 | 42

[libvirt] [PATCH 49/68] qemumonitorjsontest: Drop migration params test

2018-04-04 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 08/68] qemu: Drop qemuMigrationParamsClear

2018-04-04 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 04/68] qemu: New file for all APIs related to migration parameters

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

[libvirt] [PATCH 00/68] qemu: Refactor migration parameters

2018-04-04 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

[libvirt] [PATCH 01/68] qemu: Move qemuDomainCheckMigrationCapabilities

2018-04-04 Thread Jiri Denemark
Since the function is tightly connected to migration, it was renamed as qemuMigrationCapsCheck and moved to qemu_migration.c. Signed-off-by: Jiri Denemark --- src/qemu/qemu_domain.c| 72 --- src/qemu/qemu_domain.h| 4 ---

[libvirt] [PATCH 12/68] qemu: Store original migration params in job

2018-04-04 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 24/68] qemu: Introduce qemuMonitorSetMigrationCapabilities

2018-04-04 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 33/68] qemu: Introduce qemuMigrationParty enum

2018-04-04 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 11/68] qemu: Reset migration parameters in qemuMigrationSrcCleanup

2018-04-04 Thread Jiri Denemark
When connection to the client which controls a non-p2p migration gets closed between Perform and Confirm phase, we don't know whether the domain was successfully migrated or not. Thus, we have to leave the domain paused and just cleanup the migration job and reset migration parameters. Previously

[libvirt] [PATCH 09/68] qemu: Move qemuMigrationCompression struct

2018-04-04 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 41/68] qemu: Drop qemuMigrationParamsSetCapability

2018-04-04 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 18/68] qemu: Rename qemuMigrationParamsSetEmptyTLS

2018-04-04 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 14/68] qemu: Pass job object to qemuProcessRecoverMigration{In, Out}

2018-04-04 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 13/68] qemu: Typedef struct qemuDomainJobObj

2018-04-04 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 43/68] qemu: Move qemuMigrationAnyCompression*

2018-04-04 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 51/68] qemu: Move migration parameters JSON parsing

2018-04-04 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 52/68] qemu: Move migration parameters JSON formatting

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

[libvirt] [PATCH 37/68] qemu: Set always-on migration caps in ParamsCheck

2018-04-04 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

Re: [libvirt] [PATCH v3 1/3] util: Introduce virDevMapperGetTargets

2018-04-04 Thread Peter Krempa
On Tue, Apr 03, 2018 at 11:03:25 +0200, Michal Privoznik wrote: > This helper fetches dependencies for given device mapper target. > > At the same time, we need to provide a dummy log function because > by default libdevmapper prints out error messages to stderr which > we need to suppress. > >

Re: [libvirt] [PATCH v3 2/3] qemu_cgroup: Handle device mapper targets properly

2018-04-04 Thread Peter Krempa
On Tue, Apr 03, 2018 at 11:03:26 +0200, Michal Privoznik wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1557769 > > Problem with device mapper targets is that there can be several > other devices 'hidden' behind them. For instance, /dev/dm-1 can > consist of /dev/sda, /dev/sdb and /dev/sdc.

Re: [libvirt] [dbus PATCH v2 4/5] Implement Name property for Network interface

2018-04-04 Thread Pavel Hrdina
On Wed, Apr 04, 2018 at 02:26:12PM +0200, Katerina Koukiou wrote: > This commit also introduces the virtDBusNetworkGetVirNetwork > static function which is needed for the virtDBusNetworkGetName. > > Signed-off-by: Katerina Koukiou > --- > data/org.libvirt.Network.xml | 4

[libvirt] [PATCHv3 6/6] qemu: refresh vcpu halted state only via query-cpus-fast

2018-04-04 Thread Viktor Mihajlovski
In order to not affect running VMs, refreshing the halted state is only performed if QEMU supports the query-cpus-fast QAPI. Signed-off-by: Viktor Mihajlovski Reviewed-by: Boris Fiuczynski Reviewed-by: Marc Hartmayer

  1   2   >