root / spice-qemu-char.c @ 41cb62c2
History | View | Annotate | Download (8.3 kB)
1 | cbcc6336 | Alon Levy | #include "config-host.h" |
---|---|---|---|
2 | cbcc6336 | Alon Levy | #include "trace.h" |
3 | cbcc6336 | Alon Levy | #include "ui/qemu-spice.h" |
4 | 927d4878 | Paolo Bonzini | #include "char/char.h" |
5 | cbcc6336 | Alon Levy | #include <spice.h> |
6 | cbcc6336 | Alon Levy | #include <spice-experimental.h> |
7 | 5a49d3e9 | Marc-André Lureau | #include <spice/protocol.h> |
8 | cbcc6336 | Alon Levy | |
9 | 1de7afc9 | Paolo Bonzini | #include "qemu/osdep.h" |
10 | cbcc6336 | Alon Levy | |
11 | cbcc6336 | Alon Levy | typedef struct SpiceCharDriver { |
12 | cbcc6336 | Alon Levy | CharDriverState* chr; |
13 | cbcc6336 | Alon Levy | SpiceCharDeviceInstance sin; |
14 | cbcc6336 | Alon Levy | char *subtype;
|
15 | cbcc6336 | Alon Levy | bool active;
|
16 | cbcc6336 | Alon Levy | uint8_t *buffer; |
17 | cbcc6336 | Alon Levy | uint8_t *datapos; |
18 | cbcc6336 | Alon Levy | ssize_t bufsize, datalen; |
19 | 7a5448ce | Marc-André Lureau | QLIST_ENTRY(SpiceCharDriver) next; |
20 | cbcc6336 | Alon Levy | } SpiceCharDriver; |
21 | cbcc6336 | Alon Levy | |
22 | 7a5448ce | Marc-André Lureau | static QLIST_HEAD(, SpiceCharDriver) spice_chars =
|
23 | 7a5448ce | Marc-André Lureau | QLIST_HEAD_INITIALIZER(spice_chars); |
24 | 7a5448ce | Marc-André Lureau | |
25 | cbcc6336 | Alon Levy | static int vmc_write(SpiceCharDeviceInstance *sin, const uint8_t *buf, int len) |
26 | cbcc6336 | Alon Levy | { |
27 | cbcc6336 | Alon Levy | SpiceCharDriver *scd = container_of(sin, SpiceCharDriver, sin); |
28 | cbcc6336 | Alon Levy | ssize_t out = 0;
|
29 | cbcc6336 | Alon Levy | ssize_t last_out; |
30 | cbcc6336 | Alon Levy | uint8_t* p = (uint8_t*)buf; |
31 | cbcc6336 | Alon Levy | |
32 | cbcc6336 | Alon Levy | while (len > 0) { |
33 | 07a54d70 | Marc-André Lureau | last_out = MIN(len, qemu_chr_be_can_write(scd->chr)); |
34 | 07a54d70 | Marc-André Lureau | if (last_out <= 0) { |
35 | cbcc6336 | Alon Levy | break;
|
36 | cbcc6336 | Alon Levy | } |
37 | fa5efccb | Anthony Liguori | qemu_chr_be_write(scd->chr, p, last_out); |
38 | 35106c2d | Hans de Goede | out += last_out; |
39 | 35106c2d | Hans de Goede | len -= last_out; |
40 | 35106c2d | Hans de Goede | p += last_out; |
41 | cbcc6336 | Alon Levy | } |
42 | cbcc6336 | Alon Levy | |
43 | cbcc6336 | Alon Levy | trace_spice_vmc_write(out, len + out); |
44 | cbcc6336 | Alon Levy | return out;
|
45 | cbcc6336 | Alon Levy | } |
46 | cbcc6336 | Alon Levy | |
47 | cbcc6336 | Alon Levy | static int vmc_read(SpiceCharDeviceInstance *sin, uint8_t *buf, int len) |
48 | cbcc6336 | Alon Levy | { |
49 | cbcc6336 | Alon Levy | SpiceCharDriver *scd = container_of(sin, SpiceCharDriver, sin); |
50 | cbcc6336 | Alon Levy | int bytes = MIN(len, scd->datalen);
|
51 | cbcc6336 | Alon Levy | |
52 | cbcc6336 | Alon Levy | if (bytes > 0) { |
53 | cbcc6336 | Alon Levy | memcpy(buf, scd->datapos, bytes); |
54 | cbcc6336 | Alon Levy | scd->datapos += bytes; |
55 | cbcc6336 | Alon Levy | scd->datalen -= bytes; |
56 | cbcc6336 | Alon Levy | assert(scd->datalen >= 0);
|
57 | cbcc6336 | Alon Levy | if (scd->datalen == 0) { |
58 | cbcc6336 | Alon Levy | scd->datapos = 0;
|
59 | cbcc6336 | Alon Levy | } |
60 | cbcc6336 | Alon Levy | } |
61 | cbcc6336 | Alon Levy | trace_spice_vmc_read(bytes, len); |
62 | cbcc6336 | Alon Levy | return bytes;
|
63 | cbcc6336 | Alon Levy | } |
64 | cbcc6336 | Alon Levy | |
65 | 5a49d3e9 | Marc-André Lureau | #if SPICE_SERVER_VERSION >= 0x000c02 |
66 | 5a49d3e9 | Marc-André Lureau | static void vmc_event(SpiceCharDeviceInstance *sin, uint8_t event) |
67 | 5a49d3e9 | Marc-André Lureau | { |
68 | 5a49d3e9 | Marc-André Lureau | SpiceCharDriver *scd = container_of(sin, SpiceCharDriver, sin); |
69 | 5a49d3e9 | Marc-André Lureau | int chr_event;
|
70 | 5a49d3e9 | Marc-André Lureau | |
71 | 5a49d3e9 | Marc-André Lureau | switch (event) {
|
72 | 5a49d3e9 | Marc-André Lureau | case SPICE_PORT_EVENT_BREAK:
|
73 | 5a49d3e9 | Marc-André Lureau | chr_event = CHR_EVENT_BREAK; |
74 | 5a49d3e9 | Marc-André Lureau | break;
|
75 | 5a49d3e9 | Marc-André Lureau | default:
|
76 | 5a49d3e9 | Marc-André Lureau | return;
|
77 | 5a49d3e9 | Marc-André Lureau | } |
78 | 5a49d3e9 | Marc-André Lureau | |
79 | 5a49d3e9 | Marc-André Lureau | trace_spice_vmc_event(chr_event); |
80 | 5a49d3e9 | Marc-André Lureau | qemu_chr_be_event(scd->chr, chr_event); |
81 | 5a49d3e9 | Marc-André Lureau | } |
82 | 5a49d3e9 | Marc-André Lureau | #endif
|
83 | 5a49d3e9 | Marc-André Lureau | |
84 | f76e4c7f | Hans de Goede | static void vmc_state(SpiceCharDeviceInstance *sin, int connected) |
85 | f76e4c7f | Hans de Goede | { |
86 | f76e4c7f | Hans de Goede | SpiceCharDriver *scd = container_of(sin, SpiceCharDriver, sin); |
87 | f76e4c7f | Hans de Goede | |
88 | f76e4c7f | Hans de Goede | #if SPICE_SERVER_VERSION < 0x000901 |
89 | f76e4c7f | Hans de Goede | /*
|
90 | f76e4c7f | Hans de Goede | * spice-server calls the state callback for the agent channel when the
|
91 | f76e4c7f | Hans de Goede | * spice client connects / disconnects. Given that not the client but
|
92 | f76e4c7f | Hans de Goede | * the server is doing the parsing of the messages this is wrong as the
|
93 | f76e4c7f | Hans de Goede | * server is still listening. Worse, this causes the parser in the server
|
94 | f76e4c7f | Hans de Goede | * to go out of sync, so we ignore state calls for subtype vdagent
|
95 | f76e4c7f | Hans de Goede | * spicevmc chardevs. For the full story see:
|
96 | f76e4c7f | Hans de Goede | * http://lists.freedesktop.org/archives/spice-devel/2011-July/004837.html
|
97 | f76e4c7f | Hans de Goede | */
|
98 | f76e4c7f | Hans de Goede | if (strcmp(sin->subtype, "vdagent") == 0) { |
99 | f76e4c7f | Hans de Goede | return;
|
100 | f76e4c7f | Hans de Goede | } |
101 | f76e4c7f | Hans de Goede | #endif
|
102 | f76e4c7f | Hans de Goede | |
103 | 16665b94 | Hans de Goede | if ((scd->chr->be_open && connected) ||
|
104 | 16665b94 | Hans de Goede | (!scd->chr->be_open && !connected)) { |
105 | f76e4c7f | Hans de Goede | return;
|
106 | f76e4c7f | Hans de Goede | } |
107 | f76e4c7f | Hans de Goede | |
108 | f76e4c7f | Hans de Goede | qemu_chr_be_event(scd->chr, |
109 | f76e4c7f | Hans de Goede | connected ? CHR_EVENT_OPENED : CHR_EVENT_CLOSED); |
110 | f76e4c7f | Hans de Goede | } |
111 | f76e4c7f | Hans de Goede | |
112 | cbcc6336 | Alon Levy | static SpiceCharDeviceInterface vmc_interface = {
|
113 | cbcc6336 | Alon Levy | .base.type = SPICE_INTERFACE_CHAR_DEVICE, |
114 | cbcc6336 | Alon Levy | .base.description = "spice virtual channel char device",
|
115 | cbcc6336 | Alon Levy | .base.major_version = SPICE_INTERFACE_CHAR_DEVICE_MAJOR, |
116 | cbcc6336 | Alon Levy | .base.minor_version = SPICE_INTERFACE_CHAR_DEVICE_MINOR, |
117 | f76e4c7f | Hans de Goede | .state = vmc_state, |
118 | cbcc6336 | Alon Levy | .write = vmc_write, |
119 | cbcc6336 | Alon Levy | .read = vmc_read, |
120 | 5a49d3e9 | Marc-André Lureau | #if SPICE_SERVER_VERSION >= 0x000c02 |
121 | 5a49d3e9 | Marc-André Lureau | .event = vmc_event, |
122 | 5a49d3e9 | Marc-André Lureau | #endif
|
123 | cbcc6336 | Alon Levy | }; |
124 | cbcc6336 | Alon Levy | |
125 | cbcc6336 | Alon Levy | |
126 | cbcc6336 | Alon Levy | static void vmc_register_interface(SpiceCharDriver *scd) |
127 | cbcc6336 | Alon Levy | { |
128 | cbcc6336 | Alon Levy | if (scd->active) {
|
129 | cbcc6336 | Alon Levy | return;
|
130 | cbcc6336 | Alon Levy | } |
131 | cbcc6336 | Alon Levy | scd->sin.base.sif = &vmc_interface.base; |
132 | cbcc6336 | Alon Levy | qemu_spice_add_interface(&scd->sin.base); |
133 | cbcc6336 | Alon Levy | scd->active = true;
|
134 | cbcc6336 | Alon Levy | trace_spice_vmc_register_interface(scd); |
135 | cbcc6336 | Alon Levy | } |
136 | cbcc6336 | Alon Levy | |
137 | cbcc6336 | Alon Levy | static void vmc_unregister_interface(SpiceCharDriver *scd) |
138 | cbcc6336 | Alon Levy | { |
139 | cbcc6336 | Alon Levy | if (!scd->active) {
|
140 | cbcc6336 | Alon Levy | return;
|
141 | cbcc6336 | Alon Levy | } |
142 | cbcc6336 | Alon Levy | spice_server_remove_interface(&scd->sin.base); |
143 | cbcc6336 | Alon Levy | scd->active = false;
|
144 | cbcc6336 | Alon Levy | trace_spice_vmc_unregister_interface(scd); |
145 | cbcc6336 | Alon Levy | } |
146 | cbcc6336 | Alon Levy | |
147 | cbcc6336 | Alon Levy | |
148 | cbcc6336 | Alon Levy | static int spice_chr_write(CharDriverState *chr, const uint8_t *buf, int len) |
149 | cbcc6336 | Alon Levy | { |
150 | cbcc6336 | Alon Levy | SpiceCharDriver *s = chr->opaque; |
151 | cbcc6336 | Alon Levy | |
152 | cbcc6336 | Alon Levy | assert(s->datalen == 0);
|
153 | cbcc6336 | Alon Levy | if (s->bufsize < len) {
|
154 | cbcc6336 | Alon Levy | s->bufsize = len; |
155 | 7267c094 | Anthony Liguori | s->buffer = g_realloc(s->buffer, s->bufsize); |
156 | cbcc6336 | Alon Levy | } |
157 | cbcc6336 | Alon Levy | memcpy(s->buffer, buf, len); |
158 | cbcc6336 | Alon Levy | s->datapos = s->buffer; |
159 | cbcc6336 | Alon Levy | s->datalen = len; |
160 | cbcc6336 | Alon Levy | spice_server_char_device_wakeup(&s->sin); |
161 | cbcc6336 | Alon Levy | return len;
|
162 | cbcc6336 | Alon Levy | } |
163 | cbcc6336 | Alon Levy | |
164 | cbcc6336 | Alon Levy | static void spice_chr_close(struct CharDriverState *chr) |
165 | cbcc6336 | Alon Levy | { |
166 | cbcc6336 | Alon Levy | SpiceCharDriver *s = chr->opaque; |
167 | cbcc6336 | Alon Levy | |
168 | cbcc6336 | Alon Levy | vmc_unregister_interface(s); |
169 | 7a5448ce | Marc-André Lureau | QLIST_REMOVE(s, next); |
170 | 5e9b473a | Hans de Goede | |
171 | 5e9b473a | Hans de Goede | g_free((char *)s->sin.subtype);
|
172 | 5e9b473a | Hans de Goede | #if SPICE_SERVER_VERSION >= 0x000c02 |
173 | 5e9b473a | Hans de Goede | g_free((char *)s->sin.portname);
|
174 | 5e9b473a | Hans de Goede | #endif
|
175 | 7267c094 | Anthony Liguori | g_free(s); |
176 | cbcc6336 | Alon Levy | } |
177 | cbcc6336 | Alon Levy | |
178 | 574b711a | Hans de Goede | static void spice_chr_set_fe_open(struct CharDriverState *chr, int fe_open) |
179 | cd8f7df2 | Hans de Goede | { |
180 | cd8f7df2 | Hans de Goede | SpiceCharDriver *s = chr->opaque; |
181 | 574b711a | Hans de Goede | if (fe_open) {
|
182 | 574b711a | Hans de Goede | vmc_register_interface(s); |
183 | 574b711a | Hans de Goede | } else {
|
184 | 574b711a | Hans de Goede | vmc_unregister_interface(s); |
185 | 574b711a | Hans de Goede | } |
186 | cd8f7df2 | Hans de Goede | } |
187 | cd8f7df2 | Hans de Goede | |
188 | cbcc6336 | Alon Levy | static void print_allowed_subtypes(void) |
189 | cbcc6336 | Alon Levy | { |
190 | cbcc6336 | Alon Levy | const char** psubtype; |
191 | cbcc6336 | Alon Levy | int i;
|
192 | cbcc6336 | Alon Levy | |
193 | cbcc6336 | Alon Levy | fprintf(stderr, "allowed names: ");
|
194 | cbcc6336 | Alon Levy | for(i=0, psubtype = spice_server_char_device_recognized_subtypes(); |
195 | cbcc6336 | Alon Levy | *psubtype != NULL; ++psubtype, ++i) {
|
196 | cbcc6336 | Alon Levy | if (i == 0) { |
197 | cbcc6336 | Alon Levy | fprintf(stderr, "%s", *psubtype);
|
198 | cbcc6336 | Alon Levy | } else {
|
199 | cbcc6336 | Alon Levy | fprintf(stderr, ", %s", *psubtype);
|
200 | cbcc6336 | Alon Levy | } |
201 | cbcc6336 | Alon Levy | } |
202 | cbcc6336 | Alon Levy | fprintf(stderr, "\n");
|
203 | cbcc6336 | Alon Levy | } |
204 | cbcc6336 | Alon Levy | |
205 | cd153e2a | Gerd Hoffmann | static CharDriverState *chr_open(const char *subtype) |
206 | cbcc6336 | Alon Levy | { |
207 | cbcc6336 | Alon Levy | CharDriverState *chr; |
208 | cbcc6336 | Alon Levy | SpiceCharDriver *s; |
209 | 71b423f4 | Marc-André Lureau | |
210 | 71b423f4 | Marc-André Lureau | chr = g_malloc0(sizeof(CharDriverState));
|
211 | 71b423f4 | Marc-André Lureau | s = g_malloc0(sizeof(SpiceCharDriver));
|
212 | 71b423f4 | Marc-André Lureau | s->chr = chr; |
213 | 71b423f4 | Marc-André Lureau | s->active = false;
|
214 | 5e9b473a | Hans de Goede | s->sin.subtype = g_strdup(subtype); |
215 | 71b423f4 | Marc-André Lureau | chr->opaque = s; |
216 | 71b423f4 | Marc-André Lureau | chr->chr_write = spice_chr_write; |
217 | 71b423f4 | Marc-André Lureau | chr->chr_close = spice_chr_close; |
218 | 574b711a | Hans de Goede | chr->chr_set_fe_open = spice_chr_set_fe_open; |
219 | 71b423f4 | Marc-André Lureau | |
220 | 7a5448ce | Marc-André Lureau | QLIST_INSERT_HEAD(&spice_chars, s, next); |
221 | 7a5448ce | Marc-André Lureau | |
222 | 71b423f4 | Marc-André Lureau | return chr;
|
223 | 71b423f4 | Marc-André Lureau | } |
224 | 71b423f4 | Marc-André Lureau | |
225 | cd153e2a | Gerd Hoffmann | CharDriverState *qemu_chr_open_spice_vmc(const char *type) |
226 | 71b423f4 | Marc-André Lureau | { |
227 | 71b423f4 | Marc-André Lureau | CharDriverState *chr; |
228 | 71b423f4 | Marc-André Lureau | const char **psubtype = spice_server_char_device_recognized_subtypes(); |
229 | cbcc6336 | Alon Levy | |
230 | cd153e2a | Gerd Hoffmann | if (type == NULL) { |
231 | cbcc6336 | Alon Levy | fprintf(stderr, "spice-qemu-char: missing name parameter\n");
|
232 | cbcc6336 | Alon Levy | print_allowed_subtypes(); |
233 | 1f51470d | Markus Armbruster | return NULL; |
234 | cbcc6336 | Alon Levy | } |
235 | cd153e2a | Gerd Hoffmann | for (; *psubtype != NULL; ++psubtype) { |
236 | cd153e2a | Gerd Hoffmann | if (strcmp(type, *psubtype) == 0) { |
237 | cbcc6336 | Alon Levy | break;
|
238 | cbcc6336 | Alon Levy | } |
239 | cbcc6336 | Alon Levy | } |
240 | cd153e2a | Gerd Hoffmann | if (*psubtype == NULL) { |
241 | cd153e2a | Gerd Hoffmann | fprintf(stderr, "spice-qemu-char: unsupported type: %s\n", type);
|
242 | cbcc6336 | Alon Levy | print_allowed_subtypes(); |
243 | 1f51470d | Markus Armbruster | return NULL; |
244 | cbcc6336 | Alon Levy | } |
245 | cbcc6336 | Alon Levy | |
246 | cd153e2a | Gerd Hoffmann | chr = chr_open(type); |
247 | cbcc6336 | Alon Levy | |
248 | f76e4c7f | Hans de Goede | #if SPICE_SERVER_VERSION < 0x000901 |
249 | f76e4c7f | Hans de Goede | /* See comment in vmc_state() */
|
250 | cd153e2a | Gerd Hoffmann | if (strcmp(type, "vdagent") == 0) { |
251 | f76e4c7f | Hans de Goede | qemu_chr_generic_open(chr); |
252 | f76e4c7f | Hans de Goede | } |
253 | f76e4c7f | Hans de Goede | #endif
|
254 | cbcc6336 | Alon Levy | |
255 | 1f51470d | Markus Armbruster | return chr;
|
256 | cbcc6336 | Alon Levy | } |
257 | 5a49d3e9 | Marc-André Lureau | |
258 | 5a49d3e9 | Marc-André Lureau | #if SPICE_SERVER_VERSION >= 0x000c02 |
259 | cd153e2a | Gerd Hoffmann | CharDriverState *qemu_chr_open_spice_port(const char *name) |
260 | 5a49d3e9 | Marc-André Lureau | { |
261 | 5a49d3e9 | Marc-André Lureau | CharDriverState *chr; |
262 | 5a49d3e9 | Marc-André Lureau | SpiceCharDriver *s; |
263 | 5a49d3e9 | Marc-André Lureau | |
264 | 5a49d3e9 | Marc-André Lureau | if (name == NULL) { |
265 | 5a49d3e9 | Marc-André Lureau | fprintf(stderr, "spice-qemu-char: missing name parameter\n");
|
266 | 5a49d3e9 | Marc-André Lureau | return NULL; |
267 | 5a49d3e9 | Marc-André Lureau | } |
268 | 5a49d3e9 | Marc-André Lureau | |
269 | cd153e2a | Gerd Hoffmann | chr = chr_open("port");
|
270 | 5a49d3e9 | Marc-André Lureau | s = chr->opaque; |
271 | 5e9b473a | Hans de Goede | s->sin.portname = g_strdup(name); |
272 | 5a49d3e9 | Marc-André Lureau | |
273 | 5a49d3e9 | Marc-André Lureau | return chr;
|
274 | 5a49d3e9 | Marc-André Lureau | } |
275 | afd0b409 | Marc-André Lureau | |
276 | afd0b409 | Marc-André Lureau | void qemu_spice_register_ports(void) |
277 | afd0b409 | Marc-André Lureau | { |
278 | afd0b409 | Marc-André Lureau | SpiceCharDriver *s; |
279 | afd0b409 | Marc-André Lureau | |
280 | afd0b409 | Marc-André Lureau | QLIST_FOREACH(s, &spice_chars, next) { |
281 | afd0b409 | Marc-André Lureau | if (s->sin.portname == NULL) { |
282 | afd0b409 | Marc-André Lureau | continue;
|
283 | afd0b409 | Marc-André Lureau | } |
284 | afd0b409 | Marc-André Lureau | vmc_register_interface(s); |
285 | afd0b409 | Marc-André Lureau | } |
286 | afd0b409 | Marc-André Lureau | } |
287 | 5a49d3e9 | Marc-André Lureau | #endif
|
288 | 26c60614 | Anthony Liguori | |
289 | cd153e2a | Gerd Hoffmann | static void qemu_chr_parse_spice_vmc(QemuOpts *opts, ChardevBackend *backend, |
290 | cd153e2a | Gerd Hoffmann | Error **errp) |
291 | cd153e2a | Gerd Hoffmann | { |
292 | cd153e2a | Gerd Hoffmann | const char *name = qemu_opt_get(opts, "name"); |
293 | cd153e2a | Gerd Hoffmann | |
294 | cd153e2a | Gerd Hoffmann | if (name == NULL) { |
295 | cd153e2a | Gerd Hoffmann | error_setg(errp, "chardev: spice channel: no name given");
|
296 | cd153e2a | Gerd Hoffmann | return;
|
297 | cd153e2a | Gerd Hoffmann | } |
298 | cd153e2a | Gerd Hoffmann | backend->spicevmc = g_new0(ChardevSpiceChannel, 1);
|
299 | cd153e2a | Gerd Hoffmann | backend->spicevmc->type = g_strdup(name); |
300 | cd153e2a | Gerd Hoffmann | } |
301 | cd153e2a | Gerd Hoffmann | |
302 | cd153e2a | Gerd Hoffmann | static void qemu_chr_parse_spice_port(QemuOpts *opts, ChardevBackend *backend, |
303 | cd153e2a | Gerd Hoffmann | Error **errp) |
304 | cd153e2a | Gerd Hoffmann | { |
305 | cd153e2a | Gerd Hoffmann | const char *name = qemu_opt_get(opts, "name"); |
306 | cd153e2a | Gerd Hoffmann | |
307 | cd153e2a | Gerd Hoffmann | if (name == NULL) { |
308 | cd153e2a | Gerd Hoffmann | error_setg(errp, "chardev: spice port: no name given");
|
309 | cd153e2a | Gerd Hoffmann | return;
|
310 | cd153e2a | Gerd Hoffmann | } |
311 | cd153e2a | Gerd Hoffmann | backend->spiceport = g_new0(ChardevSpicePort, 1);
|
312 | cd153e2a | Gerd Hoffmann | backend->spiceport->fqdn = g_strdup(name); |
313 | cd153e2a | Gerd Hoffmann | } |
314 | cd153e2a | Gerd Hoffmann | |
315 | 26c60614 | Anthony Liguori | static void register_types(void) |
316 | 26c60614 | Anthony Liguori | { |
317 | cd153e2a | Gerd Hoffmann | register_char_driver_qapi("spicevmc", CHARDEV_BACKEND_KIND_SPICEVMC,
|
318 | cd153e2a | Gerd Hoffmann | qemu_chr_parse_spice_vmc); |
319 | cd153e2a | Gerd Hoffmann | register_char_driver_qapi("spiceport", CHARDEV_BACKEND_KIND_SPICEPORT,
|
320 | cd153e2a | Gerd Hoffmann | qemu_chr_parse_spice_port); |
321 | 26c60614 | Anthony Liguori | } |
322 | 26c60614 | Anthony Liguori | |
323 | 26c60614 | Anthony Liguori | type_init(register_types); |