]> git.proxmox.com Git - mirror_qemu.git/blame - qapi/misc.json
qtest: enable vnc-display test on win32
[mirror_qemu.git] / qapi / misc.json
CommitLineData
112ed241 1# -*- Mode: Python -*-
f7160f32 2# vim: filetype=python
112ed241
MA
3#
4
5##
6# = Miscellanea
7##
8
b47aa7b3
LE
9{ 'include': 'common.json' }
10
112ed241
MA
11##
12# @add_client:
13#
14# Allow client connections for VNC, Spice and socket based
15# character devices to be passed in to QEMU via SCM_RIGHTS.
16#
bf5de8c5
MAL
17# If the FD associated with @fdname is not a socket, the command will fail and
18# the FD will be closed.
19#
99997823
MAL
20# @protocol: protocol name. Valid names are "vnc", "spice", "@dbus-display" or
21# the name of a character device (eg. from -chardev id=XXXX)
112ed241
MA
22#
23# @fdname: file descriptor name previously passed via 'getfd' command
24#
25# @skipauth: whether to skip authentication. Only applies
26# to "vnc" and "spice" protocols
27#
28# @tls: whether to perform TLS. Only applies to the "spice"
29# protocol
30#
31# Returns: nothing on success.
32#
9bc6e893 33# Since: 0.14
112ed241
MA
34#
35# Example:
36#
37# -> { "execute": "add_client", "arguments": { "protocol": "vnc",
38# "fdname": "myclient" } }
39# <- { "return": {} }
40#
41##
42{ 'command': 'add_client',
43 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
44 '*tls': 'bool' } }
45
46##
47# @NameInfo:
48#
49# Guest name information.
50#
51# @name: The name of the guest
52#
9bc6e893 53# Since: 0.14
112ed241
MA
54##
55{ 'struct': 'NameInfo', 'data': {'*name': 'str'} }
56
57##
58# @query-name:
59#
60# Return the name information of a guest.
61#
62# Returns: @NameInfo of the guest
63#
9bc6e893 64# Since: 0.14
112ed241
MA
65#
66# Example:
67#
68# -> { "execute": "query-name" }
69# <- { "return": { "name": "qemu-name" } }
70#
71##
a87706c8 72{ 'command': 'query-name', 'returns': 'NameInfo', 'allow-preconfig': true }
112ed241 73
112ed241
MA
74##
75# @IOThreadInfo:
76#
77# Information about an iothread
78#
79# @id: the identifier of the iothread
80#
81# @thread-id: ID of the underlying host thread
82#
83# @poll-max-ns: maximum polling time in ns, 0 means polling is disabled
84# (since 2.9)
85#
86# @poll-grow: how many ns will be added to polling time, 0 means that it's not
87# configured (since 2.9)
88#
89# @poll-shrink: how many ns will be removed from polling time, 0 means that
90# it's not configured (since 2.9)
91#
1793ad02
SG
92# @aio-max-batch: maximum number of requests in a batch for the AIO engine,
93# 0 means that the engine will use its default (since 6.1)
94#
112ed241
MA
95# Since: 2.0
96##
97{ 'struct': 'IOThreadInfo',
98 'data': {'id': 'str',
99 'thread-id': 'int',
100 'poll-max-ns': 'int',
101 'poll-grow': 'int',
1793ad02
SG
102 'poll-shrink': 'int',
103 'aio-max-batch': 'int' } }
112ed241
MA
104
105##
106# @query-iothreads:
107#
108# Returns a list of information about each iothread.
109#
110# Note: this list excludes the QEMU main loop thread, which is not declared
26ec4e53
PM
111# using the -object iothread command-line option. It is always the main thread
112# of the process.
112ed241
MA
113#
114# Returns: a list of @IOThreadInfo for each iothread
115#
116# Since: 2.0
117#
118# Example:
119#
120# -> { "execute": "query-iothreads" }
121# <- { "return": [
122# {
123# "id":"iothread0",
124# "thread-id":3134
125# },
126# {
127# "id":"iothread1",
128# "thread-id":3135
129# }
130# ]
131# }
132#
133##
a87706c8
IM
134{ 'command': 'query-iothreads', 'returns': ['IOThreadInfo'],
135 'allow-preconfig': true }
112ed241 136
112ed241
MA
137##
138# @stop:
139#
140# Stop all guest VCPU execution.
141#
23e46452 142# Since: 0.14
112ed241 143#
26ec4e53
PM
144# Notes: This function will succeed even if the guest is already in the stopped
145# state. In "inmigrate" state, it will ensure that the guest
146# remains paused once migration finishes, as if the -S option was
147# passed on the command line.
112ed241
MA
148#
149# Example:
150#
151# -> { "execute": "stop" }
152# <- { "return": {} }
153#
154##
155{ 'command': 'stop' }
156
112ed241
MA
157##
158# @cont:
159#
160# Resume guest VCPU execution.
161#
23e46452 162# Since: 0.14
112ed241 163#
23e46452 164# Returns: If successful, nothing
112ed241 165#
26ec4e53
PM
166# Notes: This command will succeed if the guest is currently running. It
167# will also succeed if the guest is in the "inmigrate" state; in
168# this case, the effect of the command is to make sure the guest
169# starts once migration finishes, removing the effect of the -S
170# command line option if it was passed.
112ed241
MA
171#
172# Example:
173#
174# -> { "execute": "cont" }
175# <- { "return": {} }
176#
177##
178{ 'command': 'cont' }
179
047f7038 180##
361ac948 181# @x-exit-preconfig:
047f7038
IM
182#
183# Exit from "preconfig" state
184#
185# This command makes QEMU exit the preconfig state and proceed with
186# VM initialization using configuration data provided on the command line
187# and via the QMP monitor during the preconfig state. The command is only
188# available during the preconfig state (i.e. when the --preconfig command
189# line option was in use).
190#
9fb49daa
MA
191# Features:
192# @unstable: This command is experimental.
193#
433a4fdc 194# Since: 3.0
047f7038
IM
195#
196# Returns: nothing
197#
198# Example:
199#
361ac948 200# -> { "execute": "x-exit-preconfig" }
047f7038
IM
201# <- { "return": {} }
202#
203##
9fb49daa
MA
204{ 'command': 'x-exit-preconfig', 'allow-preconfig': true,
205 'features': [ 'unstable' ] }
047f7038 206
112ed241
MA
207##
208# @human-monitor-command:
209#
210# Execute a command on the human monitor and return the output.
211#
212# @command-line: the command to execute in the human monitor
213#
214# @cpu-index: The CPU to use for commands that require an implicit CPU
215#
5f76a7aa
PK
216# Features:
217# @savevm-monitor-nodes: If present, HMP command savevm only snapshots
218# monitor-owned nodes if they have no parents.
219# This allows the use of 'savevm' with
220# -blockdev. (since 4.2)
221#
112ed241
MA
222# Returns: the output of the command as a string
223#
9bc6e893 224# Since: 0.14
112ed241
MA
225#
226# Notes: This command only exists as a stop-gap. Its use is highly
227# discouraged. The semantics of this command are not
228# guaranteed: this means that command names, arguments and
229# responses can change or be removed at ANY time. Applications
230# that rely on long term stability guarantees should NOT
231# use this command.
232#
233# Known limitations:
234#
235# * This command is stateless, this means that commands that depend
236# on state information (such as getfd) might not work
237#
238# * Commands that prompt the user for data don't currently work
239#
240# Example:
241#
242# -> { "execute": "human-monitor-command",
243# "arguments": { "command-line": "info kvm" } }
244# <- { "return": "kvm support: enabled\r\n" }
245#
246##
247{ 'command': 'human-monitor-command',
248 'data': {'command-line': 'str', '*cpu-index': 'int'},
5f76a7aa
PK
249 'returns': 'str',
250 'features': [ 'savevm-monitor-nodes' ] }
112ed241 251
112ed241
MA
252##
253# @getfd:
254#
255# Receive a file descriptor via SCM rights and assign it a name
256#
257# @fdname: file descriptor name
258#
259# Returns: Nothing on success
260#
9bc6e893 261# Since: 0.14
112ed241
MA
262#
263# Notes: If @fdname already exists, the file descriptor assigned to
264# it will be closed and replaced by the received file
265# descriptor.
266#
267# The 'closefd' command can be used to explicitly close the
268# file descriptor when it is no longer needed.
269#
270# Example:
271#
272# -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
273# <- { "return": {} }
274#
275##
276{ 'command': 'getfd', 'data': {'fdname': 'str'} }
277
4cda177c
MAL
278##
279# @get-win32-socket:
280#
281# Add a socket that was duplicated to QEMU process with
282# WSADuplicateSocketW() via WSASocket() & WSAPROTOCOL_INFOW structure
283# and assign it a name (the SOCKET is associated with a CRT file
284# descriptor)
285#
286# @info: the WSAPROTOCOL_INFOW structure (encoded in base64)
287#
288# @fdname: file descriptor name
289#
290# Returns: Nothing on success
291#
292# Since: 8.0
293#
294# Notes: If @fdname already exists, the file descriptor assigned to
295# it will be closed and replaced by the received file
296# descriptor.
297#
298# The 'closefd' command can be used to explicitly close the
299# file descriptor when it is no longer needed.
300#
301# Example:
302#
303# -> { "execute": "get-win32-socket", "arguments": { "info": "abcd123..", fdname": "skclient" } }
304# <- { "return": {} }
305#
306##
307{ 'command': 'get-win32-socket', 'data': {'info': 'str', 'fdname': 'str'}, 'if': 'CONFIG_WIN32' }
308
112ed241
MA
309##
310# @closefd:
311#
312# Close a file descriptor previously passed via SCM rights
313#
314# @fdname: file descriptor name
315#
316# Returns: Nothing on success
317#
9bc6e893 318# Since: 0.14
112ed241
MA
319#
320# Example:
321#
322# -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
323# <- { "return": {} }
324#
325##
326{ 'command': 'closefd', 'data': {'fdname': 'str'} }
327
112ed241
MA
328##
329# @AddfdInfo:
330#
331# Information about a file descriptor that was added to an fd set.
332#
333# @fdset-id: The ID of the fd set that @fd was added to.
334#
335# @fd: The file descriptor that was received via SCM rights and
336# added to the fd set.
337#
9bc6e893 338# Since: 1.2
112ed241
MA
339##
340{ 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
341
342##
343# @add-fd:
344#
345# Add a file descriptor, that was passed via SCM rights, to an fd set.
346#
347# @fdset-id: The ID of the fd set to add the file descriptor to.
348#
349# @opaque: A free-form string that can be used to describe the fd.
350#
e050e426
PM
351# Returns: - @AddfdInfo on success
352# - If file descriptor was not received, FdNotSupplied
353# - If @fdset-id is a negative value, InvalidParameterValue
112ed241
MA
354#
355# Notes: The list of fd sets is shared by all monitor connections.
356#
357# If @fdset-id is not specified, a new fd set will be created.
358#
9bc6e893 359# Since: 1.2
112ed241
MA
360#
361# Example:
362#
363# -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
364# <- { "return": { "fdset-id": 1, "fd": 3 } }
365#
366##
b0ddeba2
MAL
367{ 'command': 'add-fd',
368 'data': { '*fdset-id': 'int',
369 '*opaque': 'str' },
112ed241
MA
370 'returns': 'AddfdInfo' }
371
372##
373# @remove-fd:
374#
375# Remove a file descriptor from an fd set.
376#
377# @fdset-id: The ID of the fd set that the file descriptor belongs to.
378#
379# @fd: The file descriptor that is to be removed.
380#
e050e426
PM
381# Returns: - Nothing on success
382# - If @fdset-id or @fd is not found, FdNotFound
112ed241 383#
9bc6e893 384# Since: 1.2
112ed241
MA
385#
386# Notes: The list of fd sets is shared by all monitor connections.
387#
388# If @fd is not specified, all file descriptors in @fdset-id
389# will be removed.
390#
391# Example:
392#
393# -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
394# <- { "return": {} }
395#
396##
397{ 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
398
399##
400# @FdsetFdInfo:
401#
402# Information about a file descriptor that belongs to an fd set.
403#
404# @fd: The file descriptor value.
405#
406# @opaque: A free-form string that can be used to describe the fd.
407#
9bc6e893 408# Since: 1.2
112ed241
MA
409##
410{ 'struct': 'FdsetFdInfo',
411 'data': {'fd': 'int', '*opaque': 'str'} }
412
413##
414# @FdsetInfo:
415#
416# Information about an fd set.
417#
418# @fdset-id: The ID of the fd set.
419#
420# @fds: A list of file descriptors that belong to this fd set.
421#
9bc6e893 422# Since: 1.2
112ed241
MA
423##
424{ 'struct': 'FdsetInfo',
425 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
426
427##
428# @query-fdsets:
429#
430# Return information describing all fd sets.
431#
432# Returns: A list of @FdsetInfo
433#
9bc6e893 434# Since: 1.2
112ed241
MA
435#
436# Note: The list of fd sets is shared by all monitor connections.
437#
438# Example:
439#
440# -> { "execute": "query-fdsets" }
441# <- { "return": [
442# {
443# "fds": [
444# {
445# "fd": 30,
446# "opaque": "rdonly:/path/to/file"
447# },
448# {
449# "fd": 24,
450# "opaque": "rdwr:/path/to/file"
451# }
452# ],
453# "fdset-id": 1
454# },
455# {
456# "fds": [
457# {
458# "fd": 28
459# },
460# {
461# "fd": 29
462# }
463# ],
464# "fdset-id": 0
465# }
466# ]
467# }
468#
469##
470{ 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
471
112ed241
MA
472##
473# @CommandLineParameterType:
474#
475# Possible types for an option parameter.
476#
477# @string: accepts a character string
478#
479# @boolean: accepts "on" or "off"
480#
481# @number: accepts a number
482#
483# @size: accepts a number followed by an optional suffix (K)ilo,
484# (M)ega, (G)iga, (T)era
485#
486# Since: 1.5
487##
488{ 'enum': 'CommandLineParameterType',
489 'data': ['string', 'boolean', 'number', 'size'] }
490
491##
492# @CommandLineParameterInfo:
493#
494# Details about a single parameter of a command line option.
495#
496# @name: parameter name
497#
498# @type: parameter @CommandLineParameterType
499#
500# @help: human readable text string, not suitable for parsing.
501#
502# @default: default value string (since 2.1)
503#
504# Since: 1.5
505##
506{ 'struct': 'CommandLineParameterInfo',
507 'data': { 'name': 'str',
508 'type': 'CommandLineParameterType',
509 '*help': 'str',
510 '*default': 'str' } }
511
512##
513# @CommandLineOptionInfo:
514#
515# Details about a command line option, including its list of parameter details
516#
517# @option: option name
518#
519# @parameters: an array of @CommandLineParameterInfo
520#
521# Since: 1.5
522##
523{ 'struct': 'CommandLineOptionInfo',
524 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
525
526##
527# @query-command-line-options:
528#
529# Query command line option schema.
530#
531# @option: option name
532#
533# Returns: list of @CommandLineOptionInfo for all options (or for the given
534# @option). Returns an error if the given @option doesn't exist.
535#
536# Since: 1.5
537#
538# Example:
539#
540# -> { "execute": "query-command-line-options",
541# "arguments": { "option": "option-rom" } }
542# <- { "return": [
543# {
544# "parameters": [
545# {
546# "name": "romfile",
547# "type": "string"
548# },
549# {
550# "name": "bootindex",
551# "type": "number"
552# }
553# ],
554# "option": "option-rom"
555# }
556# ]
557# }
558#
559##
b0ddeba2
MAL
560{'command': 'query-command-line-options',
561 'data': { '*option': 'str' },
d6fe3d02
IM
562 'returns': ['CommandLineOptionInfo'],
563 'allow-preconfig': true }
1f216b8c
PM
564
565##
566# @RTC_CHANGE:
567#
568# Emitted when the guest changes the RTC time.
569#
e67e3a48
PM
570# @offset: offset in seconds between base RTC clock (as specified
571# by -rtc base), and new RTC clock value
1f216b8c 572#
2beb1e5f
MA
573# @qom-path: path to the RTC object in the QOM tree
574#
1f216b8c 575# Note: This event is rate-limited.
e67e3a48
PM
576# It is not guaranteed that the RTC in the system implements
577# this event, or even that the system has an RTC at all.
1f216b8c
PM
578#
579# Since: 0.13
580#
581# Example:
582#
583# <- { "event": "RTC_CHANGE",
584# "data": { "offset": 78 },
585# "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
586#
587##
588{ 'event': 'RTC_CHANGE',
2beb1e5f 589 'data': { 'offset': 'int', 'qom-path': 'str' } }
9fb3fba1
JR
590
591##
592# @VFU_CLIENT_HANGUP:
593#
594# Emitted when the client of a TYPE_VFIO_USER_SERVER closes the
595# communication channel
596#
597# @vfu-id: ID of the TYPE_VFIO_USER_SERVER object. It is the last component
598# of @vfu-qom-path referenced below
599#
600# @vfu-qom-path: path to the TYPE_VFIO_USER_SERVER object in the QOM tree
601#
602# @dev-id: ID of attached PCI device
603#
604# @dev-qom-path: path to attached PCI device in the QOM tree
605#
606# Since: 7.1
607#
608# Example:
609#
610# <- { "event": "VFU_CLIENT_HANGUP",
611# "data": { "vfu-id": "vfu1",
612# "vfu-qom-path": "/objects/vfu1",
613# "dev-id": "sas1",
614# "dev-qom-path": "/machine/peripheral/sas1" },
615# "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
616#
617##
618{ 'event': 'VFU_CLIENT_HANGUP',
619 'data': { 'vfu-id': 'str', 'vfu-qom-path': 'str',
620 'dev-id': 'str', 'dev-qom-path': 'str' } }