Re: [libvirt] [PATCH 5/6] qemu: implement element for devices

2017-11-20 Thread John Ferlan
On 11/14/2017 08:45 AM, Pavel Hrdina wrote: > So far we were configuring the sound output based on what graphic device > was configured in domain XML. This had a several disadvantages, it's > not transparent, in case of multiple graphic devices it was overwritten > by the last one and there was

Re: [libvirt] [PATCH 4/6] conf: introduce element for devices

2017-11-20 Thread John Ferlan
On 11/14/2017 08:45 AM, Pavel Hrdina wrote: > So far it was not possible to specify how the audio output from guest s/So far it was/It is/ > should be presented to host/users. Now it will be possible to do so > via element for device where you specify the output > "type". > > Signed-off-by:

Re: [libvirt] [PATCH 3/6] qemu: explicitly disable audio if there is no sound device

2017-11-20 Thread John Ferlan
On 11/14/2017 08:45 AM, Pavel Hrdina wrote: > If there is no sound device configured for the guest we can disable the > audio output because hot-plugging sound devices isn't supported. > > Signed-off-by: Pavel Hrdina > --- > src/qemu/qemu_command.c

Re: [libvirt] [PATCH 2/6] qemu: move QEMU_AUDIO_DRIVER out of graphic into sound

2017-11-20 Thread John Ferlan
On 11/14/2017 08:45 AM, Pavel Hrdina wrote: > Setting the default audio output depends on specific graphic device > but requires having sound device configured as well and it's the sound > device that handles the audio. > > Signed-off-by: Pavel Hrdina > --- > src/qemu/qemu_command.c

Re: [libvirt] [PATCH 1/6] tests: add test cases for default sound output

2017-11-20 Thread John Ferlan
On 11/14/2017 08:45 AM, Pavel Hrdina wrote: > These test cases models current situation where there is no way how > to specify sound output and that it's based on which graphic device > is the last one. > Personally had a hard time parsing what the commit message said, but based on what happens

Re: [libvirt] [PATCH v4 2/2] remote: Move the call to remoteClientFreePrivateCallbacks from FreeFunc to CloseFunc

2017-11-20 Thread John Ferlan
On 11/13/2017 08:07 AM, xinhua.Cao wrote: > Still because of commit id 'fe8f1c8b' where we generate a REF for the > Register and that's transparent to the consumer (e.g. how would they > know they need to ensure that Deregister is called), thus the purpose of > this patch is to find a way to Dere

Re: [libvirt] [PATCH v4 1/2] remote: Extract common clearing of event callbacks of client private data

2017-11-20 Thread John Ferlan
On 11/13/2017 08:07 AM, xinhua.Cao wrote: > Extract common clearing of event callbacks as > remoteClientFreePrivateCallbacks. > the common function also separation including the sysident handling. > --- > daemon/remote.c | 73 > ++--- > 1 fil

[libvirt] [PATCH v2 01/10] qemu: Clean up style for the qemuDumpToFd definition

2017-11-20 Thread John Ferlan
Alter the function definition to follow more recent style Signed-off-by: John Ferlan --- src/qemu/qemu_driver.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 3a0e3b6cec..2dac8432ac 100644 --- a/src/qemu/qemu_

[libvirt] [PATCH v2 05/10] qemu: Introduce qemuMonitor[JSON]QueryDump

2017-11-20 Thread John Ferlan
Add the query-dump API's in order to allow the dump-guest-memory to be used to monitor progress. Signed-off-by: John Ferlan --- src/qemu/qemu_monitor.c | 14 + src/qemu/qemu_monitor.h | 11 +++ src/qemu/qemu_monitor_json.c | 69

[libvirt] [PATCH v2 07/10] qemu: Introduce qemuDomainGetJobInfoMigrationStats

2017-11-20 Thread John Ferlan
Extract out the parts of qemuDomainGetJobStatsInternal that get the migration stats. We're about to add the ability to get just dump information. Signed-off-by: John Ferlan --- src/qemu/qemu_driver.c | 52 -- 1 file changed, 33 insertions(+), 19 de

[libvirt] [PATCH v2 09/10] qemu: Add dump completed event to the capabilities

