[libvirt] [PATCH v2 2/2] qemu: cpu: fix "full" CPU to include all "reported" CPU features

2018-04-11 Thread Nikolay Shirokovskiy
On Core i5 650 x86_64 kvm guest fail to start with error [1] for next cpu config: The problem is in full CPU calculation in virQEMUCapsInitHostCPUModel. It is supposed to include features emulated by qemu and missed on host. Some of such features may be not included however.

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

2018-04-11 Thread Michal Privoznik
On 04/09/2018 08: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

Re: [libvirt] [PATCH v2] util: don't check for parallel iteration in hash-related functions

2018-04-11 Thread Michal Privoznik
On 04/10/2018 08:27 AM, Vincent Bernat wrote: > This is the responsability of the caller to apply the correct lock > before using these functions. Moreover, the use of a simple boolean > was still racy: two threads may check the boolean and "lock" it > simultaneously. > > Users of functions from

[libvirt] [PATCH] qemu: use target.port for isa-serial

2018-04-11 Thread Thilo Cestonaro
A configured target.port is currently totaly ignored, while constructing qemu commandline, for all types of serial devices. This patch adds a -device parameter "index" for the target model isa-serial. This enables the user to specify which serial device will end in which ttySX device. Updated test

Re: [libvirt] [RFC] add option to configure qcow2 cache sizes in domain xml

2018-04-11 Thread Peter Krempa
On Wed, Apr 11, 2018 at 14:12:39 +0300, Nikolay Shirokovskiy wrote: > Hi, all. > > I want to add option to configure qcow2 cache size in domain xml. Looks like > this should be a driver option. As driver already has a lot of attributes and > even qcow2 has more then one cache I suggest something

Re: [libvirt] [PATCH] util: improve virNetDevTapGetRealDeviceName

2018-04-11 Thread Michal Privoznik
On 04/08/2018 05:40 PM, Roman Bogorodskiy wrote: > virNetDevTapGetRealDeviceName() is used on FreeBSD because interface > names (such as one sees in output of tools like ifconfig(8)) might not > match their /dev entity names, and for bhyve we need the latter. > > Current implementation is not

Re: [libvirt] [PATCH v2] util: don't check for parallel iteration in hash-related functions

2018-04-11 Thread Vincent Bernat
❦ 10 avril 2018 08:27 +0200, Vincent Bernat  : > This is the responsability of the caller to apply the correct lock > before using these functions. Moreover, the use of a simple boolean > was still racy: two threads may check the boolean and "lock" it > simultaneously. > >

Re: [libvirt] [PATCH v2] util: don't check for parallel iteration in hash-related functions

2018-04-11 Thread Michal Privoznik
On 04/11/2018 11:01 AM, Vincent Bernat wrote: > ❦ 10 avril 2018 08:27 +0200, Vincent Bernat  : > >> This is the responsability of the caller to apply the correct lock >> before using these functions. Moreover, the use of a simple boolean >> was still racy: two threads may

Re: [libvirt] [PATCH] apparmor: add rules to use qemu_bridge_helper

2018-04-11 Thread Michal Privoznik
On 04/09/2018 08:34 AM, Christian Ehrhardt wrote: > Due to mediation of socket and signal activity currently qemu:///session > connections calling qemu_bridge_helper fail. > > We need the profile for libvirtd itself and the subprofile for > qemu-bridge-helper to be able to talk/notify to each

[libvirt] [PATCH v2 0/2] qemu: cpu: fix "full" CPU to include all "reported" CPU features

2018-04-11 Thread Nikolay Shirokovskiy
diff from v1: - add test data for CPU for which issue was triggered Patch 1 adds tests for CPU on which problem was detected. However we don't test case which have issue. Patch 2 is actual fix. Nikolay Shirokovskiy (2): cputest: New test for Intel Core i5-650 qemu: cpu: fix "full" CPU to

Re: [libvirt] [PATCH] libxl: add support for memballoon device

2018-04-11 Thread Daniel P . Berrangé
On Tue, Apr 10, 2018 at 03:03:17PM -0600, Jim Fehlig wrote: > All Xen PV and HVM with PV driver support a memory balloon device, > which cannot be disabled through the toolstack. Model the device > in the libxl driver, similar to the recently removed xend-based > driver. > > Signed-off-by: Jim

