Re: [libvirt] [PATCH] dist: ln(1) is not guaranteed to have a '-f' option

2016-05-03 Thread Roman Bogorodskiy
Andrea Bolognani wrote: > According to the autoconf manual, using '$(LN_S) -f' is not > portable; remove the target explicitly beforehand to work around > this limitation. > > Adjust some slightly awkward indentation while at it. > --- > src/Makefile.am | 3 ++- > tools/Makefile.am | 3 ++-

[libvirt] [PATCH] qemu: add default pci-root device to mips*/malta guests

2016-05-03 Thread Aurelien Jarno
The MIPS Malta board has a root PCI controller. It is not sent during migration, so it needs to be added by default. Signed-off-by: Aurelien Jarno --- src/qemu/qemu_domain.c | 15 ++- src/qemu/qemu_domain.h | 1 + 2 files changed, 15 insertions(+), 1

Re: [libvirt] [PATCH v2 0/3] Add support for virtio-scsi-{pci, ccw} iothread support

2016-05-03 Thread Cole Robinson
On 05/03/2016 02:42 PM, John Ferlan wrote: > v1 here: > http://www.redhat.com/archives/libvir-list/2016-May/msg00077.html > (patches 1-4 were pushed already, the following are patches 5-7) > > Changes: > > Patch 1: > - Clean up docs, use 1.3.5 as the version instead of 1.3.4. > - Use post

[libvirt] [PATCH v2 0/3] Add support for virtio-scsi-{pci, ccw} iothread support

2016-05-03 Thread John Ferlan
v1 here: http://www.redhat.com/archives/libvir-list/2016-May/msg00077.html (patches 1-4 were pushed already, the following are patches 5-7) Changes: Patch 1: - Clean up docs, use 1.3.5 as the version instead of 1.3.4. - Use post parse callback virDomainDeviceDefPostParseInternal to

[libvirt] [PATCH v2 3/3] qemu: Add 'iothread' to command line for supported controller

2016-05-03 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1286709 Now that we have all the pieces in place, we can add the 'iothread=#' to the command line for the (two) controllers that support it (virtio-scsi-pci and virtio-scsi-ccw). Add the tests as well... Signed-off-by: John Ferlan

[libvirt] [PATCH v2 1/3] conf: Add support for virtio-scsi iothreads

2016-05-03 Thread John Ferlan
Add the ability to add an 'iothread' to the controller which will be how virtio-scsi-pci and virtio-scsi-ccw iothreads have been implemented in qemu. Describe the new functionality and add tests to parse/validate that the new attribute can be added. Signed-off-by: John Ferlan

[libvirt] [PATCH v2 2/3] qemu: Use switch for qemuCheckIOThreads

2016-05-03 Thread John Ferlan
Rather than an if statement, use a switch. The switch will also catch the illegal usage of 'iothread' with some other kind of unsupported bus configuration. Signed-off-by: John Ferlan --- src/qemu/qemu_command.c | 29 +++-- 1 file changed, 23

Re: [libvirt] [PATCH REPOST 5/7] conf: Add support for virtio-scsi iothreads