2017-11-20 Thread John Ferlan
Add the DUMP_COMPLETED check to the capabilities. This is the mechanism used to determine whether the dump-guest-memory command can support the "-detach" option and thus be able to wait on the event and allow for a query of the progress of the dump. Signed-off-by: John Ferlan --- src/qemu/qemu_c

[libvirt] [PATCH v2 08/10] qemu: Introduce qemuDomainGetJobInfoDumpStats

2017-11-20 Thread John Ferlan
Add an API to allow fetching the Dump statistics for the job via the qemuDomainGetJobInfo API. Signed-off-by: John Ferlan --- src/qemu/qemu_driver.c | 56 -- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_driver.c b/sr

[libvirt] [PATCH v2 03/10] qemu: Add support for DUMP_COMPLETED event

2017-11-20 Thread John Ferlan
The event is fired when the domain memory only dump completes. Wire up the code to extract and send along the status. Signed-off-by: John Ferlan --- src/qemu/qemu_monitor.c | 18 ++ src/qemu/qemu_monitor.h | 19 +++ src/qemu/qemu_monitor_json.c | 31 +++

[libvirt] [PATCH v2 10/10] qemu: Allow showing the dump progress for memory only dump

2017-11-20 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=916061 If the QEMU version running is new enough (based on the DUMP_COMPLETED event), then we can add a 'detach' boolean to the dump-guest-memory command in order to tell QEMU to run in a thread. This ensures that we don't lock out other commands while t

[libvirt] [PATCH v2 06/10] qemu: Add new parameter to qemuMonitorDumpToFd

2017-11-20 Thread John Ferlan
Add a @detach parameter to the API in order allow running the QEMU code as a thread. Signed-off-by: John Ferlan --- src/qemu/qemu_driver.c | 2 +- src/qemu/qemu_monitor.c | 7 +-- src/qemu/qemu_monitor.h | 3 ++- src/qemu/qemu_monitor_json.c | 4 +++- src/qemu/qemu_monitor_js

[libvirt] [PATCH v2 00/10] Implement query-dump command

2017-11-20 Thread John Ferlan
v1: https://www.redhat.com/archives/libvir-list/2017-November/msg00731.html Differences from v1 (besides more patches) Rather than use a timing loop in order to fetch the dump stats and the presence of the 'query-dump' command, let's use the DUMP_COMPLETED event and wire that up in order to deter

[libvirt] [PATCH v2 02/10] qemu: Alter dump-guest-memory command generation

2017-11-20 Thread John Ferlan
The qemuMonitorJSONMakeCommand can properly handle a NULL string by using the "S:" parameter instead of "s:", so let's use that of having in if/else condition that only adds the "s:". Signed-off-by: John Ferlan --- src/qemu/qemu_monitor_json.c | 18 +- 1 file changed, 5 insertion

[libvirt] [PATCH v2 04/10] qemu: Introduce qemuProcessHandleDumpCompleted

2017-11-20 Thread John Ferlan
Add a couple of booleans to mark when there's a dump completion event waiting and when a dump completed event has been received. To ensure the dump completed event from a non memory-only dump doesn't cause the a dump completed event to be fired, only broadcast if there's a completion event waiting

[libvirt] [PATCH 02/12] qemu: command: Format frontend props with -device rather than -drive

2017-11-20 Thread Peter Krempa
Historically we've formatted a lot of the attributes of a disk (disk geometry, etc) with -drive. Since we use -device now, they should be formatted there. --- src/qemu/qemu_command.c| 5 - tests/qemuxml2argvdata/qemuxml2argv-disk-geometry.args | 6 +++--- 2 file

[libvirt] [PATCH 06/12] qemu: command: Move around order of generating -drive arguments

2017-11-20 Thread Peter Krempa
Move together sections which are conditionaly executed depending on whether -device will be used together with the -drive. --- src/qemu/qemu_command.c| 31 +++--- .../qemuxml2argvdata/qemuxml2argv-boot-cdrom.args | 2 +- .../qemuxml2argv-boot-complex-b

[libvirt] [PATCH 12/12] qemu: command: Explain formatting of 'media=cdrom' in -drive

2017-11-20 Thread Peter Krempa
That is a frontend attribute but can't be moved. --- src/qemu/qemu_command.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 08d96ef562..26ad3fe1af 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -1761,6 +1761,9 @

