[libvirt] Question about LSN-2016-0001

2016-07-29 Thread Jim Fehlig
I've noticed the behavior described by this LSN with libvirt+Xen. Config containing allows any client to connect with no authentication check. I asked about this on the Xen security list and was told that "libxl interprets an empty password in the caller's configuration to mean that passwordless

[libvirt] [PATCH 2/9] tests: qemuxml2argv: Fix usb-too-long-port-path-invalid

2016-07-29 Thread Andrea Bolognani
The test case uses DO_TEST_PARSE_FLAGS_ERROR(), but doesn't pass any parse flag. Use DO_TEST_PARSE_ERROR() instead. --- tests/qemuxml2argvtest.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index f3df06b..751d692

[libvirt] [PATCH 8/9] qemu: domain: Reflect USB controller model in guest XML

2016-07-29 Thread Andrea Bolognani
When the user doesn't specify any model for a USB controller, we use an architecture-dependent default, but we don't reflect it in the guest XML. Pick the default USB controller model when parsing the guest XML instead of when creating the QEMU command line, so that our choice is saved back to

[libvirt] [PATCH 0/9] qemu: Reflect USB controller model in guest XML

2016-07-29 Thread Andrea Bolognani
Patches 1-3 take care of some tiny nits; patches 4-7 clean up the test suite and add some new test cases that cover the code changed by subsequent patches. Patch 8 implements the feature advertised in the subject :) Patch 9 gets rid of some code that's no longer necessary after the changes.

[libvirt] [PATCH 5/9] tests: qemuxml2xml: Pass capabilities to DO_TEST()

2016-07-29 Thread Andrea Bolognani
This will allow us to remove most DO_TEST_FULL() usages. For the time being, just add the extra argument to all DO_TEST() calls. --- tests/qemuxml2xmltest.c | 528 1 file changed, 264 insertions(+), 264 deletions(-) diff --git

[libvirt] [PATCH 1/9] tests: qemuxml2argv: Remove useless GIC flags

2016-07-29 Thread Andrea Bolognani
DO_TEST_FAILURE() doesn't take a GIC version, but the GIC flag was passed anyway. Get rid of all such occurrences. --- tests/qemuxml2argvtest.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index a5d51a8..f3df06b

[libvirt] [PATCH 6/9] tests: qemuxml2xml: Use DO_TEST() for most tests

2016-07-29 Thread Andrea Bolognani
Now that DO_TEST() can be passed capabilities, there is little need to use DO_TEST_FULL() instead of DO_TEST(). --- tests/qemuxml2xmltest.c | 353 ++-- 1 file changed, 158 insertions(+), 195 deletions(-) diff --git a/tests/qemuxml2xmltest.c

Re: [libvirt] [PATCH python 1/2] Python binding for node poll lifecycle events API

2016-07-29 Thread Cole Robinson
On 07/28/2016 08:14 AM, Jovanka Gulicoska wrote: > --- > generator.py | 2 + > libvirt-override-virConnect.py | 45 > libvirt-override.c | 153 > + > sanitytest.py | 3 + > 4 files changed,

[libvirt] [PATCH 4/9] tests: qemuxml2xml: Use WHEN_BOTH for most tests

2016-07-29 Thread Andrea Bolognani
A bunch of cases were only being tested for WHEN_ACTIVE or WHEN_INACTIVE. Use WHEN_BOTH for all except the very few that actually require the existing setup. --- tests/qemuxml2xmltest.c | 96 - 1 file changed, 48 insertions(+), 48 deletions(-) diff

[libvirt] [PATCH 3/9] tests: qemuxml2xml: Fix disk-mirror

2016-07-29 Thread Andrea Bolognani
Instead of testing it twice using WHEN_ACTIVE and WHEN_INACTIVE separately, just use WHEN_BOTH. --- tests/qemuxml2xmltest.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 5f04b8b..2af8245 100644 ---

[libvirt] [PATCH 7/9] tests: qemuxml2xml: Add some USB test cases

2016-07-29 Thread Andrea Bolognani
All these configurations are already covered for qemuxml2argv, but there were no equivalent tests for qemuxml2xml. --- .../qemuxml2xmlout-ppc64-usb-controller-legacy.xml | 31 ++ .../qemuxml2xmlout-ppc64-usb-controller.xml| 31 ++

[libvirt] [PATCH 9/9] qemu: command: Simplify USB controller model selection

2016-07-29 Thread Andrea Bolognani
Since we now pick the default USB controller model when parsing the guest XML, we can get rid of some duplicated code so that the default model selection happens in one place only. Add some comments as well. --- src/qemu/qemu_command.c | 60 - 1

Re: [libvirt] [PATCH 2/2] virpci: support driver_override sysfs interface