2016-05-03 Thread John Ferlan
[...] +if (iothread) { +if (def->model != VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI) { +virReportError(VIR_ERR_XML_ERROR, + _("'iothread' attribute only supported for " + "controller model

Re: [libvirt] [PATCH] Allow blkdeviotune to take human readable values

2016-05-03 Thread Cole Robinson
On 05/03/2016 01:52 PM, Nishith Shah wrote: > On Tue, May 3, 2016 at 11:17 PM, Cole Robinson > wrote: > > On 05/03/2016 10:09 AM, Nishith Shah wrote: > > Use vshCommandOptScaledInt instead of vshCommandOptULongLong so there is > > no

Re: [libvirt] [PATCH] Allow blkdeviotune to take human readable values

2016-05-03 Thread Nishith Shah
On Tue, May 3, 2016 at 11:17 PM, Cole Robinson wrote: > On 05/03/2016 10:09 AM, Nishith Shah wrote: > > Use vshCommandOptScaledInt instead of vshCommandOptULongLong so there is > > no need to pass values in raw bytes, which is seldom the case. > > Also, on v2, you can add

Re: [libvirt] [PATCH] Allow blkdeviotune to take human readable values

2016-05-03 Thread Cole Robinson
On 05/03/2016 10:09 AM, Nishith Shah wrote: > Use vshCommandOptScaledInt instead of vshCommandOptULongLong so there is > no need to pass values in raw bytes, which is seldom the case. Also, on v2, you can add this bug link to the commit message: https://bugzilla.redhat.com/show_bug.cgi?id=885380

Re: [libvirt] [PATCH REPOST 5/7] conf: Add support for virtio-scsi iothreads

2016-05-03 Thread Cole Robinson
On 05/03/2016 11:16 AM, John Ferlan wrote: > > > On 05/03/2016 09:50 AM, Cole Robinson wrote: >> On 05/02/2016 06:30 PM, John Ferlan wrote: >>> Add the ability to add an 'iothread' to the controller which will be how >>> virtio-scsi-pci and virtio-scsi-ccw iothreads have been implemented in

Re: [libvirt] [PATCH REPOST 3/7] docs: Reformat the Controllers description

2016-05-03 Thread Cole Robinson
On 05/03/2016 10:50 AM, John Ferlan wrote: > > > On 05/03/2016 09:30 AM, Cole Robinson wrote: >> On 05/02/2016 06:30 PM, John Ferlan wrote: >>> Reformat to use elements to make it a bit easier to read. >>> >>> Signed-off-by: John Ferlan >>> --- >>>

Re: [libvirt] [PATCH REPOST 2/7] docs: clarify disk iothread support

2016-05-03 Thread Cole Robinson
On 05/03/2016 10:50 AM, John Ferlan wrote: > > > On 05/03/2016 09:25 AM, Cole Robinson wrote: >> On 05/02/2016 06:30 PM, John Ferlan wrote: >>> Signed-off-by: John Ferlan >>> --- >>> docs/formatdomain.html.in | 5 +++-- >>> 1 file changed, 3 insertions(+), 2 deletions(-)

Re: [libvirt] [PATCH] virsh: volume: Add --bytes to 'vol-info'

2016-05-03 Thread John Ferlan
On 05/03/2016 11:25 AM, Peter Krempa wrote: > --- > tools/virsh-volume.c | 23 +++ > tools/virsh.pod | 4 +++- > 2 files changed, 22 insertions(+), 5 deletions(-) > ACK John -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH 1/7] admin: Introduce virAdmServerLookupClient

2016-05-03 Thread Ján Tomko
On Fri, Apr 29, 2016 at 03:45:53PM +0200, Erik Skultety wrote: > Just like with server-related APIs, before any of client-based APIs can be > called, a reference to a client-side client object needs to be obtained. For > this purpose, a lookup method should exist. Apart from the client retrieval >

[libvirt] [PATCH] virsh: volume: Add --bytes to 'vol-info'

2016-05-03 Thread Peter Krempa
--- tools/virsh-volume.c | 23 +++ tools/virsh.pod | 4 +++- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/tools/virsh-volume.c b/tools/virsh-volume.c index 9cc8e52..d35fee1 100644 --- a/tools/virsh-volume.c +++ b/tools/virsh-volume.c @@ -992,6 +992,10

Re: [libvirt] [PATCH REPOST 6/7] qemu: Use switch for qemuCheckIOThreads

2016-05-03 Thread John Ferlan
On 05/03/2016 09:42 AM, Cole Robinson wrote: > On 05/02/2016 06:30 PM, John Ferlan wrote: >> Rather than an if statement, use a switch (we're about to add more support) >> > > Are you? I don't see anything touching this function in patch #7 > Hmmm.. wrote this commit message before I realized

Re: [libvirt] [PATCH REPOST 5/7] conf: Add support for virtio-scsi iothreads

2016-05-03 Thread John Ferlan
On 05/03/2016 09:50 AM, Cole Robinson wrote: > On 05/02/2016 06:30 PM, John Ferlan wrote: >> Add the ability to add an 'iothread' to the controller which will be how >> virtio-scsi-pci and virtio-scsi-ccw iothreads have been implemented in qemu. >> >> Describe the new functionality and add tests

[libvirt] [PATCH] admin: Add a check to reject negative argument for number of typed params

2016-05-03 Thread Erik Skultety
Since nparams can be technically negative, it is a good practice throughout our code to check if nparams actually has a non-negative value. The same effect would be achieved by converting our internal typed params serializer argument to 'unsigned' type, but it definitely would not be the path of

Re: [libvirt] [PATCH] Allow blkdeviotune to take human readable values

2016-05-03 Thread Ján Tomko
On Tue, May 03, 2016 at 08:18:41PM +0530, Nishith Shah wrote: > On Tue, May 3, 2016 at 8:00 PM, Peter Krempa wrote: > > > On Tue, May 03, 2016 at 14:09:42 +, Nishith Shah wrote: > > > Use vshCommandOptScaledInt instead of vshCommandOptULongLong so there is > > > no need

Re: [libvirt] [PATCH REPOST 3/7] docs: Reformat the Controllers description

2016-05-03 Thread John Ferlan
On 05/03/2016 09:30 AM, Cole Robinson wrote: > On 05/02/2016 06:30 PM, John Ferlan wrote: >> Reformat to use elements to make it a bit easier to read. >> >> Signed-off-by: John Ferlan >> --- >> docs/formatdomain.html.in | 49 >>

Re: [libvirt] [PATCH REPOST 2/7] docs: clarify disk iothread support

2016-05-03 Thread John Ferlan
On 05/03/2016 09:25 AM, Cole Robinson wrote: > On 05/02/2016 06:30 PM, John Ferlan wrote: >> Signed-off-by: John Ferlan >> --- >> docs/formatdomain.html.in | 5 +++-- >> 1 file changed, 3 insertions(+), 2 deletions(-) >> >> diff --git a/docs/formatdomain.html.in

Re: [libvirt] [PATCH] Allow blkdeviotune to take human readable values

2016-05-03 Thread Nishith Shah
On Tue, May 3, 2016 at 8:00 PM, Peter Krempa wrote: > On Tue, May 03, 2016 at 14:09:42 +, Nishith Shah wrote: > > Use vshCommandOptScaledInt instead of vshCommandOptULongLong so there is > > no need to pass values in raw bytes, which is seldom the case. > > A change like

Re: [libvirt] [PATCH] Allow blkdeviotune to take human readable values

2016-05-03 Thread Peter Krempa
On Tue, May 03, 2016 at 14:09:42 +, Nishith Shah wrote: > Use vshCommandOptScaledInt instead of vshCommandOptULongLong so there is > no need to pass values in raw bytes, which is seldom the case. A change like this is incomplete without adding documentation to the virsh man page

Re: [libvirt] [PATCH 0/4] configure: Fix init script choice

2016-05-03 Thread Andrea Bolognani
On Tue, 2016-05-03 at 16:04 +0200, Ján Tomko wrote: > On Tue, May 03, 2016 at 11:35:35AM +0200, Andrea Bolognani wrote: > > > > The changes pushed yesterday have introduced an issue where > > systemd was turned into systemd+redhat on RHEL systems, > > which in turn caused RPM building to fail[1].

[libvirt] [PATCH] Allow blkdeviotune to take human readable values

2016-05-03 Thread Nishith Shah
Use vshCommandOptScaledInt instead of vshCommandOptULongLong so there is no need to pass values in raw bytes, which is seldom the case. --- tools/virsh-domain.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tools/virsh-domain.c

Re: [libvirt] [PATCH v2 3/3] qemu: Generate channel target paths on hotplug as well

2016-05-03 Thread Pavel Hrdina
On Thu, Apr 28, 2016 at 04:43:42PM +0200, Martin Kletzander wrote: > Since commit 714080791778e3dfbd484ccb3953bffd820b8ba9, qemu agent > channel cannot be plugged in because we won't generate its path > automatically. Let's not only fix that, but also add tests for it so > next time it's checked

Re: [libvirt] [PATCH 0/4] configure: Fix init script choice

2016-05-03 Thread Ján Tomko
On Tue, May 03, 2016 at 11:35:35AM +0200, Andrea Bolognani wrote: > The changes pushed yesterday have introduced an issue where > systemd was turned into systemd+redhat on RHEL systems, > which in turn caused RPM building to fail[1]. > > Patch 1/4 is the actual fix; patch 2/4 changes the code so

[libvirt] [PATCH] maint: Ignore all .init, .service and .socket files

2016-05-03 Thread Andrea Bolognani
All files with those extensions are generated, so we can have three generic rules instead of explicitly ignoring every single instance. --- Pushed as trivial. .gitignore | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index

Re: [libvirt] [PATCH 0/7] Admin API: Add support for client identity info retrieval

2016-05-03 Thread Erik Skultety
> ACK series > > Michal > I adjusted patches 4/7, 5/7, 7/7 and pushed, thanks. Erik -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH REPOST 5/7] conf: Add support for virtio-scsi iothreads

2016-05-03 Thread Cole Robinson
On 05/02/2016 06:30 PM, John Ferlan wrote: > Add the ability to add an 'iothread' to the controller which will be how > virtio-scsi-pci and virtio-scsi-ccw iothreads have been implemented in qemu. > > Describe the new functionality and add tests to parse/validate that the > new attribute can be

Re: [libvirt] [PATCH REPOST 6/7] qemu: Use switch for qemuCheckIOThreads

2016-05-03 Thread Cole Robinson
On 05/02/2016 06:30 PM, John Ferlan wrote: > Rather than an if statement, use a switch (we're about to add more support) > Are you? I don't see anything touching this function in patch #7 > Signed-off-by: John Ferlan > --- > src/qemu/qemu_command.c | 29

Re: [libvirt] [PATCH REPOST 2/7] docs: clarify disk iothread support

2016-05-03 Thread Cole Robinson
On 05/02/2016 06:30 PM, John Ferlan wrote: > Signed-off-by: John Ferlan > --- > docs/formatdomain.html.in | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in > index bead624..735546e 100644 > ---

Re: [libvirt] [PATCH v2 2/3] qemu: Move channel path generation out of command creation

2016-05-03 Thread Pavel Hrdina
On Thu, Apr 28, 2016 at 04:43:41PM +0200, Martin Kletzander wrote: > Put it into separate function called qemuDomainPrepareChannel() and call > it from the new qemuProcessPrepareDomain(). > > Signed-off-by: Martin Kletzander > --- ACK -- libvir-list mailing list

Re: [libvirt] [PATCH REPOST 4/7] conf: Move virDomainControllerModelTypeToString

2016-05-03 Thread Cole Robinson
On 05/02/2016 06:30 PM, John Ferlan wrote: > Move virDomainControllerModelTypeToString closer to it's counterpart > virDomainControllerModelTypeFromString. > > Signed-off-by: John Ferlan > --- > src/conf/domain_conf.c | 29 - > 1 file changed, 16

Re: [libvirt] [PATCH] gitignore: ignore virt(log|lock)d.(service|socket)

2016-05-03 Thread Andrea Bolognani
On Tue, 2016-05-03 at 09:20 -0400, Cole Robinson wrote: > On 05/03/2016 09:17 AM, Andrea Bolognani wrote: > > On Tue, 2016-05-03 at 09:01 -0400, Cole Robinson wrote: > > > > > > --- > > > Pushed as trivial > > > > > >  .gitignore | 4 > > >  1 file changed, 4 insertions(+) > > > > > > diff

Re: [libvirt] [PATCH REPOST 3/7] docs: Reformat the Controllers description

2016-05-03 Thread Cole Robinson
On 05/02/2016 06:30 PM, John Ferlan wrote: > Reformat to use elements to make it a bit easier to read. > > Signed-off-by: John Ferlan > --- > docs/formatdomain.html.in | 49 > --- > 1 file changed, 29 insertions(+), 20

Re: [libvirt] [PATCH] gitignore: ignore virt(log|lock)d.(service|socket)

2016-05-03 Thread Cole Robinson
On 05/03/2016 09:17 AM, Andrea Bolognani wrote: > On Tue, 2016-05-03 at 09:01 -0400, Cole Robinson wrote: >> --- >> Pushed as trivial >> >> .gitignore | 4 >> 1 file changed, 4 insertions(+) >> >> diff --git a/.gitignore b/.gitignore >> index 6021403..a0de097 100644 >> --- a/.gitignore >>

Re: [libvirt] [PATCH 0/3] libxl: support Xen migration stream V2

2016-05-03 Thread Wei Liu
On Mon, May 02, 2016 at 07:01:16PM -0600, Jim Fehlig wrote: > Hi all, > > This patch adds support for Xen migration stream V2 to the libvirt > libxl driver. In the process it fixes save/restore and migration > tests in OSSTest, which have been failing since libvirt commit > e7440656. > > Patch1

Re: [libvirt] [PATCH 1/3] libxl: switch to using libxl_domain_create_restore from v4.4 API

2016-05-03 Thread Wei Liu
On Mon, May 02, 2016 at 07:01:17PM -0600, Jim Fehlig wrote: > In LIBXL_API_VERSION 0x040400, the libxl_domain_create_restore API > gained a parameter for specifying restore parameters. Switch to > using version 0x040400, which will be useful in a subsequent commit > to specify the Xen migration

Re: [libvirt] [PATCH] gitignore: ignore virt(log|lock)d.(service|socket)

2016-05-03 Thread Andrea Bolognani
On Tue, 2016-05-03 at 09:01 -0400, Cole Robinson wrote: > --- > Pushed as trivial > >  .gitignore | 4 >  1 file changed, 4 insertions(+) > > diff --git a/.gitignore b/.gitignore > index 6021403..a0de097 100644 > --- a/.gitignore > +++ b/.gitignore > @@ -156,8 +156,12 @@ >  

[libvirt] [PATCH] maint: Don't ignore libvirtd.pod any longer

2016-05-03 Thread Andrea Bolognani
Starting from commit 5b479f3b5b82, libvirtd.pod is a source file rather than a generated file. Update ignore patterns accordingly. --- Pushed as trivial. .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index a0de097..bf9109f 100644 --- a/.gitignore +++

Re: [libvirt] [PATCH REPOST 1/7] qemu: Add capability for virtio-scsi iothreads

2016-05-03 Thread Cole Robinson
On 05/02/2016 06:30 PM, John Ferlan wrote: > An iothread for virtio-scsi is a property of the controller. Add a lookup > of the 'virtio-scsi-pci' and 'virtio-scsi-ccw' device properties and parse > the output. For both, support for the iothread was added in qemu 2.4 > while support for

Re: [libvirt] [PATCH v3 0/2] daemon: add option to read host uuid from /etc/machine-id

2016-05-03 Thread Cole Robinson
On 05/03/2016 05:12 AM, Nikolay Shirokovskiy wrote: > difference from version 2: > > * cleanup syms file > * split patch into two > * update libvirtd.conf augeas lens and tests > > Nikolay Shirokovskiy (2): > util: factor out reading file into preallocated buffer > daemon: add option to read

[libvirt] [PATCH] gitignore: ignore virt(log|lock)d.(service|socket)

2016-05-03 Thread Cole Robinson
--- Pushed as trivial .gitignore | 4 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 6021403..a0de097 100644 --- a/.gitignore +++ b/.gitignore @@ -156,8 +156,12 @@ /src/virt-aa-helper /src/virtlockd /src/virtlockd.init +/src/virtlockd.service

Re: [libvirt] [PATCH 3/3] qemu: support configuring usb3 controller port count

2016-05-03 Thread Cole Robinson
On 05/02/2016 07:49 PM, John Ferlan wrote: > > > On 04/27/2016 02:29 PM, Cole Robinson wrote: >> This adds a ports= attribute to usb controller XML, like >> >> >> >> This maps to: >> >> qemu -device nec-usb-xhci,p2=8,p3=8 >> >> Meaning, 8 ports that support both usb2 and usb3 devices. Gerd

Re: [libvirt] [PATCH] ppc64: get the maxvcpus from the qemu caps instead of /dev/kvm

2016-05-03 Thread Cole Robinson
On 05/03/2016 02:39 AM, Shivaprasad bhat wrote: > Thanks for the reply Cole. > > On Tue, May 3, 2016 at 3:27 AM, Cole Robinson > wrote: > > On 05/02/2016 09:14 AM, Shivaprasad G Bhat wrote: > > On PPC64, the KVM_MAX_VCPUS is defined to

Re: [libvirt] [PATCH 6/7] Introduce qemuDomainMachineIsVirt

2016-05-03 Thread Andrea Bolognani
On Tue, 2016-05-03 at 13:19 +0200, Andrea Bolognani wrote: > On Tue, 2016-05-03 at 13:05 +0200, Peter Krempa wrote: > > > > > > +bool > > > +qemuDomainMachineIsVirt(const virDomainDef *def) > > > +{ > > > +return STREQ(def->os.machine, "virt") || > > > +   STRPREFIX(def->os.machine,

Re: [libvirt] [PATCH 0/3] libxl: support Xen migration stream V2

2016-05-03 Thread Andrew Cooper
On 03/05/16 02:01, Jim Fehlig wrote: > Hi all, > > This patch adds support for Xen migration stream V2 to the libvirt > libxl driver. In the process it fixes save/restore and migration > tests in OSSTest, which have been failing since libvirt commit > e7440656. > > Patch1 changes the libxl API

Re: [libvirt] [PATCH] qemu: hotplug: Report error if we hit tray status timeout

2016-05-03 Thread Cole Robinson
On 05/03/2016 08:23 AM, Cole Robinson wrote: > On 05/03/2016 02:24 AM, Peter Krempa wrote: >> On Mon, May 02, 2016 at 19:09:35 -0400, Cole Robinson wrote: >>> If we exceed the timeout waiting for the tray status to change, >>> we don't report an error. Fix it >>> --- >>> I hit this trying to eject

Re: [libvirt] [PATCH] qemu: hotplug: Report error if we hit tray status timeout

2016-05-03 Thread Cole Robinson
On 05/03/2016 02:24 AM, Peter Krempa wrote: > On Mon, May 02, 2016 at 19:09:35 -0400, Cole Robinson wrote: >> If we exceed the timeout waiting for the tray status to change, >> we don't report an error. Fix it >> --- >> I hit this trying to eject floppy media for a win10 VM with F24 >> qemu, but I

Re: [libvirt] [PATCH 3/3] qemu_monitor_json: Follow our coding style

2016-05-03 Thread Peter Krempa
On Tue, May 03, 2016 at 11:53:21 +0200, Michal Privoznik wrote: > In majority of our functions we have this variable @ret that is > overwritten a lot. In other areas of the code we use 'goto > cleanup;' just so that this wouldn't happen. But here. > > Signed-off-by: Michal Privoznik

Re: [libvirt] [PATCH 6/7] Introduce qemuDomainMachineIsVirt

2016-05-03 Thread Andrea Bolognani
On Tue, 2016-05-03 at 13:05 +0200, Peter Krempa wrote: > > +bool > > +qemuDomainMachineIsVirt(const virDomainDef *def) > > +{ > > +return STREQ(def->os.machine, "virt") || > > +   STRPREFIX(def->os.machine, "virt-"); > > This could be transcribed as: > strcmp(def->os.machine, "virt")

Re: [libvirt] [PATCH 2/3] qemu_monitor_json: Drop redundant checks

2016-05-03 Thread Peter Krempa
On Tue, May 03, 2016 at 11:53:20 +0200, Michal Privoznik wrote: > In these functions I'm fixing here, we do call > qemuMonitorJSONCheckError() followed by another check if qemu > reply contains 'return' object. If it wouldn't, the former > CheckError() function would error out and the flow would

Re: [libvirt] [PATCH 1/3] qemuMonitorJSONQueryRxFilter: Validate qemu reply prior parsing it

2016-05-03 Thread Peter Krempa
On Tue, May 03, 2016 at 11:53:19 +0200, Michal Privoznik wrote: > Usually, the flow in this area of the code is as follows: > > qemuMonitorJSONMakeCommand() > qemuMonitorJSONCommand() > qemuMonitorJSONCheckError() > parseReply() > > But in this function, for some reasons, the last two steps were

Re: [libvirt] [PATCH 7/7] Remove useless os.machine NULL check

2016-05-03 Thread Peter Krempa
On Tue, May 03, 2016 at 12:47:27 +0200, Ján Tomko wrote: > In qemuDomainDefAddDefaultDevices we check for a non-NULL > def->os.machine for x86 archs, but not the others. > > Moreover, the only caller - qemuDomainDefPostParse > already checks for it and even then it can happen only > if

Re: [libvirt] [PATCH 6/7] Introduce qemuDomainMachineIsVirt

2016-05-03 Thread Peter Krempa
On Tue, May 03, 2016 at 12:47:26 +0200, Ján Tomko wrote: > Use it everywhere except for virQEMUCapsFillDomainFeatureGICCaps. > --- > src/qemu/qemu_capabilities.c | 3 +-- > src/qemu/qemu_command.c| 3 +-- > src/qemu/qemu_domain.c | 18 +++--- >

Re: [libvirt] [PATCH 5/7] Rewrite the condition in qemuDomainAssignARMVirtioMMIOAddresses

2016-05-03 Thread Peter Krempa
On Tue, May 03, 2016 at 12:47:25 +0200, Ján Tomko wrote: > It was not indented correctly. > --- > src/qemu/qemu_domain_address.c | 16 ++-- > 1 file changed, 10 insertions(+), 6 deletions(-) Also it was really hard to parse. ACK signature.asc Description: Digital signature --

Re: [libvirt] [PATCH 3/7] Return void in qemuDomainAssignARMVirtioMMIOAddresses

2016-05-03 Thread Peter Krempa
On Tue, May 03, 2016 at 12:47:23 +0200, Ján Tomko wrote: > This function does not fail and it does not need to return anything. > --- > src/qemu/qemu_domain_address.c | 7 ++- > 1 file changed, 2 insertions(+), 5 deletions(-) ACK signature.asc Description: Digital signature -- libvir-list

Re: [libvirt] [PATCH 2/7] Invert condition in qemuDomainDefAddDefaultDevices

2016-05-03 Thread Peter Krempa
On Tue, May 03, 2016 at 12:47:22 +0200, Ján Tomko wrote: > For all the other machine types, we use a positive condition. > > Be more positive and use it for i440fx too. > --- > src/qemu/qemu_domain.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) ACK signature.asc Description:

Re: [libvirt] [PATCH 4/7] Remove useless variable in qemuDomainAssignAddresses

2016-05-03 Thread Peter Krempa
On Tue, May 03, 2016 at 12:47:24 +0200, Ján Tomko wrote: > We do not need to propagate the exact return values > and the only possible ones are 0 and -1 anyway. > > Remove the temporary variable and use the usual pattern: > > if (f() < 0) > return -1; > --- > src/qemu/qemu_domain_address.c

Re: [libvirt] [PATCH 1/7] Use qemuDomainMachineIs helpers when adding default devices

2016-05-03 Thread Peter Krempa
On Tue, May 03, 2016 at 12:47:21 +0200, Ján Tomko wrote: > Do not duplicate the string comparisons by writing them twice. > --- > src/qemu/qemu_domain.c | 9 ++--- > 1 file changed, 2 insertions(+), 7 deletions(-) ACK signature.asc Description: Digital signature -- libvir-list mailing list

[libvirt] [PATCH 1/7] Use qemuDomainMachineIs helpers when adding default devices

2016-05-03 Thread Ján Tomko
Do not duplicate the string comparisons by writing them twice. --- src/qemu/qemu_domain.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 3f1fbd7..c17abbb 100644 --- a/src/qemu/qemu_domain.c +++

[libvirt] [PATCH 5/7] Rewrite the condition in qemuDomainAssignARMVirtioMMIOAddresses

2016-05-03 Thread Ján Tomko
It was not indented correctly. --- src/qemu/qemu_domain_address.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 25aab39..b3220a5 100644 --- a/src/qemu/qemu_domain_address.c +++

[libvirt] [PATCH 7/7] Remove useless os.machine NULL check

2016-05-03 Thread Ján Tomko
In qemuDomainDefAddDefaultDevices we check for a non-NULL def->os.machine for x86 archs, but not the others. Moreover, the only caller - qemuDomainDefPostParse already checks for it and even then it can happen only if /etc/libvirt contains an XML without a machine type. ---

[libvirt] [PATCH 6/7] Introduce qemuDomainMachineIsVirt

2016-05-03 Thread Ján Tomko
Use it everywhere except for virQEMUCapsFillDomainFeatureGICCaps. --- src/qemu/qemu_capabilities.c | 3 +-- src/qemu/qemu_command.c| 3 +-- src/qemu/qemu_domain.c | 18 +++--- src/qemu/qemu_domain.h | 1 + src/qemu/qemu_domain_address.c | 6 ++ 5

[libvirt] [PATCH 4/7] Remove useless variable in qemuDomainAssignAddresses

2016-05-03 Thread Ján Tomko
We do not need to propagate the exact return values and the only possible ones are 0 and -1 anyway. Remove the temporary variable and use the usual pattern: if (f() < 0) return -1; --- src/qemu/qemu_domain_address.c | 22 ++ 1 file changed, 10 insertions(+), 12

[libvirt] [PATCH 3/7] Return void in qemuDomainAssignARMVirtioMMIOAddresses

2016-05-03 Thread Ján Tomko
This function does not fail and it does not need to return anything. --- src/qemu/qemu_domain_address.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index c651dce..f149ff9 100644 ---

[libvirt] [PATCH 0/7] qemu machine cleanups

2016-05-03 Thread Ján Tomko
Unify detection of machine types and clean up some return value handling. Ján Tomko (7): Use qemuDomainMachineIs helpers when adding default devices Invert condition in qemuDomainDefAddDefaultDevices Return void in qemuDomainAssignARMVirtioMMIOAddresses Remove useless variable in

[libvirt] [PATCH 2/7] Invert condition in qemuDomainDefAddDefaultDevices

2016-05-03 Thread Ján Tomko
For all the other machine types, we use a positive condition. Be more positive and use it for i440fx too. --- src/qemu/qemu_domain.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index c17abbb..9519334 100644 ---

Re: [libvirt] [PATCH 5/7] virnetserverclient: Add an internal method to retrieve client's identity

2016-05-03 Thread Erik Skultety
>> +int >> +virNetServerClientGetInfo(virNetServerClientPtr client, >> + bool *readonly, const char **sock_addr, >> + virIdentityPtr *identity) >> +{ >> +int ret = -1; >> + >> +virObjectLock(client); >> +*readonly = client->readonly; >>

[libvirt] [PATCH 0/3] Couple of qemu monitor refactors

2016-05-03 Thread Michal Privoznik
The first two patches are intended to be merged. The last one is incomplete. Intentionally. It should be viewed as RFC. If upstream likes it, I can finish the work. But so far it's merely just for you guys to express your opinion. Michal Privoznik (3): qemuMonitorJSONQueryRxFilter: Validate

[libvirt] [PATCH 3/3] qemu_monitor_json: Follow our coding style

2016-05-03 Thread Michal Privoznik
In majority of our functions we have this variable @ret that is overwritten a lot. In other areas of the code we use 'goto cleanup;' just so that this wouldn't happen. But here. Signed-off-by: Michal Privoznik --- src/qemu/qemu_monitor_json.c | 295

[libvirt] [PATCH 2/3] qemu_monitor_json: Drop redundant checks

2016-05-03 Thread Michal Privoznik
In these functions I'm fixing here, we do call qemuMonitorJSONCheckError() followed by another check if qemu reply contains 'return' object. If it wouldn't, the former CheckError() function would error out and the flow would not even get to the latter. Signed-off-by: Michal Privoznik

[libvirt] [PATCH 1/3] qemuMonitorJSONQueryRxFilter: Validate qemu reply prior parsing it

2016-05-03 Thread Michal Privoznik
Usually, the flow in this area of the code is as follows: qemuMonitorJSONMakeCommand() qemuMonitorJSONCommand() qemuMonitorJSONCheckError() parseReply() But in this function, for some reasons, the last two steps were swapped. This makes no sense. Signed-off-by: Michal Privoznik

[libvirt] [PATCH 2/4] configure: Remove nested conditionals in LIBVIRT_CHECK_INIT_SCRIPT

2016-05-03 Thread Andrea Bolognani
We don't need them any longer; moreover, the previous structure made it very easy for bugs to slip in, by having the result of one check influence the following one. By placing the check for "$with_init_script" = check front and center, hopefully this won't happen (as easily) again. ---

[libvirt] [PATCH 3/4] spec: Type --with-init-script correctly

2016-05-03 Thread Andrea Bolognani
Mixing dashes and underscores in configure options apparently works fine, but it's confusing and just plain ugly. --- lol autoconf libvirt.spec.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 935ca89..4de78c0 100644 ---

[libvirt] [PATCH 0/4] configure: Fix init script choice

2016-05-03 Thread Andrea Bolognani
The changes pushed yesterday have introduced an issue where systemd was turned into systemd+redhat on RHEL systems, which in turn caused RPM building to fail[1]. Patch 1/4 is the actual fix; patch 2/4 changes the code so that breaking it again is hopefully a bit harder. Patches 3/4 and 4/4 clean

[libvirt] [PATCH 4/4] spec: Rename %{init_scripts} -> %{with_init_script}

2016-05-03 Thread Andrea Bolognani
The convention used throughout the file is to name variables after the configure option they refer to. --- libvirt.spec.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 4de78c0..f441c51 100644 --- a/libvirt.spec.in +++

[libvirt] [PATCH 1/4] configure: Change RHEL default from systemd+redhat to systemd

2016-05-03 Thread Andrea Bolognani
We don't want to install legacy init scripts on modern, systemd-native hosts. --- I was under the impression that systemd+redhat was needed to install /etc/sysconfig/libvirtd, but after taking a better look at the code that turned out not to be the case. m4/virt-init-script.m4 | 3 --- 1 file

[libvirt] [PATCH v3 1/2] util: factor out reading file into preallocated buffer

2016-05-03 Thread Nikolay Shirokovskiy
Signed-off-by: Nikolay Shirokovskiy --- src/libvirt_private.syms | 1 + src/util/virfile.c | 24 src/util/virfile.h | 2 ++ src/util/viruuid.c | 11 ++- 4 files changed, 29 insertions(+), 9 deletions(-) diff --git

[libvirt] [PATCH v3 2/2] daemon: add option to read host uuid from /etc/machine-id

2016-05-03 Thread Nikolay Shirokovskiy
Daemon config parameter switch between reading host uuid either from smbios or machine-id: host_uuid_source = "smbios|machine-id" Signed-off-by: Nikolay Shirokovskiy --- daemon/libvirtd-config.c| 2 ++ daemon/libvirtd-config.h| 1 + daemon/libvirtd.aug

[libvirt] [PATCH v3 0/2] daemon: add option to read host uuid from /etc/machine-id

2016-05-03 Thread Nikolay Shirokovskiy
difference from version 2: * cleanup syms file * split patch into two * update libvirtd.conf augeas lens and tests Nikolay Shirokovskiy (2): util: factor out reading file into preallocated buffer daemon: add option to read host uuid from /etc/machine-id daemon/libvirtd-config.c| 2 ++

Re: [libvirt] [PATCH v2 2/2] qemu: Refresh RTC adjustment on qemuProcessReconnect

2016-05-03 Thread Peter Krempa
On Tue, May 03, 2016 at 10:33:43 +0200, Michal Privoznik wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1139766 > > Thing is, for some reasons you can have your domain's RTC to be > in something different than UTC. More weirdly, it's not only time > zone what you can shift it of, but an

Re: [libvirt] [PATCH v2 1/2] qemu: Introduce qemuMonitorGetRTCTime

2016-05-03 Thread Peter Krempa
On Tue, May 03, 2016 at 10:33:42 +0200, Michal Privoznik wrote: > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_monitor.c | 11 +++ > src/qemu/qemu_monitor.h | 3 +++ > src/qemu/qemu_monitor_json.c | 41 + >

Re: [libvirt] Release of libvirt-1.3.4

2016-05-03 Thread Daniel P. Berrange
On Mon, May 02, 2016 at 09:18:45AM +0200, Jiri Denemark wrote: > On Sun, May 01, 2016 at 09:42:20 +0300, Yuri Chornoivan wrote: > > Just a quick note about translations. It is very discouraging to see the > > release dated with 2016 with translations dated back in 2014. Personally, > > I

Re: [libvirt] [PATCH v2 0/9] admin: Admin API: Introduce client listing API

2016-05-03 Thread Erik Skultety
On 02/05/16 15:59, Michal Privoznik wrote: > On 29.04.2016 14:39, Erik Skultety wrote: >> v2: >> - gendispatch was modified to be able to generate more client related code >> >> - Martin noticed that I added avahi-related field into my tests which caused >> the tests to fail for him, since he

[libvirt] [PATCH v2 1/2] qemu: Introduce qemuMonitorGetRTCTime

2016-05-03 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/qemu/qemu_monitor.c | 11 +++ src/qemu/qemu_monitor.h | 3 +++ src/qemu/qemu_monitor_json.c | 41 + src/qemu/qemu_monitor_json.h | 3 +++ 4 files changed, 58 insertions(+)

[libvirt] [PATCH v2 2/2] qemu: Refresh RTC adjustment on qemuProcessReconnect

2016-05-03 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1139766 Thing is, for some reasons you can have your domain's RTC to be in something different than UTC. More weirdly, it's not only time zone what you can shift it of, but an arbitrary value. So, if domain is configured that way, libvirt will correctly

[libvirt] [PATCH v2 0/2] qemu: Refresh guest's RTC on daemon restart

2016-05-03 Thread Michal Privoznik
v2 of: https://www.redhat.com/archives/libvir-list/2016-April/msg02001.html diff to v1: -Peter's review suggestions worked in Michal Privoznik (2): qemu: Introduce qemuMonitorGetRTCTime qemu: Refresh RTC adjustment on qemuProcessReconnect src/qemu/qemu_monitor.c | 11 +++

Re: [libvirt] [PATCH 00/27] Introduce sparse streams

2016-05-03 Thread Michal Privoznik
On 28.04.2016 12:04, Michal Privoznik wrote: > Notes? > Oh, patches 01-03 have been ACKed already, but are not pushed yet > because of the freeze. But since this feature build on the top of > them, I'm sending them too. Just a notice that I've pushed those patches, so while trying to apply this

Re: [libvirt] [PATCH v2] send default USB controller in xml to destination during migration

2016-05-03 Thread Ján Tomko
On Mon, May 02, 2016 at 02:21:41PM -0400, Laine Stump wrote: > On 05/02/2016 10:41 AM, Ján Tomko wrote: > > On Fri, Apr 29, 2016 at 01:09:26PM -0400, Cole Robinson wrote: > >> On 04/29/2016 10:01 AM, Shivaprasad G Bhat wrote: > >>> The default USB controller is not sent to destination as the older

Re: [libvirt] [PATCH 2/2] qemu: Refresh RTC adjustment on qemuProcessReconnect

2016-05-03 Thread Peter Krempa
On Tue, May 03, 2016 at 09:31:13 +0200, Michal Privoznik wrote: > On 03.05.2016 08:14, Peter Krempa wrote: [...] > > As long as it's guaranteed that any target qemu supported by libvirt > > does support the interrogation you are going to do it's probably fine. > > > > The problem with your

Re: [libvirt] [PATCH 2/2] qemu: Refresh RTC adjustment on qemuProcessReconnect

2016-05-03 Thread Michal Privoznik
On 03.05.2016 08:14, Peter Krempa wrote: > On Mon, May 02, 2016 at 18:35:35 +0200, Michal Privoznik wrote: >> On 02.05.2016 16:36, Peter Krempa wrote: >>> On Fri, Apr 29, 2016 at 18:43:10 +0200, Michal Privoznik wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1139766 > > [...] > >>> Any

Re: [libvirt] [PATCH] qemu: hotplug: Report error if we hit tray status timeout

2016-05-03 Thread Peter Krempa
On Mon, May 02, 2016 at 19:09:35 -0400, Cole Robinson wrote: > If we exceed the timeout waiting for the tray status to change, > we don't report an error. Fix it > --- > I hit this trying to eject floppy media for a win10 VM with F24 > qemu, but I didn't dig deeper to figure out _why_ it's timing

Re: [libvirt] [PATCH 2/2] qemu: Refresh RTC adjustment on qemuProcessReconnect

2016-05-03 Thread Peter Krempa
On Mon, May 02, 2016 at 18:35:35 +0200, Michal Privoznik wrote: > On 02.05.2016 16:36, Peter Krempa wrote: > > On Fri, Apr 29, 2016 at 18:43:10 +0200, Michal Privoznik wrote: > >> https://bugzilla.redhat.com/show_bug.cgi?id=1139766 [...] > > Any failure in qemuProcessReconnect results into

[libvirt] [PATCH 4/4] tools: virt-host-validate: HW virt support on s390

2016-05-03 Thread Bjoern Walk
Extend the detection of hardware virtualization to the s390 platform. Signed-off-by: Bjoern Walk --- tools/virt-host-validate-common.c | 3 ++- tools/virt-host-validate-common.h | 1 + tools/virt-host-validate-qemu.c | 21 +++-- 3 files changed, 22

[libvirt] [PATCH 3/4] tools: virt-host-validate: improve error handling

2016-05-03 Thread Bjoern Walk
When virHostValidateCPUFlag returns NULL, that's more an unexpected error than the sign of missing CPU flags. Let's react to this appropriately. Signed-off-by: Bjoern Walk --- tools/virt-host-validate-qemu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

[libvirt] [PATCH 0/4] virt-host-validate: add s390 support

2016-05-03 Thread Bjoern Walk
This patch series adds support to the s390 platform for the virt-host-validate tool which detects virtualization capabilities of the host. It has been tested on x86 that no regression is introduced. Bjoern Walk (4): tools: virt-host-validate: fix missing translation marker tools:

  1   2   >