[libvirt] [PATCH 09/12] qemu: command: Move formatting of disk io error policy from -drive

2017-11-20 Thread Peter Krempa
That's a disk frontend attribute. Move the code to a separate function since it's non-trivial and call it from the frontend attribute formatter. --- src/qemu/qemu_command.c| 62 +- ...uxml2argv-disk-drive-error-policy-enospace.args | 5 +- .../qemux

[libvirt] [PATCH 08/12] qemu: command: Move disk trhottling argument building into a separate function

2017-11-20 Thread Peter Krempa
Isolate it from the other code. --- src/qemu/qemu_command.c | 75 +++-- 1 file changed, 41 insertions(+), 34 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index df3c14d627..6ae738020d 100644 --- a/src/qemu/qemu_command.c ++

[libvirt] [PATCH 10/12] qemu: command: Move around logic for formatting bootindex

2017-11-20 Thread Peter Krempa
Propagate the raw bootindex and let the code decide whether to use it when formatting. --- src/qemu/qemu_command.c | 16 +++- src/qemu/qemu_command.h | 2 +- src/qemu/qemu_hotplug.c | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/

[libvirt] [PATCH 01/12] qemu: command: Split out geometry frontend attribute formatting from -drive

2017-11-20 Thread Peter Krempa
Historically we've formatted a lot of the attributes of a disk (disk geometry, etc) with -drive. Since we use -device now, they should be formatted there. Extract them to a separate function for keeping compatibility with SDcards which still use only -drive. Start this by moving the geometry into

[libvirt] [PATCH 11/12] qemu: command: Move formatting of 'boot' attribute to -device

2017-11-20 Thread Peter Krempa
bootable flag is a property of the frontend thus should be formatted with -device. Note: The combination of capability flags basically mandates qemu 0.12.3 - 1.0.0, which I did not test. --- src/qemu/qemu_command.c | 21 +++-- .../qemuxml2argvdata/qemux

[libvirt] [PATCH 05/12] qemu: command: Move disk 'serial' into frontend parameter formatter

2017-11-20 Thread Peter Krempa
Disk serial is not a property of the image but of the disk frontend. Account for this appropriately. --- src/qemu/qemu_command.c | 17 + .../qemuxml2argv-disk-drive-shared.args | 5 +++-- tests/qemuxml2argvdata/qemuxml2argv-disk-ide-

[libvirt] [PATCH 03/12] tests: qemuxml2xml: Run the 'disk-serial' test

2017-11-20 Thread Peter Krempa
--- .../qemuxml2xmlout-disk-serial.xml | 42 ++ tests/qemuxml2xmltest.c| 2 ++ 2 files changed, 44 insertions(+) create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-serial.xml diff --git a/tests/qemuxml2xmloutdata/qemux

[libvirt] [PATCH 04/12] tests: qemuxml2argv: Test SD card with serial number

2017-11-20 Thread Peter Krempa
--- tests/qemuxml2argvdata/qemuxml2argv-disk-serial.args| 1 + tests/qemuxml2argvdata/qemuxml2argv-disk-serial.xml | 5 + tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-serial.xml | 5 + 3 files changed, 11 insertions(+) diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-serial.a

[libvirt] [PATCH 07/12] qemu: command: Refactor logic when formatting -drive

2017-11-20 Thread Peter Krempa
Move code from 3 conditional blocks into one. --- src/qemu/qemu_command.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 455cb7ae36..df3c14d627 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_comma

[libvirt] [PATCH 00/12] qemu: command: Move frontend disk attributes to -device (blockdev-add saga)

2017-11-20 Thread Peter Krempa
For legacy reasons we've formatted some attributes of the disk frontend in -drive which now mostly holds backend arguments. (-drive was used by itself some time ago and still is for sdcards) Since we will no longer use -drive with -blockdev, some of them need to be moved (and the rest interpreted

Re: [libvirt] Redesigning Libvirt: Adopting use of a safe language

2017-11-20 Thread Daniel P. Berrange
On Mon, Nov 20, 2017 at 05:36:24PM +0100, Martin Kletzander wrote: > On Mon, Nov 20, 2017 at 03:25:33PM +, Daniel P. Berrange wrote: > > > > I shouldn't have used the word "allocation" in my paragraph above. As > > you say, both languages have similar needs around allocation. The difference >