2016-07-29 Thread Laine Stump
On 07/11/2016 02:23 PM, Jim Fehlig wrote: Currently, libvirt uses the new_id PCI sysfs interface to bind a PCI stub driver to a PCI device. The new_id interface is known to be buggy and racey, hence a more deterministic interface was introduced in the 3.12 kernel - driver_override. For more

Re: [libvirt] [PATCH] wireshark dissector compile fix

2016-07-29 Thread Benedikt Spranger
Am Fri, 29 Jul 2016 12:27:16 +0100 schrieb "Daniel P. Berrange" : > On Fri, Jul 29, 2016 at 12:43:41PM +0200, Benedikt Spranger wrote: > > Compiling libvirt wireshark dissector on a debian based system > > failed: CC > >

Re: [libvirt] [PATCH v2 8/8] virsh: Introduce nodedev-event command

2016-07-29 Thread Cole Robinson
On 07/28/2016 08:02 AM, Jovanka Gulicoska wrote: > Add nodedev-event support for node device lifecycle events > --- > tools/virsh-nodedev.c | 182 > ++ > tools/virsh.pod | 18 + > 2 files changed, 200 insertions(+) > > diff --git

Re: [libvirt] [PATCH v2 6/8] node_device: Implement event queue in udev

2016-07-29 Thread Cole Robinson
On 07/28/2016 08:02 AM, Jovanka Gulicoska wrote: > --- > src/node_device/node_device_udev.c | 46 > ++ > 1 file changed, 37 insertions(+), 9 deletions(-) > > diff --git a/src/node_device/node_device_udev.c > b/src/node_device/node_device_udev.c > index

Re: [libvirt] [PATCH 2/8] Add virtio revision attribute to memballoon

2016-07-29 Thread Daniel P. Berrange
On Fri, Jul 29, 2016 at 03:37:38PM +0200, Ján Tomko wrote: > > > > > https://bugzilla.redhat.com/show_bug.cgi?id=1227354 > --- > docs/formatdomain.html.in | 9 > docs/schemas/domaincommon.rng | 14 ++ > src/conf/domain_conf.c

Re: [libvirt] [PATCH 8/8] qemu: format options for enforcing virtio revisions

2016-07-29 Thread Daniel P. Berrange
On Fri, Jul 29, 2016 at 03:37:44PM +0200, Ján Tomko wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1227354 > > Translate the optional attribute to > disable-legacy=on/off and disable-modern=on/off options > for the following devices: > > virtio-balloon-pci > virtio-blk-pci >

[libvirt] [PATCH v2] virsh: use virConnectGetDomainCapabilities with maxvcpus

2016-07-29 Thread Shivaprasad G Bhat
virsh maxvcpus --type kvm output is useless on PPC. Also, in commit e6806d79 we documented not rely on virConnectGetMaxVcpus output. Fix the maxvcpus to use virConnectGetDomainCapabilities now to make it useful. The call is made to use the default emulator binary and to check for the host machine

Re: [libvirt] [PATCH] admin: Fix the default uri for session daemon to libvirtd:///session

2016-07-29 Thread Michal Privoznik
On 29.07.2016 14:08, Daniel P. Berrange wrote: > On Fri, Jul 29, 2016 at 02:06:00PM +0200, Erik Skultety wrote: >> Just like we decide on which URI we go with based on EUID for qemu in remote >> driver, do a similar thing for admin except we do not spawn a daemon in this >> case. > > IMHO we

[libvirt] [PATCH 7/8] Add virtio revision to rng devices

2016-07-29 Thread Ján Tomko
/dev/random https://bugzilla.redhat.com/show_bug.cgi?id=1227354 --- docs/formatdomain.html.in | 9 + docs/schemas/domaincommon.rng | 3 +++ src/conf/domain_conf.c | 5 +

[libvirt] [PATCH 5/8] Add virtio revision attribute to filesystems

2016-07-29 Thread Ján Tomko
... https://bugzilla.redhat.com/show_bug.cgi?id=1227354 --- docs/formatdomain.html.in | 10 ++ docs/schemas/domaincommon.rng | 3 +++ src/conf/domain_conf.c | 6 ++

[libvirt] [PATCH 8/8] qemu: format options for enforcing virtio revisions

2016-07-29 Thread Ján Tomko
https://bugzilla.redhat.com/show_bug.cgi?id=1227354 Translate the optional attribute to disable-legacy=on/off and disable-modern=on/off options for the following devices: virtio-balloon-pci virtio-blk-pci virtio-scsi-pci virtio-serial-pci virtio-9p-pci

[libvirt] [PATCH 4/8] Add virtio revision attribute to controllers

2016-07-29 Thread Ján Tomko
https://bugzilla.redhat.com/show_bug.cgi?id=1227354 --- docs/formatdomain.html.in | 8 docs/schemas/domaincommon.rng | 3 +++ src/conf/domain_conf.c | 4

