[libvirt] [PATCH 04/10] qemu: Reorganize -machine arguments

2016-02-16 Thread John Ferlan
Reorganize the module to put all the -machine argument processing code together at the top to form a logical order of processing for qemuBuildCommandLine working top down in the module. Signed-off-by: John Ferlan --- src/qemu/qemu_command.c | 464

[libvirt] [PATCH 03/10] qemu: Make basic upfront checks before creating command

2016-02-16 Thread John Ferlan
Create qemuBuildPreCheck to make some basic upfront checks before trying to build the command. Unfortunately the 'spice' count was used later on, so yuck, handle that. This will move some logic from much later to much earlier - we shouldn't be adjusting any data so that shouldn't matter. Signed-

[libvirt] [PATCH 07/10] qemu: Reorganize -m arguments

2016-02-16 Thread John Ferlan
Reorganize the module to put all the -m argument processing code together after the domain loader to form a logical order of processing for qemuBuildCommandLine working top down in the module. Signed-off-by: John Ferlan --- src/qemu/qemu_command.c | 217 ++

[libvirt] [PATCH 06/10] qemu: Reorganize qemuBuildDomainLoaderCommandLine call

2016-02-16 Thread John Ferlan
Reorganize the module to put the function after the -cpu processing to form a logical order of processing for qemuBuildCommandLine working top down in the module. Signed-off-by: John Ferlan --- src/qemu/qemu_command.c | 141 1 file changed, 71 ins

[libvirt] [PATCH 08/10] qemu: Reorganize -smp argument

2016-02-16 Thread John Ferlan
Reorganize the module to put all the -smp argument processing code together after the memory arguments to form a logical order of processing for qemuBuildCommandLine working top down in the module. Signed-off-by: John Ferlan --- src/qemu/qemu_command.c | 102 -

[libvirt] [PATCH 09/10] qemu: Reorganize IOThread -object arguments

2016-02-16 Thread John Ferlan
Reorganize the module to put all the IOThread argument processing code together after the -smp to form a logical order of processing for qemuBuildCommandLine working top down in the module. Signed-off-by: John Ferlan --- src/qemu/qemu_command.c | 56 +-

[libvirt] [PATCH 05/10] qemu: Reorganize -cpu arguments

2016-02-16 Thread John Ferlan
Reorganize the module to put all the -cpu argument processing code together after the -machine to form a logical order of processing for qemuBuildCommandLine working top down in the module. Signed-off-by: John Ferlan --- src/qemu/qemu_command.c | 2798

[libvirt] [PATCH 00/10] Reorganizing qemu_command.c continued

2016-02-16 Thread John Ferlan
Figure I'll do these in smaller chunks - it's a large module. Suffice to say there's a lot of "movement" and patches for each is tedius, but I hope in the end it will be easier to deal with. For the most part all patches are primarily code motion, although git diff may have you believe otherwise.

[libvirt] [PATCH 02/10] qemu: Remove local emulator

2016-02-16 Thread John Ferlan
Remove the local variable 'emulator' and just use def->emulator Signed-off-by: John Ferlan --- src/qemu/qemu_command.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index a9b5c3b..ab27619 100644 --- a/src/q

[libvirt] [PATCH 01/10] qemu: Move qemuDeviceDriveHostAlias

2016-02-16 Thread John Ferlan
Move function to qemu_alias.c, rename it to qemuDomainDeviceDriveAlias Signed-off-by: John Ferlan --- src/qemu/qemu_alias.c | 16 src/qemu/qemu_alias.h | 4 src/qemu/qemu_command.c | 15 --- src/qemu/qemu_command.h | 3 --- src/qemu/qemu_hotplug.c | 6 +++

[libvirt] [PATCH 2/4] xenconfig: produce key=value disk config syntax in xl formatter

2016-02-16 Thread Jim Fehlig
The most formal form of xl disk configuration uses key=value syntax to define each configuration item, e.g. format=raw, vdev=xvda, access=rw, backendtype=phy, target=disksrc Change the xl disk formatter to produce this syntax, which allows target= to contain meta info needed to setup a network-ba

[libvirt] [PATCH 4/4] libxl: add support for rbd qdisk

2016-02-16 Thread Jim Fehlig
xl/libxl already supports qemu's network-based block backends such as nbd and rbd. libvirt has supported configuring such s for long time too. This patch adds support for rbd disks in the libxl driver by generating a rbd device URL from the virDomainDiskDef object. The URL is passed to libxl via th

[libvirt] [PATCH 3/4] xenconfig: support xl<->xml conversion of rbd disk devices