Re: [libvirt] [PATCH 2/3] tools: Set CFLAGS for wireshark properly

2017-11-20 Thread Erik Skultety
On Thu, Nov 16, 2017 at 02:49:28PM +0100, Michal Privoznik wrote: > We want to set CFLAGS not CPPFLAGS. > > Signed-off-by: Michal Privoznik > --- > tools/Makefile.am | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/Makefile.am b/tools/Makefile.am > index 7513a73ac..a

Re: [libvirt] Redesigning Libvirt: Adopting use of a safe language

2017-11-20 Thread Martin Kletzander
On Mon, Nov 20, 2017 at 03:25:33PM +, Daniel P. Berrange wrote: On Mon, Nov 20, 2017 at 12:24:22AM +0100, Martin Kletzander wrote: On Tue, Nov 14, 2017 at 05:27:01PM +, Daniel P. Berrange wrote: [...] > I don't have direct experiance in Rust, but it has the same kind of benefits over

Re: [libvirt] [PATCH 3/3] tools: Enable warnings for more binaries/libs

2017-11-20 Thread Erik Skultety
On Thu, Nov 16, 2017 at 02:49:29PM +0100, Michal Privoznik wrote: > Because WARN_CFLAGS and COVERAGE_CFLAGS are not set globally, we > rely on each binary built to include WARN_CFLAGS/COVERAGE_CFLAGS. > But it is easy to forget those - e.g. libvirt_shell.la. However, > don't enable WARN_FLAGS (i.e.

Re: [libvirt] [jenkins-ci PATCH 3/5] jobs: Rename {check_env} to {env}

2017-11-20 Thread Andrea Bolognani
On Mon, 2017-11-20 at 14:29 +0100, Pavel Hrdina wrote: > On Fri, Nov 17, 2017 at 07:26:10PM +0100, Andrea Bolognani wrote: > > There's no reason to have an environment which is tied, at least > > in name, to *-check-job only: having a local environment is > > something that can be useful for any ki

Re: [libvirt] Redesigning Libvirt: Better supporting non-hypervisor agnostic concepts

2017-11-20 Thread Daniel P. Berrange
On Sun, Nov 19, 2017 at 10:21:32PM +0100, Martin Kletzander wrote: > On Wed, Nov 15, 2017 at 06:19:38PM +, Daniel P. Berrange wrote: > > On Wed, Nov 15, 2017 at 05:57:45PM +, Richard W.M. Jones wrote: > > > On Tue, Nov 14, 2017 at 05:25:03PM +, Daniel P. Berrange wrote: > > > > I would

Re: [libvirt] Redesigning Libvirt: Adopting use of a safe language

2017-11-20 Thread Daniel P. Berrange
On Mon, Nov 20, 2017 at 12:24:22AM +0100, Martin Kletzander wrote: > On Tue, Nov 14, 2017 at 05:27:01PM +, Daniel P. Berrange wrote: > > [...] > > > I don't have direct experiance in Rust, but it has the same kind of > > benefits over > > C as Go does, again without the downsides of language

Re: [libvirt] [PATCH 07/14] conf: Add VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SPAPR