[libvirt] [PATCH v2 1/2] cputest: New test for Intel Core i5-650

2018-04-11 Thread Nikolay Shirokovskiy
--- tests/cputest.c|1 + .../x86_64-cpuid-Core-i5-650-disabled.xml |5 + .../x86_64-cpuid-Core-i5-650-enabled.xml |7 + .../cputestdata/x86_64-cpuid-Core-i5-650-guest.xml | 24 + .../cputestdata/x86_64-cpuid-Core-i5-650-host.xml

[libvirt] [RFC] add option to configure qcow2 cache sizes in domain xml

2018-04-11 Thread Nikolay Shirokovskiy
Hi, all. I want to add option to configure qcow2 cache size in domain xml. Looks like this should be a driver option. As driver already has a lot of attributes and even qcow2 has more then one cache I suggest something like this: This looks compact but qcow2 has entry size option

[libvirt] [RFC PATCH 4/4] lxc: Add save/restore support

2018-04-11 Thread Radostin Stoyanov
Add support for saving the state of lxc domain into a set of files. Usage: virsh save [domain-name or domain-uuid] [path] virsh restore [path] Example: virsh -c lxc:// save container1 /tmp/container1-dump virsh -c lxc:// restore /tmp/container1-dump

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

2018-04-11 Thread Radostin Stoyanov
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 containers. [1] https://wiki.libvirt.org/page/Google_Summer_of_Code_2016/lxc_migration [2] https://criu.org Radostin Stoyanov (4):

[libvirt] [RFC PATCH 1/4] configure: Include support for CRIU

2018-04-11 Thread Radostin Stoyanov
Checkpoint/restore in User-space [1] enables the current running state of lxc containers to be stored as a set of image files. Then, one could restore the container to its previous state (before checkpointing) on the same or another system. [1] https://criu.org/ Signed-off-by: Radostin Stoyanov

[libvirt] [RFC PATCH 2/4] lxc: Add save/restore helper functions

2018-04-11 Thread Radostin Stoyanov
Add helper functions for checkpoint/restore of linux containers using CRIU. Signed-off-by: Radostin Stoyanov --- po/POTFILES.in | 1 + src/lxc/Makefile.inc.am | 4 + src/lxc/lxc_criu.c | 253

[libvirt] [RFC PATCH 3/4] lxc: Add restore mode for libvirt-lxc

2018-04-11 Thread Radostin Stoyanov
Extend `lxcContainerStart` with support for restore from fd of directory that contains saved state of lxc container. Signed-off-by: Radostin Stoyanov --- src/lxc/lxc_container.c | 162 +-- src/lxc/lxc_container.h | 3 +-

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

2018-04-11 Thread Daniel P . Berrangé
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 > containers. I vaguely recall that when Katerina first did that work,

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] [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 2/2] vmware: Failures in cache info init are non-fatal

2018-04-11 Thread John Ferlan
On 04/03/2018 05:32 AM, Rainer Müller wrote: > This is also not fatal on other drivers. > > Signed-off-by: Rainer Müller > --- > src/vmware/vmware_conf.c | 7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) > Reviewed-by: John Ferlan John

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

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] 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 0/8] Simplify & standarize more parts of driver URI handling

2018-04-11 Thread Michal Privoznik
On 04/09/2018 05:45 PM, Daniel P. Berrangé wrote: > The motivating goal of this series was/is to make it possible to answer > whether there is any driver registered to handle a given URI scheme > without having to call into the drivers. > > Ultimately this ended up being a nice simplification and

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] [PATCH 1/2] vmware: Fix initialization of VMware Fusion

2018-04-11 Thread John Ferlan
On 04/03/2018 05:32 AM, Rainer Müller wrote: > The vmware driver wants to execute vmware-vmx from the same directory in > which vmrun was found. However, on VMware Fusion 10 vmrun at > /Applications/VMware Fusion.app/Contents/Public/vmrun is a symlink > pointing to ../Library/vmrun. vmware-vmx

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 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] [RFC PATCH 0/4] LXC - Implement save/restore domain state

2018-04-11 Thread Radostin Stoyanov
On 11/04/18 12:34, 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 >> containers. > I

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

[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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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] 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

[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 +++--

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] [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] [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] [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 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 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 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

[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 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 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 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 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 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 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 ---

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

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

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 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] [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

[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:

[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

  1   2   >