[libvirt] [PATCH 3/8] Add virtio revision attribute to disks

2016-07-29 Thread Ján Tomko
https://bugzilla.redhat.com/show_bug.cgi?id=1227354 --- docs/formatdomain.html.in | 9 + docs/schemas/domaincommon.rng | 3 +++ src/conf/domain_conf.c | 4

[libvirt] [PATCH 6/8] Add virtio revision attribute to intefaces

2016-07-29 Thread Ján Tomko
https://bugzilla.redhat.com/show_bug.cgi?id=1227354 --- docs/formatdomain.html.in | 8 +++- docs/schemas/domaincommon.rng | 3 +++ src/conf/domain_conf.c | 5 +

[libvirt] [PATCH 1/8] Fix indentation

2016-07-29 Thread Ján Tomko
--- src/conf/domain_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index a56e0f5..4999dea 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -8824,7 +8824,7 @@ virDomainActualNetDefParseXML(xmlNodePtr

[libvirt] [PATCH RFC 0/8] qemu: allow disabling certain virtio revisions

2016-07-29 Thread Ján Tomko
For https://bugzilla.redhat.com/show_bug.cgi?id=1227354 some users might want to adjust the QEMU defaults and disable either virtio 0.9 or virtio 1.0 (spelled out as disable-legacy and disable-modern on qemu command line). This series uses a separate element right under the relevant device

[libvirt] [PATCH 2/8] Add virtio revision attribute to memballoon

2016-07-29 Thread Ján Tomko
https://bugzilla.redhat.com/show_bug.cgi?id=1227354 --- docs/formatdomain.html.in | 9 docs/schemas/domaincommon.rng | 14 ++ src/conf/domain_conf.c | 46 +++ src/conf/domain_conf.h

Re: [libvirt] [PATCH] admin: Fix the default uri for session daemon to libvirtd:///session

2016-07-29 Thread Daniel P. Berrange
On Fri, Jul 29, 2016 at 02:06:00PM +0200, Erik Skultety wrote: > Just like we decide on which URI we go with based on EUID for qemu in remote > driver, do a similar thing for admin except we do not spawn a daemon in this > case. IMHO we should auto-spawn the daemon too, so we have consistent

[libvirt] [PATCH] admin: Fix the default uri for session daemon to libvirtd:///session

2016-07-29 Thread Erik Skultety
Just like we decide on which URI we go with based on EUID for qemu in remote driver, do a similar thing for admin except we do not spawn a daemon in this case. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1356858 Signed-off-by: Erik Skultety ---

Re: [libvirt] [PATCH] wireshark dissector compile fix

2016-07-29 Thread Daniel P. Berrange
On Fri, Jul 29, 2016 at 12:43:41PM +0200, Benedikt Spranger wrote: > Compiling libvirt wireshark dissector on a debian based system failed: > CC wireshark/src/wireshark_src_libvirt_la-packet-libvirt.lo > In file included from > ../../libvirt/tools/wireshark/src/packet-libvirt.c:27:0: >

[libvirt] [PATCH] wireshark: glib compile fix

2016-07-29 Thread Benedikt Spranger
libvirt wireshark dissector uses wireshark and glib. Since wireshark development files did not depend on glib add an expicit dependency. Signed-off-by: Benedikt Spranger --- m4/virt-wireshark.m4 | 2 ++ tools/Makefile.am| 4 ++-- 2 files changed, 4 insertions(+), 2

[libvirt] [PATCH] wireshark dissector compile fix

2016-07-29 Thread Benedikt Spranger
Compiling libvirt wireshark dissector on a debian based system failed: CC wireshark/src/wireshark_src_libvirt_la-packet-libvirt.lo In file included from ../../libvirt/tools/wireshark/src/packet-libvirt.c:27:0: /usr/include/wireshark/epan/proto.h:40:18: fatal error: glib.h: No such file

Re: [libvirt] [PATCH 0/5] qemu: report actual vcpu state in virVcpuInfo

2016-07-29 Thread Viktor Mihajlovski
On 29.07.2016 08:30, Peter Krempa wrote: > > So I was testing the data reported from the monitor while doing some > work on othe vCPU hotplug series and found that for x86 the halted state > is reported if the CPU is idle and thus halted. This state it therefore > almost always reported when the

Re: [libvirt] [PATCH 00/13] Move functions from qemu_domain_address.c to domain_addr.c

2016-07-29 Thread Daniel P. Berrange
On Thu, Jul 28, 2016 at 07:00:40PM -0400, Laine Stump wrote: > On 07/19/2016 08:07 PM, Tomasz Flendrich wrote: > > This series depends on another one: > > https://www.redhat.com/archives/libvir-list/2016-July/msg00696.html > > > > Because the address sets are no longer cached, it's possible to

[libvirt] [PATCH 3/2] qemu: cap: Refactor access to array in virQEMUCapsProbeQMPMachineTypes

2016-07-29 Thread Peter Krempa
Use a temporary pointer rather than always recalculating the index in a very verbose way. --- src/qemu/qemu_capabilities.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 23d4a65..c612960 100644

[libvirt] [PATCH 1/2] qemu: capabilities: Drop unused function virQEMUCapsGetMachineTypes

2016-07-29 Thread Peter Krempa
--- src/qemu/qemu_capabilities.c | 8 src/qemu/qemu_capabilities.h | 2 -- 2 files changed, 10 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index d5b73e6..f8e2c55 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@

[libvirt] [PATCH 2/2] qemu: caps: Sanitize storage of machine type related data

2016-07-29 Thread Peter Krempa
Add a structure to store the data and use a single array of the structures rather than having 3 separate arrays with shared indexes. --- src/qemu/qemu_capabilities.c | 117 +-- 1 file changed, 46 insertions(+), 71 deletions(-) diff --git

[libvirt] [PATCH 0/2] qemu: caps: Sanitize storage of machine type related data

2016-07-29 Thread Peter Krempa
Peter Krempa (2): qemu: capabilities: Drop unused function virQEMUCapsGetMachineTypes qemu: caps: Sanitize storage of machine type related data src/qemu/qemu_capabilities.c | 125 --- src/qemu/qemu_capabilities.h | 2 - 2 files changed, 46

Re: [libvirt] [gconfig v2 1/2] config: Add vnc host setter

2016-07-29 Thread Christophe Fergeau
Hey, On Thu, Jul 28, 2016 at 06:16:38PM +0300, Visarion Alexandru wrote: > From: Visarion Alexandru > > Learn to set the address that vnc is listening on. > --- > libvirt-gconfig/libvirt-gconfig-domain-graphics-vnc.c | 9 + >

[libvirt] [PATCH 2/2] daemon: sasl: Don't forget to save SASL username to client's identity

2016-07-29 Thread Erik Skultety
Once the SASL authentication process has successfully passed, we should also save the SASL username used to client's identity, so that when a client like virt-admin tries to obtain it, the server will actually format the username to the response data. Signed-off-by: Erik Skultety

[libvirt] [PATCH 0/2] admin: sasl: Save the SASL username to client's identity

2016-07-29 Thread Erik Skultety
Erik Skultety (2): admin: Retrieve the SASL context for both local and remote connection daemon: sasl: Don't forget to save SASL username to client's identity daemon/admin_server.c | 14 +++--- daemon/remote.c | 6 ++ 2 files changed, 13 insertions(+), 7 deletions(-) --

[libvirt] [PATCH 1/2] admin: Retrieve the SASL context for both local and remote connection

2016-07-29 Thread Erik Skultety
When commit 4a0e9108 added a support for client information retrieval, it made the API return SASL identity info only for clients connected remotely, yet SASL can be happily used with UNIX sockets as well. Signed-off-by: Erik Skultety --- daemon/admin_server.c | 14

Re: [libvirt] [gconfig v2 0/2] Add host setters

2016-07-29 Thread Christophe Fergeau
Hey, On Thu, Jul 28, 2016 at 06:16:37PM +0300, Visarion Alexandru wrote: > From: Visarion Alexandru > > These new patches are a bit different than the last ones. > I first delete the child node and > then I modify the attribute. You could mention this in the commit

Re: [libvirt] [PATCH] conf: Catch invalid memory model earlier

2016-07-29 Thread Martin Kletzander
On Thu, Jul 28, 2016 at 06:28:40PM +0200, Michal Privoznik wrote: Consider the following XML snippet: 523264 0 Whats wrong you ask? The @model attribute. This should result in an error thrown into users faces during virDomainDefine phase. Except it doesn't.

Re: [libvirt] [PATCH 0/5] qemu: report actual vcpu state in virVcpuInfo

2016-07-29 Thread Peter Krempa
On Mon, Jul 18, 2016 at 07:56:36 +0200, Peter Krempa wrote: > On Thu, Jul 14, 2016 at 16:35:37 +0200, Viktor Mihajlovski wrote: > > Currently, the virVcpuInfo returned by virDomainGetVcpus() will always > > report a state of VIR_VCPU_RUNNING for each defined domain vcpu even if > > the vcpu is

[libvirt] [PATCH] virsh: Report error when explicit connection fails

2016-07-29 Thread Martin Kletzander
Commit 0c56d9431839 forgot to return false in the cmdConnect command after the clean up made there. Before (assuming you don't have uri alias for 'asdf'): $ virsh connect asdf error: failed to connect to the hypervisor $ echo $? 0 After (with the same assumption): $ virsh connect asdf