[libvirt] [PATCHv5 9/9] smartcard: add spicevmc support

2011-02-03 Thread Eric Blake
Adds , which uses the new of . * docs/schemas/domain.rng: Support new XML. * docs/formatdomain.html.in: Document it. * src/conf/domain_conf.h (virDomainGraphicsSpiceChannelName): New enum value. (virDomainChrSpicevmcName): New enum. (virDomainChrSourceDef): Distinguish spicevmc types. * src/conf/

[libvirt] [PATCHv5 8/9] Revert "RFC: spicevmc: call out vdagent as a channel target"

2011-02-03 Thread Eric Blake
This reverts commit e73f3dfd7ec15b635c2c97f8d57957f5aaff3e74. --- Nothing to see here... docs/formatdomain.html.in | 12 +- docs/schemas/domain.rng| 13 src/conf/domain_conf.c | 20 ++-

[libvirt] [PATCHv5 7/9] RFC: spicevmc: call out vdagent as a channel target

2011-02-03 Thread Eric Blake
Not sure this makes sense to do; posting it for comments, but I'm okay with ditching the idea (especially since existing RHEL 6.0 guests have already been using XML that targets virtio, which means changing to vdagent would cause the need for a naming transition). * docs/schemas/domain.rng: Tweak

[libvirt] [PATCHv5 6/9] spicevmc: support new qemu chardev

2011-02-03 Thread Eric Blake
From: Daniel P. Berrange Inspired by https://bugzilla.redhat.com/show_bug.cgi?id=615757 Add a new character device backend for virtio serial channels that activates the QEMU spice agent on the main channel using the vdagent spicevmc connection. The must be type='virtio', and supports an option

[libvirt] [PATCHv5 4/9] smartcard: enable SELinux support

2011-02-03 Thread Eric Blake
* src/security/security_selinux.c (SELinuxRestoreSecuritySmartcardCallback) (SELinuxSetSecuritySmartcardCallback): New helper functions. (SELinuxRestoreSecurityAllLabel, SELinuxSetSecurityAllLabel): Use them. --- Notes: v3: new patch v4: match xml changes v5: no change src/security/se

[libvirt] [PATCHv5 3/9] smartcard: check for qemu capability

