]> git.ipfire.org Git - thirdparty/libvirt.git/commit
spicevmc: support new qemu chardev
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 3 Feb 2011 04:09:44 +0000 (21:09 -0700)
committerEric Blake <eblake@redhat.com>
Fri, 4 Feb 2011 04:14:50 +0000 (21:14 -0700)
commitbe87a1236eef208d11196627b159fdf41f1d8a67
treec592379cdeed4ec13a6b05d3ed68dea86c4b2b9e
parentf5fd9baac1db4d1570ba22ec21cd7c508c9afdb1
spicevmc: support new qemu chardev

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 <target> must be type='virtio', and supports
an optional name that specifies how the guest will see the channel
(for now, name must be com.redhat.spice.0).

<channel type='spicevmc'>
  <target type='virtio'/>
  <address type='virtio-serial' controller='1' bus='0' port='3'/>
</channel>

* docs/schemas/domain.rng: Support new XML.
* docs/formatdomain.html.in: Document it.
* src/conf/domain_conf.h (virDomainChrType): New enum value.
* src/conf/domain_conf.c (virDomainChr): Add spicevmc.
(virDomainChrDefParseXML, virDomainChrSourceDefParseXML)
(virDomainChrDefParseTargetXML): Parse and enforce proper use.
(virDomainChrSourceDefFormat, virDomainChrDefFormat): Format.
* src/qemu/qemu_command.c (qemuBuildChrChardevStr)
(qemuBuildCommandLine): Add qemu support.
* tests/qemuxml2argvtest.c (domain): New test.
* tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc.xml: New
file.
* tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc.args:
Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
docs/formatdomain.html.in
docs/schemas/domain.rng
src/conf/domain_conf.c
src/conf/domain_conf.h
src/qemu/qemu_command.c
tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc.args [new file with mode: 0644]
tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc.xml [new file with mode: 0644]
tests/qemuxml2argvtest.c