From: Eric Blake
Date: Fri, 4 Feb 2011 02:23:31 +0000 (-0700)
Subject: smartcard: add spicevmc support
X-Git-Tag: v0.8.8~79
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=79f9267f4bd697fbcfeb040440404bc49195eb48;p=thirdparty%2Flibvirt.git
smartcard: add spicevmc support
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/domain_conf.c (virDomainGraphicsSpiceChannelName): Add
smartcard.
(virDomainSmartcardDefParseXML): Parse it.
(virDomainChrDefParseXML, virDomainSmartcardDefParseXML): Set
spicevmc name.
(virDomainChrSpicevmc): New enum conversion functions.
* src/libvirt_private.syms: Export new functions.
* src/qemu/qemu_command.c (qemuBuildChrChardevStr): Conditionalize
name.
* tests/qemuxml2argvtest.c (domain): New test.
* tests/qemuxml2argvdata/qemuxml2argv-smartcard-passthrough-spicevmc.args:
New file.
* tests/qemuxml2argvdata/qemuxml2argv-smartcard-passthrough-spicevmc.xml:
Likewise.
---
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index d91fdb9fd4..43c78fc311 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -1021,6 +1021,7 @@
<protocol type='raw'/>
<address type='ccid' controller='0' slot='0'/>
</smartcard>
+ <smartcard mode='passthrough' type='spicevmc'/>
</devices>
...
@@ -1063,9 +1064,11 @@
files). In this mode of operation, an additional
attribute type is required, matching one of the
supported serial device types, to
- describe the host side of the tunnel; type='tcp' is
- typical. Further sub-elements, such
- as <source>, are required according to the
+ describe the host side of the tunnel; type='tcp'
+ or type='spicevmc' (which uses the smartcard
+ channel of a SPICE graphics
+ device) are typical. Further sub-elements, such
+ as <source>, may be required according to the
given type, although a <target> sub-element
is not required (since the consumer of the character device is
the hypervisor itself, rather than a device visible in the
@@ -1505,8 +1508,9 @@ qemu-kvm -net nic,model=? /dev/null
can be desirable to restrict what channels can be run on each port.
This is achieved by adding one or more <channel> elements inside
the main <graphics> element. Valid channel names include
- main,display,inputs,cursor,
- playback,record.
+ main, display, inputs,
+ cursor, playback, record;
+ and since 0.8.8: smartcard.