2017-11-20 Thread Andrea Bolognani
On Fri, 2017-11-17 at 11:34 +0100, Marc Hartmayer wrote: > On Wed, Nov 15, 2017 at 12:50 PM +0100, Andrea Bolognani > wrote: > > +for (i = 0; i < def->nserials; i++) { > > +virDomainChrDefPtr serial = def->serials[i]; > > + > > +/* Historically, the native console

Re: [libvirt] [jenkins-ci PATCH 0/3] Add Fedora 27, remove Fedora 25

2017-11-20 Thread Andrea Bolognani
On Mon, 2017-11-20 at 14:40 +0100, Pavel Hrdina wrote: > On Thu, Nov 16, 2017 at 06:40:50PM +0100, Andrea Bolognani wrote: > > 'tis the season. > > > > Andrea Bolognani (3): > > Add Fedora 27 builder > > Remove Fedora 25 builder > > guests: Adjust Fedora 26 install URL > > If you are OK wit

Re: [libvirt] [jenkins-ci PATCH 0/3] Add Fedora 27, remove Fedora 25

2017-11-20 Thread Pavel Hrdina
On Thu, Nov 16, 2017 at 06:40:50PM +0100, Andrea Bolognani wrote: > 'tis the season. > > Andrea Bolognani (3): > Add Fedora 27 builder > Remove Fedora 25 builder > guests: Adjust Fedora 26 install URL If you are OK with it I can push it with the secret for Fedora 27 updated. Reviewed-by: P

Re: [libvirt] [jenkins-ci PATCH 1/3] Add Fedora 27 builder

2017-11-20 Thread Pavel Hrdina
On Thu, Nov 16, 2017 at 06:40:51PM +0100, Andrea Bolognani wrote: > Fedora 27 has been released, so we can create a dedicated guest and > start running CI jobs on it. > > Signed-off-by: Andrea Bolognani > --- > The changes in the vault are based on the assumption that the new > libvirt-fedora-27

Re: [libvirt] [jenkins-ci PATCH 0/5] Fix environment handling

2017-11-20 Thread Pavel Hrdina
On Fri, Nov 17, 2017 at 07:26:07PM +0100, Andrea Bolognani wrote: > My own attempt at fixing libosinfo-master-rpm's failing status, > and then some. > > This is an extension of Pavel's attempt[1] in a way; except of > course I think my approach is superior, otherwise I wouldn't have > bothered ;)

Re: [libvirt] [jenkins-ci PATCH 3/5] jobs: Rename {check_env} to {env}

2017-11-20 Thread Pavel Hrdina
On Fri, Nov 17, 2017 at 07:26:10PM +0100, Andrea Bolognani wrote: > There's no reason to have an environment which is tied, at least > in name, to *-check-job only: having a local environment is > something that can be useful for any kind of job, so it's better > to use a neutral name. My proposal

[libvirt] [PATCH] qemu: cpu: fix fullCPU to include all emulatable qemu features

2017-11-20 Thread Nikolay Shirokovskiy
On Core i5 650 guest fail to start with error [1] if guest cpu config is taken from domcapabilities and check is set to partial. The problem is in qemu caps fullCPU calculation in virQEMUCapsInitHostCPUModel. It is supposed to include features emulated by qemu and missed on host. Some of such feat

Re: [libvirt] [PATCH 2/2] tests: fix typo

2017-11-20 Thread Michal Privoznik
On 11/17/2017 02:25 PM, Daniel P. Berrange wrote: > On Fri, Nov 17, 2017 at 04:17:38PM +0300, Nikolay Shirokovskiy wrote: >> --- >> tests/commanddata/test10.log | 3 ++- >> tests/commanddata/test11.log | 3 ++- >> tests/commanddata/test12.log | 3 ++- >> tests/commanddata/test13.log | 3 ++- >> te

Re: [libvirt] [PATCH 6/6] qemu: Allow showing the dump progress for memory only dump

2017-11-20 Thread John Ferlan
On 11/20/2017 03:53 AM, Jiri Denemark wrote: > On Fri, Nov 17, 2017 at 18:17:31 -0500, John Ferlan wrote: >> https://bugzilla.redhat.com/show_bug.cgi?id=916061 >> >> If the QEMU version running is new enough (based on QEMU_CAPS_QUERY_DUMP) >> we can add a 'detach' boolean to the dump-guest-memory

Re: [libvirt] [PATCH 6/6] qemu: Allow showing the dump progress for memory only dump

2017-11-20 Thread Jiri Denemark
On Fri, Nov 17, 2017 at 18:17:31 -0500, John Ferlan wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=916061 > > If the QEMU version running is new enough (based on QEMU_CAPS_QUERY_DUMP) > we can add a 'detach' boolean to the dump-guest-memory command in order > to tell QEMU to run in a thread.

Re: [libvirt] [PATCH] docs: don't use https in XML namespace URIs

2017-11-20 Thread Jiri Denemark
On Thu, Nov 16, 2017 at 17:18:57 +, Daniel P. Berrange wrote: > The XML namespace URI for the QEMU/LXC drivers must use http as the protocol > otherwise it won't match the parser's expectations. > > Signed-off-by: Daniel P. Berrange > --- > docs/drvlxc.html.in | 2 +- > docs/drvqemu.html.in