2016-02-16 Thread Jim Fehlig
The target= setting in xl disk configuration can be used to encode meta info that is meaningful to a backend. Leverage this fact to support qdisk network disk types such as rbd. E.g. xl disk config containing disk = [ "format=raw,vdev=hdb,access=rw,backendtype=qdisk, target=rbd:pool/

[libvirt] [PATCH 1/4] xenconfig: replace text 'xm' with 'xl' in xlconfigtest

2016-02-16 Thread Jim Fehlig
While at it, improve a few comments. No functional change. Signed-off-by: Jim Fehlig --- tests/xlconfigtest.c | 34 +++--- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/tests/xlconfigtest.c b/tests/xlconfigtest.c index 4b2f28f..aa53ed8 100644 --- a/t

[libvirt] [PATCH 0/4] libxl: support qemu's network-based block backends

2016-02-16 Thread Jim Fehlig
xl/libxl already supports qemu's network-based block backends such as nbd and rbd. libvirt has supported configuring network disks for long time too. This series marries the two in the libxl driver and in the xl<->xml converter. Only rbd supported is added in this series. Support for other backends

Re: [libvirt] [PATCH 11/12] qemu-command: Move qemuNetworkPrepareDevices

2016-02-16 Thread Laine Stump
On 02/16/2016 09:16 AM, Ján Tomko wrote: d/-command/ On Mon, Feb 15, 2016 at 02:37:25PM -0500, John Ferlan wrote: Move function to qemu_process.c, rename to qemuSetupNetworkPrepareDevices s/Setup/Process/ and make it static. Signed-off-by: John Ferlan --- src/qemu/qemu_command.c | 50 ---

[libvirt] [PATCH 3/5] tests: qemuargv2xml: hardcode disk auth usage

2016-02-16 Thread Cole Robinson
If a qemuargv has iscsi or ceph secrets on the command line, we will convert that to XML like: This is not valid XML, as either a UUID or usage must be specified in the secret block. It's not clear though how the argv2xml code can do anything correct here, since XML like this requires

[libvirt] [PATCH 4/5] tests: qemuargv2xml: Drop memory XML blanking

2016-02-16 Thread Cole Robinson
The memory XML blanking is only there to avoid the unit= churn that was added by default a long time ago. Drop the blanking, switch over to using the standard comparison helpers, and regenerate the output with VIR_TEST_REGENERATE_OUTPUT. --- tests/qemuargv2xmldata/qemuargv2xml-boot-cdrom.xml | 4

[libvirt] [PATCH 1/5] tests: qemuargv2xml: Remove unneeded XML blanking

2016-02-16 Thread Cole Robinson
None of the test cases depend on dropping these XML bits --- tests/qemuargv2xmltest.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tests/qemuargv2xmltest.c b/tests/qemuargv2xmltest.c index 6671be4..f07818a 100644 --- a/tests/qemuargv2xmltest.c +++ b/tests/qemuargv2xml

[libvirt] [PATCH 2/5] tests: qemuargv2xml: Remove UUID randomness

2016-02-16 Thread Cole Robinson
Overwrite any randomly generated UUID to use a hardcoded value, so we don't need to blank it when comparing XML. --- .../qemuargv2xml-hostdev-pci-address.xml | 2 +- .../qemuargv2xmldata/qemuargv2xml-misc-disable-s3.xml | 2 +- .../qemuargv2xml-misc-disable-suspends.xml|

[libvirt] [PATCH 0/5] tests: qemuargv2xml: Enabling REGENERATE_OUTPUT

2016-02-16 Thread Cole Robinson
This reworks qemuargv2xml and lxcconf2xml tests to allow use of VIR_TEST_REGENERATE_OUTPUT Cole Robinson (5): tests: qemuargv2xml: Remove unneeded XML blanking tests: qemuargv2xml: Remove UUID randomness tests: qemuargv2xml: hardcode disk auth usage= tests: qemuargv2xml: Drop memory XML bl

[libvirt] [PATCH 5/5] tests: lxcconf2xml: Drop XML blanking

2016-02-16 Thread Cole Robinson
Hardcode a UUID like we did for qemuargv2xml, so we can use standard comparison helpers, which gives us VIR_TEST_REGENERATE_OUTPUT support --- tests/lxcconf2xmltest.c | 22 +++--- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/tests/lxcconf2xmltest.c b/tests/lxcconf

Re: [libvirt] [PATCH 02/10] qemu: migration: Refactor code now that we assume support for fd migration

2016-02-16 Thread Ján Tomko
On Tue, Feb 16, 2016 at 04:29:44PM +0100, Peter Krempa wrote: > After removing capability check for fd migration the code that was left > behind didn't make quite sense. The old exec migration would be used in > case when pipe() failed. Remove the old code and make failure of pipe() > a hard error.

[libvirt] [PATCH] conf: Use a temporary int variable to store GIC version

2016-02-16 Thread Andrea Bolognani
Since no value in the virGICVersion enumeration is negative, a clever enough compiler can report an error such as src/conf/domain_conf.c:15337:75: error: comparison of unsigned enum expression < 0 is always false [-Werror,-Wtautological-compare] if ((def->gic_version = virGICVersionTypeFro

Re: [libvirt] [PATCH 01/10] qemu: cgroup: Remove abandoned function qemuAddToCgroup

2016-02-16 Thread Ján Tomko
On Tue, Feb 16, 2016 at 04:29:43PM +0100, Peter Krempa wrote: > This function doesn't do anything useful since 2049ef99425db33f1e66fa8. > --- > src/qemu/qemu_cgroup.c | 11 --- > src/qemu/qemu_cgroup.h | 1 - > 2 files changed, 12 deletions(-) > ACK Jan signature.asc Description: Dig

Re: [libvirt] [PATCH 0/6] NSS module for libvirt

2016-02-16 Thread Daniel P. Berrange
On Mon, Feb 15, 2016 at 05:38:37PM +0100, Michal Privoznik wrote: > Are you tired of remembering IP addresses for your domains? Do > you have enough of configuring static IPs so that you can add > them to your hosts file? Then libvirt NSS module is exactly what > you need! > > NSS does a lot in a

Re: [libvirt] [PATCH 0/6] NSS module for libvirt

2016-02-16 Thread Guido Günther
On Mon, Feb 15, 2016 at 05:38:37PM +0100, Michal Privoznik wrote: > Are you tired of remembering IP addresses for your domains? Do > you have enough of configuring static IPs so that you can add > them to your hosts file? Then libvirt NSS module is exactly what > you need! > > NSS does a lot in a

Re: [libvirt] [PATCH v4 2/7] util: Refactor virHashForEach so it returns as soon as an iterator fails

2016-02-16 Thread Michal Privoznik
On 12.02.2016 11:08, Erik Skultety wrote: > The method will now return 0 on success and -1 on error, rather than number of > items which it iterated over before it returned back to the caller. Since the > only place where we actually check the number of elements iterated is in > virhashtest, return

Re: [libvirt] [PATCH v4 7/7] virt-admin: Introduce cmdSrvList

2016-02-16 Thread Michal Privoznik
On 12.02.2016 11:08, Erik Skultety wrote: > Since we introduced listing API earlier in these series, it's time > to wire up the API to the virt-admin client. > > Signed-off-by: Erik Skultety > --- > tools/virt-admin.c | 61 > ++ > 1 file chang

Re: [libvirt] [PATCH v4 5/7] admin: Introduce virAdmServer structure

2016-02-16 Thread Michal Privoznik
On 12.02.2016 11:08, Erik Skultety wrote: > This is the key structure of all management operations performed on the > daemon/clients. An admin client needs to be able to identify > another client (either admin or non-privileged client) to perform an > action on it. This identification includes a se

Re: [libvirt] [PATCH 00/12] Split up qemu_command.c

2016-02-16 Thread John Ferlan
On 02/15/2016 02:37 PM, John Ferlan wrote: > Before disappearing too far down the rabbit hole... > > My recent foray into qemu_command.c to split out qemu_parse_command.c > got me thinking that the module could use quite a bit of a reorganization. > > It's about 11,400 lines of all sorts of var

Re: [libvirt] [PATCH v4 0/7] admin: Introduce server listing API

2016-02-16 Thread Michal Privoznik
On 12.02.2016 11:08, Erik Skultety wrote: > Since v3: > - refactors to virHashForEach and hash iterators > - servers are now stored in a hash table instead of an array > - added forgotten virObjectLock in remoteAdminConnectListServers > > Erik Skultety (7): > util: Add a return value to void has

Re: [libvirt] [PATCH v4 6/7] admin: Introduce adminDaemonConnectListServers API

2016-02-16 Thread Michal Privoznik
On 12.02.2016 11:08, Erik Skultety wrote: > This API is merely a convenience API, i.e. when managing clients connected to > daemon's servers, we should know (convenience) which server the specific > client > is connected to. This implies a client-side representation of a server along > with a basi

[libvirt] [PATCH 06/10] qemu: cgroup: Avoid reporting errors from inaccessible NFS volumes

2016-02-16 Thread Peter Krempa
Rather than reporting it and then reseting the error, don't report it in the first place. --- src/qemu/qemu_cgroup.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c index 2c0ac30..b37af6d 100644 --- a/src/qemu/qemu_c

[libvirt] [PATCH 04/10] util: cgroup: Drop virCgroup(Allow|Deny)DeviceMajor

2016-02-16 Thread Peter Krempa
Since commit 47e5b5ae virCgroupAllowDevice allows to pass -1 as either the minor or major device number and it automatically uses '*' in place of that. Reuse the new approach through the code and drop the duplicated functions. --- src/libvirt_private.syms | 2 -- src/lxc/lxc_cgroup.c | 4 +--

[libvirt] [PATCH 05/10] util: cgroup: Allow ignoring EACCES in virCgroup(Allow|Deny)DevicePath

2016-02-16 Thread Peter Krempa
When adding disk images to ACL we may call those functions on NFS shares. In that case we might get an EACCES, which isn't really relevant since NFS would not hold a block device. This patch adds a flag that allows to stop reporting an error on EACCES to avoid spaming logs. Currently there's no fu

[libvirt] [PATCH 09/10] qemu: cgroup: Extract guts of qemuSetupImageCgroupInternal

2016-02-16 Thread Peter Krempa
They will later be reused for setting cgroup for other image backed devices. --- src/qemu/qemu_cgroup.c | 39 --- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c index 6a34bab..9f24545 100644 --- a/

[libvirt] [PATCH 07/10] qemu: cgroup: Switch to qemu(Setup|Teardown)ImageCgroup

2016-02-16 Thread Peter Krempa
For other objects we use the two functions rather than one with a bool. Convert qemuSetImageCgroup to the same approach. --- src/qemu/qemu_cgroup.c | 17 - src/qemu/qemu_cgroup.h | 7 --- src/qemu/qemu_driver.c | 4 ++-- 3 files changed, 18 insertions(+), 10 deletions(-) dif

[libvirt] [PATCH 02/10] qemu: migration: Refactor code now that we assume support for fd migration

2016-02-16 Thread Peter Krempa
After removing capability check for fd migration the code that was left behind didn't make quite sense. The old exec migration would be used in case when pipe() failed. Remove the old code and make failure of pipe() a hard error. This additionally removes usage of virCgroupAllowDevicePath outside

[libvirt] [PATCH 08/10] qemu: cgroup: Split up qemuSetImageCgroupInternal

2016-02-16 Thread Peter Krempa
Separate the Teardown and Setup code paths into separate helpers. --- src/qemu/qemu_cgroup.c | 60 ++ 1 file changed, 36 insertions(+), 24 deletions(-) diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c index 978dfa2..6a34bab 100644 --- a/

[libvirt] [PATCH 01/10] qemu: cgroup: Remove abandoned function qemuAddToCgroup

2016-02-16 Thread Peter Krempa
This function doesn't do anything useful since 2049ef99425db33f1e66fa8. --- src/qemu/qemu_cgroup.c | 11 --- src/qemu/qemu_cgroup.h | 1 - 2 files changed, 12 deletions(-) diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c index 4b5cf36..7579f42 100644 --- a/src/qemu/qemu_cgrou

[libvirt] [PATCH 03/10] util: cgroup: Instrument virCgroupDenyDevice to handle -1 device number as *

2016-02-16 Thread Peter Krempa
Similarly to commit 47e5b5ae virCgroupDenyDevice will handle -1 as *. --- src/util/vircgroup.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index 6ce208e..ab0cd47 100644 --- a/src/util/vircgroup.c +++ b/src/util

[libvirt] [PATCH 00/10] Setup cgroups for firmware devices and related refactors

2016-02-16 Thread Peter Krempa
Peter Krempa (10): qemu: cgroup: Remove abandoned function qemuAddToCgroup qemu: migration: Refactor code now that we assume support for fd migration util: cgroup: Instrument virCgroupDenyDevice to handle -1 device number as * util: cgroup: Drop virCgroup(Allow|Deny)DeviceMajor ut

[libvirt] [PATCH 10/10] qemu: cgroup: Setup cgroups for bios/firmware images

2016-02-16 Thread Peter Krempa
oVirt wants to use OVMF images on top of lvm for their 'logical' storage thus we should set up device ACLs for them so it will actually work. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1305922 --- src/qemu/qemu_cgroup.c | 20 1 file changed, 20 insertions(+) diff

Re: [libvirt] VMware driver: SessionIsActive API / Sessions.ValidateSession permission

2016-02-16 Thread Richard W.M. Jones
On Mon, Feb 15, 2016 at 11:22:27PM +0100, Matthias Bolte wrote: > 2016-02-11 12:59 GMT+01:00 Richard W.M. Jones : > > Is calling SessionIsActive necessary? From my (very limited) > > understanding, it seems as if we might use 'SessionManager. > > currentSession' property instead, which doesn't req

Re: [libvirt] [PATCH 08/12] qemu-command: Move qemuDomain*Address* functions to qemu_domain.c

2016-02-16 Thread John Ferlan
On 02/16/2016 09:46 AM, Ján Tomko wrote: > On Tue, Feb 16, 2016 at 09:36:58AM -0500, John Ferlan wrote: >> >> >> On 02/16/2016 08:58 AM, Ján Tomko wrote: >>> On Mon, Feb 15, 2016 at 02:37:22PM -0500, John Ferlan wrote: Move the functions into qemu_domain.c - additionally move any supporting

Re: [libvirt] [PATCH 08/12] qemu-command: Move qemuDomain*Address* functions to qemu_domain.c

2016-02-16 Thread Ján Tomko
On Tue, Feb 16, 2016 at 09:36:58AM -0500, John Ferlan wrote: > > > On 02/16/2016 08:58 AM, Ján Tomko wrote: > > On Mon, Feb 15, 2016 at 02:37:22PM -0500, John Ferlan wrote: > >> Move the functions into qemu_domain.c - additionally move any supporting > >> static functions. > >> > >> Make qemuDoma

Re: [libvirt] [PATCH 5/7] qemu: Always enable GIC on ARM virt machines

2016-02-16 Thread Andrea Bolognani
On Tue, 2016-02-09 at 09:30 -0500, John Ferlan wrote: > So let's see that means the original patches should be fine with the > following adjustments: >  > patch 1 has a typo in the commit message, then ACK > patch 4 could change the function name (use Enable) > patch 4 should use void instead of in

Re: [libvirt] [PATCH 09/12] qemu-command: Move remaining qemuDomain* functions

2016-02-16 Thread John Ferlan
On 02/16/2016 09:08 AM, Ján Tomko wrote: > On Mon, Feb 15, 2016 at 02:37:23PM -0500, John Ferlan wrote: >> Move qemuDomainNetVLAN and qemuDomainDeviceAliasIndex into qemu_domain.c >> >> Signed-off-by: John Ferlan >> --- >> src/qemu/qemu_command.c | 22 -- >> src/qemu/qemu_co

Re: [libvirt] [PATCH 12/12] qemu-command: Move qemuAssign*Alias* API's into their own module

2016-02-16 Thread Ján Tomko
On Mon, Feb 15, 2016 at 02:37:26PM -0500, John Ferlan wrote: > Create a new module qemu_assign_alias.c to handle the qemuAssign*Alias* APIs qemu_alias.c is shorter and could contain that one function that extracts info from the alias. > Signed-off-by: John Ferlan > --- > po/POTFILES.in

[libvirt] [PATCH 7/9] qemu: Simplify error handling in qemuProcessReconnect

2016-02-16 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/qemu/qemu_process.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index e3d9f3d..19ecf59 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_proce

[libvirt] [PATCH 8/9] qemu: Avoid calling qemuProcessStop without a job

2016-02-16 Thread Jiri Denemark
Calling qemuProcessStop without a job opens a way to race conditions with qemuDomainObjExitMonitor called in another thread. A real world example of such a race condition: - migration thread (A) calls qemuMigrationWaitForSpice - another thread (B) starts processing qemuDomainAbortJob API - t

[libvirt] [PATCH 5/9] qemu: Start an async job for processGuestPanicEvent

2016-02-16 Thread Jiri Denemark
Only a small portion of processGuestPanicEvent was enclosed within a job, let's make sure we use the job for all operations to avoid race conditions. Signed-off-by: Jiri Denemark --- src/qemu/qemu_driver.c | 59 +++--- 1 file changed, 18 insertions(+),

[libvirt] [PATCH 0/9] Fix race conditions with qemuProcessStop

2016-02-16 Thread Jiri Denemark
Jiri Denemark (9): qemu: Export qemuDomainObjBeginNestedJob qemu: End nested jobs properly qemu: Pass async job to qemuProcessInit qemu: Introduce qemuProcessBeginStopJob qemu: Start an async job for processGuestPanicEvent qemu: Process monitor EOF in a job qemu: Simplify error handli

[libvirt] [PATCH 6/9] qemu: Process monitor EOF in a job

2016-02-16 Thread Jiri Denemark
Stopping a domain without a job risks a race condition with another thread which started a job a which does not expect anyone else to be messing around with the same domain object. Signed-off-by: Jiri Denemark --- src/qemu/qemu_domain.h | 1 + src/qemu/qemu_driver.c | 51 +

Re: [libvirt] [PATCH 08/12] qemu-command: Move qemuDomain*Address* functions to qemu_domain.c

2016-02-16 Thread John Ferlan
On 02/16/2016 08:58 AM, Ján Tomko wrote: > On Mon, Feb 15, 2016 at 02:37:22PM -0500, John Ferlan wrote: >> Move the functions into qemu_domain.c - additionally move any supporting >> static functions. >> >> Make qemuDomainSupportsPCI non static. >> >> Also, move and rename the following: >> >> qe

[libvirt] [PATCH 2/9] qemu: End nested jobs properly

2016-02-16 Thread Jiri Denemark
Ending a nested job is no different from ending any other (non-async) job, after all the code in qemuDomainBeginJobInternal does not handle them differently either. Thus we should call qemuDomainObjEndJob to stop nested jobs. Signed-off-by: Jiri Denemark --- src/qemu/qemu_domain.c | 7 ++- 1

[libvirt] [PATCH 3/9] qemu: Pass async job to qemuProcessInit

2016-02-16 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration.c | 3 ++- src/qemu/qemu_process.c | 3 ++- src/qemu/qemu_process.h | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index f2c7b61..72d7144 100644 --- a/src/qemu

[libvirt] [PATCH 9/9] Check for active domain in virDomainObjWait

2016-02-16 Thread Jiri Denemark
virDomainObjWait is designed to be called in a loop. Make sure we break the loop in case the domain dies to avoid waiting for an event which will never happen. Signed-off-by: Jiri Denemark --- src/conf/domain_conf.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/conf/domain_conf.

[libvirt] [PATCH 4/9] qemu: Introduce qemuProcessBeginStopJob

2016-02-16 Thread Jiri Denemark
When destroying a domain we need to make sure we will be able to start a job no matter what other operations are running or even stuck in a job. This is done by killing the domain before starting the destroy job. Let's introduce qemuProcessBeginStopJob which combines killing a domain and starting

[libvirt] [PATCH 1/9] qemu: Export qemuDomainObjBeginNestedJob

2016-02-16 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/qemu/qemu_domain.c | 2 +- src/qemu/qemu_domain.h | 4 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 495c76b..da22d1c 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@

Re: [libvirt] [PATCH 11/12] qemu-command: Move qemuNetworkPrepareDevices

2016-02-16 Thread Ján Tomko
d/-command/ On Mon, Feb 15, 2016 at 02:37:25PM -0500, John Ferlan wrote: > Move function to qemu_process.c, rename to qemuSetupNetworkPrepareDevices s/Setup/Process/ > and make it static. > > Signed-off-by: John Ferlan > --- > src/qemu/qemu_command.c | 50 -

Re: [libvirt] [PATCH 10/12] qemu-command: Move and rename qemuOpenVhostNet

2016-02-16 Thread Ján Tomko
On Mon, Feb 15, 2016 at 02:37:24PM -0500, John Ferlan wrote: > Move function to qemu_interface.c and rename to qemuInterfaceOpenVhostNet > > Signed-off-by: John Ferlan > --- > src/qemu/qemu_command.c | 97 > +-- > src/qemu/qemu_command.h | 6 ---

Re: [libvirt] [PATCH 09/12] qemu-command: Move remaining qemuDomain* functions

2016-02-16 Thread Ján Tomko
On Mon, Feb 15, 2016 at 02:37:23PM -0500, John Ferlan wrote: > Move qemuDomainNetVLAN and qemuDomainDeviceAliasIndex into qemu_domain.c > > Signed-off-by: John Ferlan > --- > src/qemu/qemu_command.c | 22 -- > src/qemu/qemu_command.h | 1 - > src/qemu/qemu_domain.c | 25 +++

[libvirt] [PATCH v7 0/6] Global domain cpu.cfs_period_us and cpu.cfs_quota_us setup

2016-02-16 Thread Alexander Burluka
This patchset implements an ability to specify values for domain top level cpu.cfs_period_us and cpu.cfs_quota_us cgroups. These parameters are opt-in and named "global_period" and "global_quota". Introduction of these settings gives management applications further choice of controlling CPU usage.

Re: [libvirt] [PATCH 08/12] qemu-command: Move qemuDomain*Address* functions to qemu_domain.c

2016-02-16 Thread Ján Tomko
On Mon, Feb 15, 2016 at 02:37:22PM -0500, John Ferlan wrote: > Move the functions into qemu_domain.c - additionally move any supporting > static functions. > > Make qemuDomainSupportsPCI non static. > > Also, move and rename the following: > > qemuSetSCSIControllerModel to qemuDomainSetSCSIContr

[libvirt] [PATCH v7 4/6] Add global_period and global_quota XML validation test

2016-02-16 Thread Alexander Burluka
Signed-off-by: Alexander Burluka --- tests/qemuxml2argvdata/qemuxml2argv-cputune.xml | 2 ++ tests/qemuxml2xmloutdata/qemuxml2xmlout-cputune.xml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cputune.xml b/tests/qemuxml2argvdata/qemuxml2argv-cputun

[libvirt] [PATCH v7 6/6] Implement handling of per-domain bandwidth settings

2016-02-16 Thread Alexander Burluka
Signed-off-by: Alexander Burluka --- src/qemu/qemu_driver.c | 97 -- 1 file changed, 95 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 2bbc724..d211a32 100644 --- a/src/qemu/qemu_driver.c +++ b/src/

[libvirt] [PATCH v7 1/6] Add global period definitions

2016-02-16 Thread Alexander Burluka
This parameter represents top level period cgroup that limits whole domain enforcement period for a quota Signed-off-by: Alexander Burluka --- docs/schemas/domaincommon.rng| 5 + include/libvirt/libvirt-domain.h | 16 src/conf/domain_conf.c | 18 ++

[libvirt] [PATCH v7 5/6] Implement qemuSetupGlobalCpuCgroup

2016-02-16 Thread Alexander Burluka
This functions setups per-domain cpu bandwidth parameters Signed-off-by: Alexander Burluka --- src/qemu/qemu_cgroup.c | 49 + src/qemu/qemu_cgroup.h | 1 + src/qemu/qemu_process.c | 4 3 files changed, 54 insertions(+) diff --git a/src/qe

[libvirt] [PATCH v7 3/6] Add error checking on global quota and period

2016-02-16 Thread Alexander Burluka
Signed-off-by: Alexander Burluka --- src/qemu/qemu_command.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 7a8ae73..d2217b0 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -9174,7 +9174,8 @@ qemu

[libvirt] [PATCH v7 2/6] Add global quota parameter necessary definitions

2016-02-16 Thread Alexander Burluka
This parameter controls the maximum bandwidth to be used within a period for whole domain. Signed-off-by: Alexander Burluka --- docs/schemas/domaincommon.rng| 5 + include/libvirt/libvirt-domain.h | 16 src/conf/domain_conf.c | 19 +++ src/conf

Re: [libvirt] [PATCH 07/12] qemu-command: Move qemuDomainSupports* functions

2016-02-16 Thread Ján Tomko
Here I'd rather drop the command from the prefix completely, since the fuctions get moved. On Mon, Feb 15, 2016 at 02:37:21PM -0500, John Ferlan wrote: > Move qemuDomainSupportsNicdev and qemuDomainSupportsNetdev into qemu_domain.c > and expose from there. > > Signed-off-by: John Ferlan > --- >

Re: [libvirt] [PATCH 04/12] qemu-command: Move qemuVirCommandGetDevSet

2016-02-16 Thread Ján Tomko
On Mon, Feb 15, 2016 at 02:37:18PM -0500, John Ferlan wrote: > Move function closer to where it's used in qemuBuildTPMBackendStr > > Signed-off-by: John Ferlan > --- > src/qemu/qemu_command.c | 52 > - > 1 file changed, 26 insertions(+), 26 deleti

Re: [libvirt] [PATCH 03/12] qemu-command: Move qemuBuildTPMDevStr

2016-02-16 Thread Ján Tomko
On Mon, Feb 15, 2016 at 02:37:17PM -0500, John Ferlan wrote: > Move function closer to where it's used in qemuBuildTPMCommandLine > > Also fix function header to match current coding practices > > Signed-off-by: John Ferlan > --- > src/qemu/qemu_command.c | 61 > +--

Re: [libvirt] [PATCH 02/12] qemu-command: Move qemuVirCommandGetFDSet

2016-02-16 Thread Ján Tomko
On Mon, Feb 15, 2016 at 02:37:16PM -0500, John Ferlan wrote: > Move function closer to where it's used in qemuBuildTPMCommandLine > > Signed-off-by: John Ferlan > --- > src/qemu/qemu_command.c | 53 > + > 1 file changed, 27 insertions(+), 26 delet

Re: [libvirt] [PATCH 01/12] qemu-command: Move qemuBuildTPMBackendStr

2016-02-16 Thread Ján Tomko
The prefix contains a dash even though we use an underscore in the file name. Either use qemu_command, qemu or just no prefix at all (it's contained in the fucntion name anyway). On Mon, Feb 15, 2016 at 02:37:15PM -0500, John Ferlan wrote: > Move function closer to where it's called in qemuBuildT

Re: [libvirt] [Qemu-devel] [RFC PATCH 0/2] ARM: add QMP command to query GIC version

2016-02-16 Thread Andrea Bolognani
On Tue, 2016-02-16 at 12:38 +, Daniel P. Berrange wrote: > > > Regardless of the way it is exposed in libvirt API, when libvirt probes > > > for capabilities it will *always* use '-m none'. > >  > > Domain capabilities are currently derived almost entirely from data > > taken from virQEMUCaps,

Re: [libvirt] [Qemu-devel] [RFC PATCH 0/2] ARM: add QMP command to query GIC version

2016-02-16 Thread Daniel P. Berrange
On Tue, Feb 16, 2016 at 01:27:55PM +0100, Andrea Bolognani wrote: > On Tue, 2016-02-16 at 12:15 +, Daniel P. Berrange wrote: > > On Tue, Feb 16, 2016 at 01:05:45PM +0100, Andrea Bolognani wrote: > > > On Tue, 2016-02-16 at 10:15 +, Daniel P. Berrange wrote: > > > > > Back to GIV.  Recognize

Re: [libvirt] [Qemu-devel] [RFC PATCH 0/2] ARM: add QMP command to query GIC version

2016-02-16 Thread Andrea Bolognani
On Tue, 2016-02-16 at 12:15 +, Daniel P. Berrange wrote: > On Tue, Feb 16, 2016 at 01:05:45PM +0100, Andrea Bolognani wrote: > > On Tue, 2016-02-16 at 10:15 +, Daniel P. Berrange wrote: > > > > Back to GIV.  Recognized values of gic-version are fixed at compile > > > > time: 2, 3, host.  On

Re: [libvirt] [Qemu-devel] [RFC PATCH 0/2] ARM: add QMP command to query GIC version

2016-02-16 Thread Andrea Bolognani
On Tue, 2016-02-16 at 12:09 +, Peter Maydell wrote: > On 16 February 2016 at 12:05, Andrea Bolognani wrote: > > The idea is to add this information to domain capabilities, which > > already have virtualization type, architecture and machine type as > > inputs. > >  > > Since GIC is only availa

Re: [libvirt] [Qemu-devel] [RFC PATCH 0/2] ARM: add QMP command to query GIC version

2016-02-16 Thread Daniel P. Berrange
On Tue, Feb 16, 2016 at 01:05:45PM +0100, Andrea Bolognani wrote: > On Tue, 2016-02-16 at 10:15 +, Daniel P. Berrange wrote: > > > Back to GIV.  Recognized values of gic-version are fixed at compile > > > time: 2, 3, host.  Once again, QOM does things in code rather than data: > > > the set of

Re: [libvirt] [PATCH] qemu: fix hot unplug of PCI devices with VFIO

2016-02-16 Thread Michal Privoznik
On 05.02.2016 20:07, Ludovic Beliveau wrote: > Currently, on hot unplug of PCI devices with VFIO driver for QEMU, libvirt is > trying to restore the host devices to it's previous value (basically a chown > on the previous user/group). > > However for devices with VFIO driver, when the device is un

Re: [libvirt] [Qemu-devel] [RFC PATCH 0/2] ARM: add QMP command to query GIC version

2016-02-16 Thread Peter Maydell
On 16 February 2016 at 12:05, Andrea Bolognani wrote: > The idea is to add this information to domain capabilities, which > already have virtualization type, architecture and machine type as > inputs. > > Since GIC is only available for the virt machine type on ARM hosts, > and the GIC versions mi

Re: [libvirt] [Qemu-devel] [RFC PATCH 0/2] ARM: add QMP command to query GIC version

2016-02-16 Thread Andrea Bolognani
On Tue, 2016-02-16 at 10:15 +, Daniel P. Berrange wrote: > > Back to GIV.  Recognized values of gic-version are fixed at compile > > time: 2, 3, host.  Once again, QOM does things in code rather than data: > > the set of values is defined in the setter function > > virt_set_gic_version(). > > 

Re: [libvirt] [PATCH] Spell VMware with a lowercase w

2016-02-16 Thread Ján Tomko
On Tue, Feb 16, 2016 at 12:33:54PM +0100, Michal Privoznik wrote: > On 15.02.2016 15:38, Ján Tomko wrote: > > Replace all occurrences of VMWare outside the news. > > --- > > docs/formatdomain.html.in | 2 +- > > docs/migration.html.in| 2 +- > > docs/storage.html.in | 2 +- > > libvirt.sp

Re: [libvirt] [PATCH] Spell VMware with a lowercase w

2016-02-16 Thread Michal Privoznik
On 15.02.2016 15:38, Ján Tomko wrote: > Replace all occurrences of VMWare outside the news. > --- > docs/formatdomain.html.in | 2 +- > docs/migration.html.in| 2 +- > docs/storage.html.in | 2 +- > libvirt.spec.in | 2 +- > src/util/virerror.c | 2 +- > src/util/virstorag

Re: [libvirt] [Qemu-devel] [RFC PATCH 0/2] ARM: add QMP command to query GIC version

2016-02-16 Thread Daniel P. Berrange
On Tue, Feb 16, 2016 at 11:10:55AM +0100, Markus Armbruster wrote: > Peter Maydell writes: > > > On 15 February 2016 at 20:18, Andrew Jones wrote: > >> On Mon, Feb 15, 2016 at 08:40:54PM +0100, Markus Armbruster wrote: > >>> How would the command line look like? > >>> > >> > >> Here is what is a

Re: [libvirt] [Qemu-devel] [RFC PATCH 0/2] ARM: add QMP command to query GIC version

2016-02-16 Thread Markus Armbruster
Peter Maydell writes: > On 15 February 2016 at 20:18, Andrew Jones wrote: >> On Mon, Feb 15, 2016 at 08:40:54PM +0100, Markus Armbruster wrote: >>> How would the command line look like? >>> >> >> Here is what is available today >> >> # select gicv2 (this work with and without KVM) >> qemu-system

Re: [libvirt] Block replication driver

2016-02-16 Thread Peter Krempa
On Fri, Feb 12, 2016 at 13:22:01 -0700, Eric Blake wrote: > On 12/02/2015 02:08 AM, Simon Kollberg wrote: [...] > > My initial thought was to manually set the alias of the > > disk and add a new reference element to the backingStore: > > > > ... > > > > > > > > ... > > > > ... >