2011-02-03 Thread Eric Blake
Qemu smartcard/spicevmc support exists on branches (such as http://cgit.freedesktop.org/~alon/qemu/commit/?h=usb_ccid.v15&id=024a37b) but is not yet upstream. The added -help output matches a scratch build that will be close to the RHEL 6.1 qemu-kvm. * src/qemu/qemu_capabilities.h (QEMUD_CMD_FLAG

[libvirt] [PATCHv5 2/9] smartcard: add domain conf support

2011-02-03 Thread Eric Blake
* src/conf/domain_conf.h (virDomainSmartcardType): New enum. (virDomainSmartcardDef, virDomainDeviceCcidAddress): New structs. (virDomainDef): Include smartcards. (virDomainSmartcardDefIterator): New typedef. (virDomainSmartcardDefFree, virDomainSmartcardDefForeach): New prototypes. (virDomainContr

[libvirt] [PATCHv5 0/9] smartcard round 5

2011-02-03 Thread Eric Blake
Next round. The first 5 patches were previously ack'd in round 4: https://www.redhat.com/archives/libvir-list/2011-February/msg00026.html However, I heavily rewrote patch 3 to support later spicevmc patches, as well as tweaked patch 1 and 5 to avoid the need for memory rounding. Patch 6 is mostl

[libvirt] [PATCHv5 1/9] smartcard: add XML support for device

2011-02-03 Thread Eric Blake
Assuming a hypervisor that supports multiple smartcard devices in the guest, this would be a valid XML description: /path/to/cert1 /path/to/cert2 /path/to/cert3 (As of this commit, the qemu hypervisor will be the first implementation, but it only supports on

[libvirt] [PATCHv5 5/9] smartcard: turn on qemu support

2011-02-03 Thread Eric Blake
* src/qemu/qemu_command.c (qemuBuildCommandLine): Emit smartcard options. (qemuAssignDeviceAliases): Assign an alias for smartcards. (qemuBuildControllerDevStr): Manage the usb-ccid controller. * tests/qemuxml2argvtest.c (mymain): Add new tests. * tests/qemuxml2argvdata/qemuxml2argv-smartcard-host.

Re: [libvirt] [PATCH] docs/index.html.in: update QEMU url

2011-02-03 Thread Eric Blake
On 02/03/2011 04:40 PM, Alon Levy wrote: > --- > docs/index.html.in |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/docs/index.html.in b/docs/index.html.in > index 501f3e3..30cc9d7 100644 > --- a/docs/index.html.in > +++ b/docs/index.html.in > @@ -38,7 +38,7 @@ >

[libvirt] [PATCH] docs/index.html.in: update QEMU url

2011-02-03 Thread Alon Levy
--- docs/index.html.in |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/docs/index.html.in b/docs/index.html.in index 501f3e3..30cc9d7 100644 --- a/docs/index.html.in +++ b/docs/index.html.in @@ -38,7 +38,7 @@ on Linux and Solaris hosts. -T

Re: [libvirt] [PATCH 0/2] Support booting from hostdev devices

2011-02-03 Thread Jiri Denemark
On Thu, Feb 03, 2011 at 15:13:33 +0100, Jiri Denemark wrote: > These are a follow-up patches for per-device boot which extend current support > for booting from disks and NICs to assigned host devices. > > Jiri Denemark (2): > Support booting from hostdev devices > qemu: Support booting from h

Re: [libvirt] [PATCH v2] qemu: Add shortcut for HMP pass through

2011-02-03 Thread Jiri Denemark
On Thu, Feb 03, 2011 at 10:36:37 -0700, Eric Blake wrote: > On 02/03/2011 02:43 AM, Jiri Denemark wrote: > > This patch introduces --hmp option to qemu-monitor-command, which says > > that the provided command is in HMP. If libvirt uses QMP to talk with > > qemu, the command will automatically be c

Re: [libvirt] [PATCH 2/2] qemu: Support booting from hostdev PCI devices

2011-02-03 Thread Jiri Denemark
> > +++ b/src/qemu/qemu_capabilities.h > > @@ -87,6 +87,7 @@ enum qemuCapsFlags { > > QEMUD_CMD_FLAG_HDA_DUPLEX= (1LL << 50), /* -device hda-duplex */ > > QEMUD_CMD_FLAG_DRIVE_AIO = (1LL << 51), /* -drive aio= supported */ > > QEMUD_CMD_FLAG_PCI_MULTIBUS = (1LL << 52), /* bu

Re: [libvirt] [PATCH] macvtap.c: add parenthesis for similar expressions

2011-02-03 Thread Stefan Berger
Eric Blake wrote on 02/03/2011 02:31:13 PM: > > On 02/03/2011 11:41 AM, Stefan Berger wrote: > >> Actually, you've uncovered a bigger bug, but didn't fix it right. > > > > ohoh, yes, there's a bug. This is how it should look like > > > > --- > > src/util/macvtap.c |4 ++-- > > 1 file cha

Re: [libvirt] [PATCH] macvtap.c: add parenthesis for similar expressions

2011-02-03 Thread Eric Blake
On 02/03/2011 11:41 AM, Stefan Berger wrote: >> Actually, you've uncovered a bigger bug, but didn't fix it right. > > ohoh, yes, there's a bug. This is how it should look like > > --- > src/util/macvtap.c |4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > Index: libvirt-acl/src/

Re: [libvirt] consistency of virsh help output

2011-02-03 Thread Zdenek Styblik
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/03/11 19:05, Eric Blake wrote: [...] > > While I agree that a patch to make things more consistent is probably > worthwhile, I was unclear from your report on which way you thought > things should be changed. In this case, patches speak louder

Re: [libvirt] [PATCH] macvtap.c: add parenthesis for similar expressions

2011-02-03 Thread Stefan Berger
Eric Blake wrote on 02/03/2011 01:28:36 PM: > > On 02/03/2011 11:12 AM, Davidlohr Bueso wrote: > > It wouldn't hurt to add some parenthesis in the following two > similar expression for better readability. > > I take it you were using some gcc option about precedence of operations > being con

Re: [libvirt] [PATCH] macvtap.c: add parenthesis for similar expressions

2011-02-03 Thread Eric Blake
On 02/03/2011 11:12 AM, Davidlohr Bueso wrote: > It wouldn't hurt to add some parenthesis in the following two similar > expression for better readability. I take it you were using some gcc option about precedence of operations being confusing between ! and <; including that gcc warning message i

Re: [libvirt] [PATCH 2/2] qemu: Support booting from hostdev PCI devices

2011-02-03 Thread Eric Blake
On 02/03/2011 07:13 AM, Jiri Denemark wrote: > --- > src/qemu/qemu_capabilities.c |5 - > src/qemu/qemu_capabilities.h |1 + > src/qemu/qemu_command.c | 17 + > 3 files changed, 22 insertions(+), 1 deletions(-) > > diff --git a/src/qemu/qemu_capabilities.c b/src

[libvirt] [PATCH] macvtap.c: add parenthesis for similar expressions

2011-02-03 Thread Davidlohr Bueso
It wouldn't hurt to add some parenthesis in the following two similar expression for better readability. --- src/util/macvtap.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/util/macvtap.c b/src/util/macvtap.c index 09d7b78..92147ab 100644 --- a/src/util/mac

Re: [libvirt] [PATCH 1/2] Support booting from hostdev devices

2011-02-03 Thread Eric Blake
On 02/03/2011 07:13 AM, Jiri Denemark wrote: > --- > docs/formatdomain.html.in | 14 -- > docs/schemas/domain.rng |3 +++ > src/conf/domain_conf.c| 18 +++--- > src/conf/domain_conf.h|1 + > 4 files changed, 31 insertions(+), 5 deletions(-) Yeah - doc

Re: [libvirt] consistency of virsh help output

2011-02-03 Thread Eric Blake
On 02/03/2011 02:31 AM, Zdenek Styblik wrote: > Hello, > > I've found virsh help output to be inconsistent. > > ~~~ SNIP ~~~ > attach-disk[--driver ]... > > X > > attach-interface[] ... > ~~~ SNIP ~~~ > > where is usually explained in OPTIONS as: > ~~~ SNIP ~~~ > [--domain] domain n

Re: [libvirt] [PATCHv4 3/5] smartcard: check for qemu capability

2011-02-03 Thread Eric Blake
On 02/02/2011 05:07 AM, Daniel P. Berrange wrote: > On Tue, Feb 01, 2011 at 09:48:54AM -0700, Eric Blake wrote: >> Qemu smartcard support exists on branches (such as >> http://cgit.freedesktop.org/~alon/qemu/commit/?h=usb_ccid.v15&id=024a37b) >> but is not yet upstream. Once an upstream version ex

Re: [libvirt] [PATCH v2] qemu: Add shortcut for HMP pass through

2011-02-03 Thread Eric Blake
On 02/03/2011 02:43 AM, Jiri Denemark wrote: > This patch introduces --hmp option to qemu-monitor-command, which says > that the provided command is in HMP. If libvirt uses QMP to talk with > qemu, the command will automatically be converted into QMP. So the > example above is simplified to just >

Re: [libvirt] [PATCH] qemu: avoid double shutdown

2011-02-03 Thread Eric Blake
On 02/03/2011 06:14 AM, Jiri Denemark wrote: > On Wed, Feb 02, 2011 at 11:37:37 -0700, Eric Blake wrote: >> * src/qemu/qemu_driver.c (qemudShutdownVMDaemon): Check that vm is >> still active. >> Reported by Wen Congyang as follows: >> >> --- >> +++ b/src/qemu/qemu_driver.c >> @@ -2991,6 +2991,11 @@

Re: [libvirt] [PATCH] Fix conflicts with glibc globals

2011-02-03 Thread Eric Blake
On 02/03/2011 08:09 AM, Davidlohr Bueso wrote: > When compiling libvirt with GCC 3.4.6 the following warning is being > triggered quite a lot: > > util/memory.h:60: warning: declaration of 'remove' shadows a global > declaration > /usr/include/stdio.h:175: warning: shadowed declaration is here >

[libvirt] [PATCH] Fix conflicts with glibc globals

2011-02-03 Thread Davidlohr Bueso
When compiling libvirt with GCC 3.4.6 the following warning is being triggered quite a lot: util/memory.h:60: warning: declaration of 'remove' shadows a global declaration /usr/include/stdio.h:175: warning: shadowed declaration is here Fix this by renaming the parameter to 'toremove'. --- src/u

Re: [libvirt] [PATCH] Don't sleep in poll() if there is existing SASL decoded data

2011-02-03 Thread Daniel Veillard
On Tue, Feb 01, 2011 at 04:20:16PM +, Daniel P. Berrange wrote: > On Tue, Feb 01, 2011 at 09:18:45AM -0700, Eric Blake wrote: > > On 02/01/2011 09:09 AM, Daniel P. Berrange wrote: > > > In the SASL codepath we typically read far more data off the > > > wire than we immediately need. When using

[libvirt] [PATCH 1/2] Support booting from hostdev devices

2011-02-03 Thread Jiri Denemark
--- docs/formatdomain.html.in | 14 -- docs/schemas/domain.rng |3 +++ src/conf/domain_conf.c| 18 +++--- src/conf/domain_conf.h|1 + 4 files changed, 31 insertions(+), 5 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in

[libvirt] [PATCH 2/2] qemu: Support booting from hostdev PCI devices

2011-02-03 Thread Jiri Denemark
--- src/qemu/qemu_capabilities.c |5 - src/qemu/qemu_capabilities.h |1 + src/qemu/qemu_command.c | 17 + 3 files changed, 22 insertions(+), 1 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 37a97aa..fd46557 100644 ---

[libvirt] [PATCH 0/2] Support booting from hostdev devices

2011-02-03 Thread Jiri Denemark
These are a follow-up patches for per-device boot which extend current support for booting from disks and NICs to assigned host devices. Jiri Denemark (2): Support booting from hostdev devices qemu: Support booting from hostdev PCI devices docs/formatdomain.html.in| 14 --

Re: [libvirt] [PATCH] qemu: avoid double shutdown

2011-02-03 Thread Jiri Denemark
On Wed, Feb 02, 2011 at 11:37:37 -0700, Eric Blake wrote: > * src/qemu/qemu_driver.c (qemudShutdownVMDaemon): Check that vm is > still active. > Reported by Wen Congyang as follows: > > --- > > I was able to reproduce a segfault due to double shutdown, as > well as testing that this patch avoids

Re: [libvirt] New sub-project libvirt-snmp

2011-02-03 Thread Zdenek Styblik
Hello, On 02/03/2011 11:21 AM, Michal Prívozník wrote: Hi, I'd like to let you know and review the new project libvirt-snmp. It's aim is to provide snmp functionality to libvirt. Right now it supports only VM lifecycle stuff (start, suspend, destroy, ...) and gathering info. I think this is

Re: [libvirt] [PATCH 3/3] Add myself to AUTHORS

2011-02-03 Thread Niels de Vos
On Wed, Feb 2, 2011 at 4:04 PM, Eric Blake wrote: > On 02/02/2011 08:30 AM, Niels de Vos wrote: >> On Wed, Feb 2, 2011 at 12:04 PM, Daniel P. Berrange >> wrote: >>> On Tue, Feb 01, 2011 at 04:22:03PM +, Niels de Vos wrote: Without this, ./autobuild.sh fails. >>> ACK assuming you wa

[libvirt] New sub-project libvirt-snmp

2011-02-03 Thread Michal Prívozník
Hi, I'd like to let you know and review the new project libvirt-snmp. It's aim is to provide snmp functionality to libvirt. Right now it supports only VM lifecycle stuff (start, suspend, destroy, ...) and gathering info. The sources are available here: git clone git://libvirt.org/libvir

Re: [libvirt] consistency of virsh help output

2011-02-03 Thread Zdenek Styblik
On 02/03/2011 10:44 AM, Justin Clift wrote: Yeah, consistency would definitely be good, and you're right, it probably would be just a matter of modifying printf() types of statements. You're definitely welcome to create patches to accomplish this if you want. :) + Justin Good. Thanks, Z. -

Re: [libvirt] consistency of virsh help output

2011-02-03 Thread Justin Clift
On 03/02/2011, at 8:31 PM, Zdenek Styblik wrote: > Hello, > > I've found virsh help output to be inconsistent. > > ~~~ SNIP ~~~ > attach-disk[--driver ]... > > X > > attach-interface[] ... > ~~~ SNIP ~~~ > > where is usually explained in OPTIONS as: > ~~~ SNIP ~~~ > [--domain] domai

[libvirt] [PATCH v2] qemu: Add shortcut for HMP pass through

2011-02-03 Thread Jiri Denemark
Currently users who want to use virDomainQemuMonitorCommand() API or it's virsh equivalent has to use the same protocol as libvirt uses for communication to qemu. Since the protocol is QMP with current qemu and HMP much more usable for humans, one ends up typing something like the following: v

Re: [libvirt] [PATCH] qemu: Add shortcut for HMP pass through

2011-02-03 Thread Jiri Denemark
On Wed, Feb 02, 2011 at 09:18:25 -0700, Eric Blake wrote: > On 02/02/2011 08:49 AM, Jiri Denemark wrote: > > +enum { > > +VIR_DOMAIN_QEMU_MONITOR_COMMAND_DEFAULT = 0, > > +VIR_DOMAIN_QEMU_MONITOR_COMMAND_HMP = (1 << 0), /* cmd is in HMP */ > > +} virDomainQemuMonitorCommandFlags; > > +

[libvirt] consistency of virsh help output

2011-02-03 Thread Zdenek Styblik
Hello, I've found virsh help output to be inconsistent. ~~~ SNIP ~~~ attach-disk[--driver ]... X attach-interface[] ... ~~~ SNIP ~~~ where is usually explained in OPTIONS as: ~~~ SNIP ~~~ [--domain] domain name, id or uuid ~~~ SNIP ~~~ Substitution of -> [--domain] resp. that yo