]> git.ipfire.org Git - thirdparty/qemu.git/blame - qapi-schema.json
qom: introduce object_property_get_enum and object_property_get_uint16List
[thirdparty/qemu.git] / qapi-schema.json
CommitLineData
e3193601
AL
1# -*- Mode: Python -*-
2#
3# QAPI Schema
48a32bed 4
d34bda71
BC
5# QAPI common definitions
6{ 'include': 'qapi/common.json' }
104059da 7
5db15096
BC
8# QAPI block definitions
9{ 'include': 'qapi/block.json' }
10
104059da
PB
11##
12# LostTickPolicy:
13#
14# Policy for handling lost ticks in timer devices.
15#
16# @discard: throw away the missed tick(s) and continue with future injection
17# normally. Guest time may be delayed, unless the OS has explicit
18# handling of lost ticks
19#
20# @delay: continue to deliver ticks at the normal rate. Guest time will be
21# delayed due to the late tick
22#
23# @merge: merge the missed tick(s) into one tick and inject. Guest time
24# may be delayed, depending on how the OS reacts to the merging
25# of ticks
26#
27# @slew: deliver ticks at a higher rate to catch up with the missed tick. The
28# guest time should not be delayed once catchup is complete.
29#
30# Since: 2.0
31##
32{ 'enum': 'LostTickPolicy',
33 'data': ['discard', 'delay', 'merge', 'slew' ] }
34
b224e5e2
LC
35# @add_client
36#
37# Allow client connections for VNC, Spice and socket based
38# character devices to be passed in to QEMU via SCM_RIGHTS.
39#
40# @protocol: protocol name. Valid names are "vnc", "spice" or the
41# name of a character device (eg. from -chardev id=XXXX)
42#
43# @fdname: file descriptor name previously passed via 'getfd' command
44#
45# @skipauth: #optional whether to skip authentication. Only applies
46# to "vnc" and "spice" protocols
47#
48# @tls: #optional whether to perform TLS. Only applies to the "spice"
49# protocol
50#
51# Returns: nothing on success.
52#
53# Since: 0.14.0
54##
55{ 'command': 'add_client',
56 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
57 '*tls': 'bool' } }
58
48a32bed
AL
59##
60# @NameInfo:
61#
62# Guest name information.
63#
64# @name: #optional The name of the guest
65#
66# Since 0.14.0
67##
68{ 'type': 'NameInfo', 'data': {'*name': 'str'} }
69
70##
71# @query-name:
72#
73# Return the name information of a guest.
74#
75# Returns: @NameInfo of the guest
76#
77# Since 0.14.0
78##
79{ 'command': 'query-name', 'returns': 'NameInfo' }
b9c15f16 80
292a2602
LC
81##
82# @KvmInfo:
83#
84# Information about support for KVM acceleration
85#
86# @enabled: true if KVM acceleration is active
87#
88# @present: true if KVM acceleration is built into this executable
89#
90# Since: 0.14.0
91##
92{ 'type': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
93
94##
95# @query-kvm:
96#
97# Returns information about KVM acceleration
98#
99# Returns: @KvmInfo
100#
101# Since: 0.14.0
102##
103{ 'command': 'query-kvm', 'returns': 'KvmInfo' }
104
1fa9a5e4
LC
105##
106# @RunState
107#
6932a69b 108# An enumeration of VM run states.
1fa9a5e4
LC
109#
110# @debug: QEMU is running on a debugger
111#
0a24c7b1
LC
112# @finish-migrate: guest is paused to finish the migration process
113#
1e998146
PB
114# @inmigrate: guest is paused waiting for an incoming migration. Note
115# that this state does not tell whether the machine will start at the
116# end of the migration. This depends on the command-line -S option and
117# any invocation of 'stop' or 'cont' that has happened since QEMU was
118# started.
1fa9a5e4
LC
119#
120# @internal-error: An internal error that prevents further guest execution
121# has occurred
122#
123# @io-error: the last IOP has failed and the device is configured to pause
124# on I/O errors
125#
126# @paused: guest has been paused via the 'stop' command
127#
128# @postmigrate: guest is paused following a successful 'migrate'
129#
130# @prelaunch: QEMU was started with -S and guest has not started
131#
1fa9a5e4
LC
132# @restore-vm: guest is paused to restore VM state
133#
134# @running: guest is actively running
135#
136# @save-vm: guest is paused to save the VM state
137#
138# @shutdown: guest is shut down (and -no-shutdown is in use)
139#
ad02b96a
LC
140# @suspended: guest is suspended (ACPI S3)
141#
1fa9a5e4 142# @watchdog: the watchdog action is configured to pause and has been triggered
ede085b3
HT
143#
144# @guest-panicked: guest has been panicked as a result of guest OS panic
1fa9a5e4
LC
145##
146{ 'enum': 'RunState',
147 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
148 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
ede085b3
HT
149 'running', 'save-vm', 'shutdown', 'suspended', 'watchdog',
150 'guest-panicked' ] }
1fa9a5e4
LC
151
152##
153# @StatusInfo:
154#
155# Information about VCPU run state
156#
157# @running: true if all VCPUs are runnable, false if not runnable
158#
159# @singlestep: true if VCPUs are in single-step mode
160#
161# @status: the virtual machine @RunState
162#
163# Since: 0.14.0
164#
165# Notes: @singlestep is enabled through the GDB stub
166##
167{ 'type': 'StatusInfo',
168 'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
169
170##
171# @query-status:
172#
173# Query the run status of all VCPUs
174#
175# Returns: @StatusInfo reflecting all VCPUs
176#
177# Since: 0.14.0
178##
179{ 'command': 'query-status', 'returns': 'StatusInfo' }
180
efab767e
LC
181##
182# @UuidInfo:
183#
184# Guest UUID information.
185#
186# @UUID: the UUID of the guest
187#
188# Since: 0.14.0
189#
190# Notes: If no UUID was specified for the guest, a null UUID is returned.
191##
192{ 'type': 'UuidInfo', 'data': {'UUID': 'str'} }
193
194##
195# @query-uuid:
196#
197# Query the guest UUID information.
198#
199# Returns: The @UuidInfo for the guest
200#
201# Since 0.14.0
202##
203{ 'command': 'query-uuid', 'returns': 'UuidInfo' }
204
c5a415a0
LC
205##
206# @ChardevInfo:
207#
208# Information about a character device.
209#
210# @label: the label of the character device
211#
212# @filename: the filename of the character device
213#
214# Notes: @filename is encoded using the QEMU command line character device
215# encoding. See the QEMU man page for details.
216#
217# Since: 0.14.0
218##
219{ 'type': 'ChardevInfo', 'data': {'label': 'str', 'filename': 'str'} }
220
221##
222# @query-chardev:
223#
224# Returns information about current character devices.
225#
226# Returns: a list of @ChardevInfo
227#
228# Since: 0.14.0
229##
230{ 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
aa9b79bc 231
77d1c3c6
MK
232##
233# @ChardevBackendInfo:
234#
235# Information about a character device backend
236#
237# @name: The backend name
238#
239# Since: 2.0
240##
241{ 'type': 'ChardevBackendInfo', 'data': {'name': 'str'} }
242
243##
244# @query-chardev-backends:
245#
246# Returns information about character device backends.
247#
248# Returns: a list of @ChardevBackendInfo
249#
250# Since: 2.0
251##
252{ 'command': 'query-chardev-backends', 'returns': ['ChardevBackendInfo'] }
253
1f590cf9
LL
254##
255# @DataFormat:
256#
257# An enumeration of data format.
258#
3949e594 259# @utf8: Data is a UTF-8 string (RFC 3629)
1f590cf9 260#
3949e594 261# @base64: Data is Base64 encoded binary (RFC 3548)
1f590cf9
LL
262#
263# Since: 1.4
264##
ad0f171e 265{ 'enum': 'DataFormat',
1f590cf9
LL
266 'data': [ 'utf8', 'base64' ] }
267
268##
3949e594 269# @ringbuf-write:
1f590cf9 270#
3949e594 271# Write to a ring buffer character device.
1f590cf9 272#
3949e594 273# @device: the ring buffer character device name
1f590cf9 274#
3949e594 275# @data: data to write
1f590cf9 276#
3949e594
MA
277# @format: #optional data encoding (default 'utf8').
278# - base64: data must be base64 encoded text. Its binary
279# decoding gets written.
280# Bug: invalid base64 is currently not rejected.
281# Whitespace *is* invalid.
282# - utf8: data's UTF-8 encoding is written
283# - data itself is always Unicode regardless of format, like
284# any other string.
1f590cf9
LL
285#
286# Returns: Nothing on success
1f590cf9
LL
287#
288# Since: 1.4
289##
3949e594 290{ 'command': 'ringbuf-write',
82e59a67 291 'data': {'device': 'str', 'data': 'str',
1f590cf9
LL
292 '*format': 'DataFormat'} }
293
49b6d722 294##
3949e594 295# @ringbuf-read:
49b6d722 296#
3949e594 297# Read from a ring buffer character device.
49b6d722 298#
3949e594 299# @device: the ring buffer character device name
49b6d722 300#
3949e594 301# @size: how many bytes to read at most
49b6d722 302#
3949e594
MA
303# @format: #optional data encoding (default 'utf8').
304# - base64: the data read is returned in base64 encoding.
305# - utf8: the data read is interpreted as UTF-8.
306# Bug: can screw up when the buffer contains invalid UTF-8
307# sequences, NUL characters, after the ring buffer lost
308# data, and when reading stops because the size limit is
309# reached.
310# - The return value is always Unicode regardless of format,
311# like any other string.
49b6d722 312#
3ab651fc 313# Returns: data read from the device
49b6d722
LL
314#
315# Since: 1.4
316##
3949e594 317{ 'command': 'ringbuf-read',
49b6d722 318 'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'},
3ab651fc 319 'returns': 'str' }
49b6d722 320
4860853d
DB
321##
322# @EventInfo:
323#
324# Information about a QMP event
325#
326# @name: The event name
327#
328# Since: 1.2.0
329##
330{ 'type': 'EventInfo', 'data': {'name': 'str'} }
331
332##
333# @query-events:
334#
335# Return a list of supported QMP events by this server
336#
337# Returns: A list of @EventInfo for all supported events
338#
339# Since: 1.2.0
340##
341{ 'command': 'query-events', 'returns': ['EventInfo'] }
342
791e7c82
LC
343##
344# @MigrationStats
345#
346# Detailed migration status.
347#
348# @transferred: amount of bytes already transferred to the target VM
349#
350# @remaining: amount of bytes remaining to be transferred to the target VM
351#
352# @total: total amount of bytes involved in the migration process
353#
f1c72795
PL
354# @duplicate: number of duplicate (zero) pages (since 1.2)
355#
356# @skipped: number of skipped zero pages (since 1.5)
004d4c10
OW
357#
358# @normal : number of normal pages (since 1.2)
359#
8d017193
JQ
360# @normal-bytes: number of normal bytes sent (since 1.2)
361#
362# @dirty-pages-rate: number of pages dirtied by second by the
363# guest (since 1.3)
004d4c10 364#
7e114f8c
MH
365# @mbps: throughput in megabits/sec. (since 1.6)
366#
58570ed8
C
367# @dirty-sync-count: number of times that dirty ram was synchronized (since 2.1)
368#
004d4c10 369# Since: 0.14.0
791e7c82
LC
370##
371{ 'type': 'MigrationStats',
d5f8a570 372 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
f1c72795 373 'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
7e114f8c 374 'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
58570ed8 375 'mbps' : 'number', 'dirty-sync-count' : 'int' } }
791e7c82 376
f36d55af
OW
377##
378# @XBZRLECacheStats
379#
380# Detailed XBZRLE migration cache statistics
381#
382# @cache-size: XBZRLE cache size
383#
384# @bytes: amount of bytes already transferred to the target VM
385#
386# @pages: amount of pages transferred to the target VM
387#
388# @cache-miss: number of cache miss
389#
8bc39233
C
390# @cache-miss-rate: rate of cache miss (since 2.1)
391#
f36d55af
OW
392# @overflow: number of overflows
393#
394# Since: 1.2
395##
396{ 'type': 'XBZRLECacheStats',
397 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
8bc39233
C
398 'cache-miss': 'int', 'cache-miss-rate': 'number',
399 'overflow': 'int' } }
f36d55af 400
791e7c82
LC
401##
402# @MigrationInfo
403#
404# Information about current migration process.
405#
406# @status: #optional string describing the current migration status.
3b695950 407# As of 0.14.0 this can be 'setup', 'active', 'completed', 'failed' or
791e7c82
LC
408# 'cancelled'. If this field is not returned, no migration process
409# has been initiated
410#
d5f8a570
JQ
411# @ram: #optional @MigrationStats containing detailed migration
412# status, only returned if status is 'active' or
413# 'completed'. 'comppleted' (since 1.2)
791e7c82
LC
414#
415# @disk: #optional @MigrationStats containing detailed disk migration
416# status, only returned if status is 'active' and it is a block
417# migration
418#
f36d55af
OW
419# @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE
420# migration statistics, only returned if XBZRLE feature is on and
421# status is 'active' or 'completed' (since 1.2)
422#
7aa939af
JQ
423# @total-time: #optional total amount of milliseconds since migration started.
424# If migration has ended, it returns the total migration
425# time. (since 1.2)
426#
9c5a9fcf
JQ
427# @downtime: #optional only present when migration finishes correctly
428# total downtime in milliseconds for the guest.
429# (since 1.3)
430#
2c52ddf1
JQ
431# @expected-downtime: #optional only present while migration is active
432# expected downtime in milliseconds for the guest in last walk
433# of the dirty bitmap. (since 1.3)
434#
ed4fbd10
MH
435# @setup-time: #optional amount of setup time in milliseconds _before_ the
436# iterations begin but _after_ the QMP command is issued. This is designed
437# to provide an accounting of any activities (such as RDMA pinning) which
438# may be expensive, but do not actually occur during the iterative
439# migration rounds themselves. (since 1.6)
440#
791e7c82
LC
441# Since: 0.14.0
442##
443{ 'type': 'MigrationInfo',
444 'data': {'*status': 'str', '*ram': 'MigrationStats',
f36d55af 445 '*disk': 'MigrationStats',
7aa939af 446 '*xbzrle-cache': 'XBZRLECacheStats',
9c5a9fcf 447 '*total-time': 'int',
2c52ddf1 448 '*expected-downtime': 'int',
ed4fbd10
MH
449 '*downtime': 'int',
450 '*setup-time': 'int'} }
791e7c82
LC
451
452##
453# @query-migrate
454#
455# Returns information about current migration process.
456#
457# Returns: @MigrationInfo
458#
459# Since: 0.14.0
460##
461{ 'command': 'query-migrate', 'returns': 'MigrationInfo' }
462
bbf6da32
OW
463##
464# @MigrationCapability
465#
466# Migration capabilities enumeration
467#
468# @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
469# This feature allows us to minimize migration traffic for certain work
470# loads, by sending compressed difference of the pages
471#
41310c68 472# @rdma-pin-all: Controls whether or not the entire VM memory footprint is
60d9222c 473# mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
41310c68 474# Disabled by default. (since 2.0)
60d9222c 475#
323004a3
PL
476# @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
477# essentially saves 1MB of zeroes per block on the wire. Enabling requires
478# source and target VM to support this feature. To enable it is sufficient
479# to enable the capability on the source VM. The feature is disabled by
480# default. (since 1.6)
481#
9781c371
JQ
482# @auto-converge: If enabled, QEMU will automatically throttle down the guest
483# to speed up convergence of RAM migration. (since 1.6)
484#
bbf6da32
OW
485# Since: 1.2
486##
487{ 'enum': 'MigrationCapability',
41310c68 488 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks'] }
bbf6da32
OW
489
490##
491# @MigrationCapabilityStatus
492#
493# Migration capability information
494#
495# @capability: capability enum
496#
497# @state: capability state bool
498#
499# Since: 1.2
500##
501{ 'type': 'MigrationCapabilityStatus',
502 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
503
504##
00458433
OW
505# @migrate-set-capabilities
506#
507# Enable/Disable the following migration capabilities (like xbzrle)
508#
509# @capabilities: json array of capability modifications to make
510#
511# Since: 1.2
512##
513{ 'command': 'migrate-set-capabilities',
514 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
515
516##
bbf6da32
OW
517# @query-migrate-capabilities
518#
519# Returns information about the current migration capabilities status
520#
521# Returns: @MigrationCapabilitiesStatus
522#
523# Since: 1.2
524##
525{ 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
526
e235cec3
LC
527##
528# @MouseInfo:
529#
530# Information about a mouse device.
531#
532# @name: the name of the mouse device
533#
534# @index: the index of the mouse device
535#
536# @current: true if this device is currently receiving mouse events
537#
538# @absolute: true if this device supports absolute coordinates as input
539#
540# Since: 0.14.0
541##
542{ 'type': 'MouseInfo',
543 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
544 'absolute': 'bool'} }
545
546##
547# @query-mice:
548#
549# Returns information about each active mouse device
550#
551# Returns: a list of @MouseInfo for each device
552#
553# Since: 0.14.0
554##
555{ 'command': 'query-mice', 'returns': ['MouseInfo'] }
556
de0b36b6
LC
557##
558# @CpuInfo:
559#
560# Information about a virtual CPU
561#
562# @CPU: the index of the virtual CPU
563#
564# @current: this only exists for backwards compatible and should be ignored
b80e560b 565#
de0b36b6
LC
566# @halted: true if the virtual CPU is in the halt state. Halt usually refers
567# to a processor specific low power mode.
568#
569# @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
570# pointer.
571# If the target is Sparc, this is the PC component of the
572# instruction pointer.
573#
574# @nip: #optional If the target is PPC, the instruction pointer
575#
576# @npc: #optional If the target is Sparc, the NPC component of the instruction
577# pointer
578#
579# @PC: #optional If the target is MIPS, the instruction pointer
580#
581# @thread_id: ID of the underlying host thread
582#
583# Since: 0.14.0
584#
585# Notes: @halted is a transient state that changes frequently. By the time the
586# data is sent to the client, the guest may no longer be halted.
587##
588{ 'type': 'CpuInfo',
589 'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
590 '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
591
592##
593# @query-cpus:
594#
595# Returns a list of information about each virtual CPU.
596#
597# Returns: a list of @CpuInfo for each virtual CPU
598#
599# Since: 0.14.0
600##
601{ 'command': 'query-cpus', 'returns': ['CpuInfo'] }
602
dc3dd0d2
SH
603##
604# @IOThreadInfo:
605#
606# Information about an iothread
607#
608# @id: the identifier of the iothread
609#
610# @thread-id: ID of the underlying host thread
611#
612# Since: 2.0
613##
614{ 'type': 'IOThreadInfo',
615 'data': {'id': 'str', 'thread-id': 'int'} }
616
617##
618# @query-iothreads:
619#
620# Returns a list of information about each iothread.
621#
622# Note this list excludes the QEMU main loop thread, which is not declared
623# using the -object iothread command-line option. It is always the main thread
624# of the process.
625#
626# Returns: a list of @IOThreadInfo for each iothread
627#
628# Since: 2.0
629##
630{ 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] }
631
2b54aa87
LC
632##
633# @VncClientInfo:
634#
635# Information about a connected VNC client.
636#
637# @host: The host name of the client. QEMU tries to resolve this to a DNS name
638# when possible.
639#
640# @family: 'ipv6' if the client is connected via IPv6 and TCP
641# 'ipv4' if the client is connected via IPv4 and TCP
642# 'unix' if the client is connected via a unix domain socket
643# 'unknown' otherwise
644#
645# @service: The service name of the client's port. This may depends on the
646# host system's service database so symbolic names should not be
647# relied on.
648#
649# @x509_dname: #optional If x509 authentication is in use, the Distinguished
650# Name of the client.
651#
652# @sasl_username: #optional If SASL authentication is in use, the SASL username
653# used for authentication.
654#
655# Since: 0.14.0
656##
657{ 'type': 'VncClientInfo',
658 'data': {'host': 'str', 'family': 'str', 'service': 'str',
659 '*x509_dname': 'str', '*sasl_username': 'str'} }
660
661##
662# @VncInfo:
663#
664# Information about the VNC session.
665#
666# @enabled: true if the VNC server is enabled, false otherwise
667#
668# @host: #optional The hostname the VNC server is bound to. This depends on
669# the name resolution on the host and may be an IP address.
670#
671# @family: #optional 'ipv6' if the host is listening for IPv6 connections
672# 'ipv4' if the host is listening for IPv4 connections
673# 'unix' if the host is listening on a unix domain socket
674# 'unknown' otherwise
675#
676# @service: #optional The service name of the server's port. This may depends
677# on the host system's service database so symbolic names should not
678# be relied on.
679#
680# @auth: #optional the current authentication type used by the server
681# 'none' if no authentication is being used
682# 'vnc' if VNC authentication is being used
683# 'vencrypt+plain' if VEncrypt is used with plain text authentication
684# 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
685# 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
686# 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
687# 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
688# 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
689# 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
690# 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
691# 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
692#
693# @clients: a list of @VncClientInfo of all currently connected clients
694#
695# Since: 0.14.0
696##
697{ 'type': 'VncInfo',
698 'data': {'enabled': 'bool', '*host': 'str', '*family': 'str',
699 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
700
701##
702# @query-vnc:
703#
704# Returns information about the current VNC server
705#
706# Returns: @VncInfo
2b54aa87
LC
707#
708# Since: 0.14.0
709##
710{ 'command': 'query-vnc', 'returns': 'VncInfo' }
711
d1f29646
LC
712##
713# @SpiceChannel
714#
715# Information about a SPICE client channel.
716#
717# @host: The host name of the client. QEMU tries to resolve this to a DNS name
718# when possible.
719#
720# @family: 'ipv6' if the client is connected via IPv6 and TCP
721# 'ipv4' if the client is connected via IPv4 and TCP
722# 'unix' if the client is connected via a unix domain socket
723# 'unknown' otherwise
724#
725# @port: The client's port number.
726#
727# @connection-id: SPICE connection id number. All channels with the same id
728# belong to the same SPICE session.
729#
419e1bdf
AL
730# @connection-type: SPICE channel type number. "1" is the main control
731# channel, filter for this one if you want to track spice
732# sessions only
d1f29646 733#
419e1bdf
AL
734# @channel-id: SPICE channel ID number. Usually "0", might be different when
735# multiple channels of the same type exist, such as multiple
d1f29646
LC
736# display channels in a multihead setup
737#
738# @tls: true if the channel is encrypted, false otherwise.
739#
740# Since: 0.14.0
741##
742{ 'type': 'SpiceChannel',
743 'data': {'host': 'str', 'family': 'str', 'port': 'str',
744 'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
745 'tls': 'bool'} }
746
4efee029
AL
747##
748# @SpiceQueryMouseMode
749#
6932a69b 750# An enumeration of Spice mouse states.
4efee029
AL
751#
752# @client: Mouse cursor position is determined by the client.
753#
754# @server: Mouse cursor position is determined by the server.
755#
756# @unknown: No information is available about mouse mode used by
757# the spice server.
758#
759# Note: spice/enums.h has a SpiceMouseMode already, hence the name.
760#
761# Since: 1.1
762##
763{ 'enum': 'SpiceQueryMouseMode',
764 'data': [ 'client', 'server', 'unknown' ] }
765
d1f29646
LC
766##
767# @SpiceInfo
768#
769# Information about the SPICE session.
b80e560b 770#
d1f29646
LC
771# @enabled: true if the SPICE server is enabled, false otherwise
772#
61c4efe2
YH
773# @migrated: true if the last guest migration completed and spice
774# migration had completed as well. false otherwise.
775#
d1f29646
LC
776# @host: #optional The hostname the SPICE server is bound to. This depends on
777# the name resolution on the host and may be an IP address.
778#
779# @port: #optional The SPICE server's port number.
780#
781# @compiled-version: #optional SPICE server version.
782#
783# @tls-port: #optional The SPICE server's TLS port number.
784#
785# @auth: #optional the current authentication type used by the server
419e1bdf
AL
786# 'none' if no authentication is being used
787# 'spice' uses SASL or direct TLS authentication, depending on command
788# line options
d1f29646 789#
4efee029
AL
790# @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
791# be determined by the client or the server, or unknown if spice
792# server doesn't provide this information.
793#
794# Since: 1.1
795#
d1f29646
LC
796# @channels: a list of @SpiceChannel for each active spice channel
797#
798# Since: 0.14.0
799##
800{ 'type': 'SpiceInfo',
61c4efe2 801 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
d1f29646 802 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
4efee029 803 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
d1f29646
LC
804
805##
806# @query-spice
807#
808# Returns information about the current SPICE server
809#
810# Returns: @SpiceInfo
811#
812# Since: 0.14.0
813##
814{ 'command': 'query-spice', 'returns': 'SpiceInfo' }
815
96637bcd
LC
816##
817# @BalloonInfo:
818#
819# Information about the guest balloon device.
820#
821# @actual: the number of bytes the balloon currently contains
822#
96637bcd
LC
823# Since: 0.14.0
824#
96637bcd 825##
01ceb97e 826{ 'type': 'BalloonInfo', 'data': {'actual': 'int' } }
96637bcd
LC
827
828##
829# @query-balloon:
830#
831# Return information about the balloon device.
832#
833# Returns: @BalloonInfo on success
834# If the balloon driver is enabled but not functional because the KVM
835# kernel module cannot support it, KvmMissingCap
836# If no balloon device is present, DeviceNotActive
837#
838# Since: 0.14.0
839##
840{ 'command': 'query-balloon', 'returns': 'BalloonInfo' }
841
79627472
LC
842##
843# @PciMemoryRange:
844#
845# A PCI device memory region
846#
847# @base: the starting address (guest physical)
848#
849# @limit: the ending address (guest physical)
850#
851# Since: 0.14.0
852##
853{ 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
854
855##
856# @PciMemoryRegion
857#
858# Information about a PCI device I/O region.
859#
860# @bar: the index of the Base Address Register for this region
861#
862# @type: 'io' if the region is a PIO region
863# 'memory' if the region is a MMIO region
864#
865# @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
866#
867# @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
868#
869# Since: 0.14.0
870##
871{ 'type': 'PciMemoryRegion',
872 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
873 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
874
875##
876# @PciBridgeInfo:
877#
878# Information about a PCI Bridge device
879#
880# @bus.number: primary bus interface number. This should be the number of the
881# bus the device resides on.
882#
883# @bus.secondary: secondary bus interface number. This is the number of the
884# main bus for the bridge
885#
886# @bus.subordinate: This is the highest number bus that resides below the
887# bridge.
888#
889# @bus.io_range: The PIO range for all devices on this bridge
890#
891# @bus.memory_range: The MMIO range for all devices on this bridge
892#
893# @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
894# this bridge
895#
896# @devices: a list of @PciDeviceInfo for each device on this bridge
897#
898# Since: 0.14.0
899##
900{ 'type': 'PciBridgeInfo',
901 'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
902 'io_range': 'PciMemoryRange',
903 'memory_range': 'PciMemoryRange',
904 'prefetchable_range': 'PciMemoryRange' },
905 '*devices': ['PciDeviceInfo']} }
906
907##
908# @PciDeviceInfo:
909#
910# Information about a PCI device
911#
912# @bus: the bus number of the device
913#
914# @slot: the slot the device is located in
915#
916# @function: the function of the slot used by the device
917#
918# @class_info.desc: #optional a string description of the device's class
919#
920# @class_info.class: the class code of the device
921#
922# @id.device: the PCI device id
923#
924# @id.vendor: the PCI vendor id
925#
926# @irq: #optional if an IRQ is assigned to the device, the IRQ number
927#
928# @qdev_id: the device name of the PCI device
929#
930# @pci_bridge: if the device is a PCI bridge, the bridge information
931#
932# @regions: a list of the PCI I/O regions associated with the device
933#
934# Notes: the contents of @class_info.desc are not stable and should only be
935# treated as informational.
936#
937# Since: 0.14.0
938##
939{ 'type': 'PciDeviceInfo',
940 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
941 'class_info': {'*desc': 'str', 'class': 'int'},
942 'id': {'device': 'int', 'vendor': 'int'},
943 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
944 'regions': ['PciMemoryRegion']} }
945
946##
947# @PciInfo:
948#
949# Information about a PCI bus
950#
951# @bus: the bus index
952#
953# @devices: a list of devices on this bus
954#
955# Since: 0.14.0
956##
957{ 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
958
959##
960# @query-pci:
961#
962# Return information about the PCI bus topology of the guest.
963#
964# Returns: a list of @PciInfo for each PCI bus
965#
966# Since: 0.14.0
967##
968{ 'command': 'query-pci', 'returns': ['PciInfo'] }
969
7a7f325e
LC
970##
971# @quit:
972#
973# This command will cause the QEMU process to exit gracefully. While every
974# attempt is made to send the QMP response before terminating, this is not
975# guaranteed. When using this interface, a premature EOF would not be
976# unexpected.
977#
978# Since: 0.14.0
979##
980{ 'command': 'quit' }
5f158f21
LC
981
982##
983# @stop:
984#
985# Stop all guest VCPU execution.
986#
987# Since: 0.14.0
988#
989# Notes: This function will succeed even if the guest is already in the stopped
1e998146
PB
990# state. In "inmigrate" state, it will ensure that the guest
991# remains paused once migration finishes, as if the -S option was
992# passed on the command line.
5f158f21
LC
993##
994{ 'command': 'stop' }
38d22653
LC
995
996##
997# @system_reset:
998#
999# Performs a hard reset of a guest.
1000#
1001# Since: 0.14.0
1002##
1003{ 'command': 'system_reset' }
5bc465e4
LC
1004
1005##
1006# @system_powerdown:
1007#
1008# Requests that a guest perform a powerdown operation.
1009#
1010# Since: 0.14.0
1011#
1012# Notes: A guest may or may not respond to this command. This command
1013# returning does not indicate that a guest has accepted the request or
1014# that it has shut down. Many guests will respond to this command by
1015# prompting the user in some way.
1016##
1017{ 'command': 'system_powerdown' }
755f1968
LC
1018
1019##
1020# @cpu:
1021#
1022# This command is a nop that is only provided for the purposes of compatibility.
1023#
1024# Since: 0.14.0
1025#
1026# Notes: Do not use this command.
1027##
1028{ 'command': 'cpu', 'data': {'index': 'int'} }
0cfd6a9a 1029
69ca3ea5
IM
1030##
1031# @cpu-add
1032#
1033# Adds CPU with specified ID
1034#
1035# @id: ID of CPU to be created, valid values [0..max_cpus)
1036#
1037# Returns: Nothing on success
1038#
1039# Since 1.5
1040##
1041{ 'command': 'cpu-add', 'data': {'id': 'int'} }
1042
0cfd6a9a
LC
1043##
1044# @memsave:
1045#
1046# Save a portion of guest memory to a file.
1047#
1048# @val: the virtual address of the guest to start from
1049#
1050# @size: the size of memory region to save
1051#
1052# @filename: the file to save the memory to as binary data
1053#
1054# @cpu-index: #optional the index of the virtual CPU to use for translating the
1055# virtual address (defaults to CPU 0)
1056#
1057# Returns: Nothing on success
0cfd6a9a
LC
1058#
1059# Since: 0.14.0
1060#
1061# Notes: Errors were not reliably returned until 1.1
1062##
1063{ 'command': 'memsave',
1064 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
6d3962bf
LC
1065
1066##
1067# @pmemsave:
1068#
1069# Save a portion of guest physical memory to a file.
1070#
1071# @val: the physical address of the guest to start from
1072#
1073# @size: the size of memory region to save
1074#
1075# @filename: the file to save the memory to as binary data
1076#
1077# Returns: Nothing on success
6d3962bf
LC
1078#
1079# Since: 0.14.0
1080#
1081# Notes: Errors were not reliably returned until 1.1
1082##
1083{ 'command': 'pmemsave',
1084 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
e42e818b
LC
1085
1086##
1087# @cont:
1088#
1089# Resume guest VCPU execution.
1090#
1091# Since: 0.14.0
1092#
1093# Returns: If successful, nothing
e42e818b
LC
1094# If QEMU was started with an encrypted block device and a key has
1095# not yet been set, DeviceEncrypted.
1096#
1e998146
PB
1097# Notes: This command will succeed if the guest is currently running. It
1098# will also succeed if the guest is in the "inmigrate" state; in
1099# this case, the effect of the command is to make sure the guest
1100# starts once migration finishes, removing the effect of the -S
1101# command line option if it was passed.
e42e818b
LC
1102##
1103{ 'command': 'cont' }
1104
9b9df25a
GH
1105##
1106# @system_wakeup:
1107#
1108# Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
1109#
1110# Since: 1.1
1111#
1112# Returns: nothing.
1113##
1114{ 'command': 'system_wakeup' }
1115
ab49ab5c
LC
1116##
1117# @inject-nmi:
1118#
1119# Injects an Non-Maskable Interrupt into all guest's VCPUs.
1120#
1121# Returns: If successful, nothing
ab49ab5c
LC
1122#
1123# Since: 0.14.0
1124#
1125# Notes: Only x86 Virtual Machines support this command.
1126##
1127{ 'command': 'inject-nmi' }
4b37156c
LC
1128
1129##
1130# @set_link:
1131#
1132# Sets the link status of a virtual network adapter.
1133#
1134# @name: the device name of the virtual network adapter
1135#
1136# @up: true to set the link status to be up
1137#
1138# Returns: Nothing on success
1139# If @name is not a valid network device, DeviceNotFound
1140#
1141# Since: 0.14.0
1142#
1143# Notes: Not all network adapters support setting link status. This command
1144# will succeed even if the network adapter does not support link status
1145# notification.
1146##
1147{ 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
a4dea8a9 1148
d72f3264
LC
1149##
1150# @balloon:
1151#
1152# Request the balloon driver to change its balloon size.
1153#
1154# @value: the target size of the balloon in bytes
1155#
1156# Returns: Nothing on success
1157# If the balloon driver is enabled but not functional because the KVM
1158# kernel module cannot support it, KvmMissingCap
1159# If no balloon device is present, DeviceNotActive
1160#
1161# Notes: This command just issues a request to the guest. When it returns,
1162# the balloon size may not have changed. A guest can change the balloon
1163# size independent of this command.
1164#
1165# Since: 0.14.0
1166##
1167{ 'command': 'balloon', 'data': {'value': 'int'} }
5e7caacb 1168
78b18b78
SH
1169##
1170# @Abort
1171#
1172# This action can be used to test transaction failure.
1173#
1174# Since: 1.6
1175###
1176{ 'type': 'Abort',
1177 'data': { } }
1178
8802d1fd 1179##
c8a83e85 1180# @TransactionAction
8802d1fd 1181#
52e7c241
PB
1182# A discriminated record of operations that can be performed with
1183# @transaction.
8802d1fd 1184##
c8a83e85 1185{ 'union': 'TransactionAction',
52e7c241 1186 'data': {
3037f364 1187 'blockdev-snapshot-sync': 'BlockdevSnapshot',
78b18b78 1188 'drive-backup': 'DriveBackup',
bbe86010
WX
1189 'abort': 'Abort',
1190 'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal'
52e7c241 1191 } }
8802d1fd
JC
1192
1193##
52e7c241 1194# @transaction
8802d1fd 1195#
c8a83e85
KW
1196# Executes a number of transactionable QMP commands atomically. If any
1197# operation fails, then the entire set of actions will be abandoned and the
1198# appropriate error returned.
8802d1fd
JC
1199#
1200# List of:
c8a83e85 1201# @TransactionAction: information needed for the respective operation
8802d1fd
JC
1202#
1203# Returns: nothing on success
c8a83e85 1204# Errors depend on the operations of the transaction
8802d1fd 1205#
c8a83e85
KW
1206# Note: The transaction aborts on the first failure. Therefore, there will be
1207# information on only one failed operation returned in an error condition, and
52e7c241
PB
1208# subsequent actions will not have been attempted.
1209#
1210# Since 1.1
8802d1fd 1211##
52e7c241 1212{ 'command': 'transaction',
c8a83e85 1213 'data': { 'actions': [ 'TransactionAction' ] } }
8802d1fd 1214
d51a67b4
LC
1215##
1216# @human-monitor-command:
1217#
1218# Execute a command on the human monitor and return the output.
1219#
1220# @command-line: the command to execute in the human monitor
1221#
1222# @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1223#
1224# Returns: the output of the command as a string
1225#
1ad166b6 1226# Since: 0.14.0
08e4ed6c 1227#
1ad166b6
BC
1228# Notes: This command only exists as a stop-gap. Its use is highly
1229# discouraged. The semantics of this command are not guaranteed.
b952b558 1230#
1ad166b6 1231# Known limitations:
b952b558 1232#
1ad166b6
BC
1233# o This command is stateless, this means that commands that depend
1234# on state information (such as getfd) might not work
d9b902db 1235#
1ad166b6
BC
1236# o Commands that prompt the user for data (eg. 'cont' when the block
1237# device is encrypted) don't currently work
d9b902db 1238##
1ad166b6
BC
1239{ 'command': 'human-monitor-command',
1240 'data': {'command-line': 'str', '*cpu-index': 'int'},
1241 'returns': 'str' }
d9b902db
PB
1242
1243##
6cdedb07
LC
1244# @migrate_cancel
1245#
1246# Cancel the current executing migration process.
1247#
1248# Returns: nothing on success
1249#
1250# Notes: This command succeeds even if there is no migration process running.
1251#
1252# Since: 0.14.0
1253##
1254{ 'command': 'migrate_cancel' }
4f0a993b
LC
1255
1256##
1257# @migrate_set_downtime
1258#
1259# Set maximum tolerated downtime for migration.
1260#
1261# @value: maximum downtime in seconds
1262#
1263# Returns: nothing on success
1264#
1265# Since: 0.14.0
1266##
1267{ 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
3dc85383
LC
1268
1269##
1270# @migrate_set_speed
1271#
1272# Set maximum speed for migration.
1273#
1274# @value: maximum speed in bytes.
1275#
1276# Returns: nothing on success
1277#
1278# Notes: A value lesser than zero will be automatically round up to zero.
1279#
1280# Since: 0.14.0
1281##
1282{ 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
b4b12c62 1283
9e1ba4cc
OW
1284##
1285# @migrate-set-cache-size
1286#
1287# Set XBZRLE cache size
1288#
1289# @value: cache size in bytes
1290#
1291# The size will be rounded down to the nearest power of 2.
1292# The cache size can be modified before and during ongoing migration
1293#
1294# Returns: nothing on success
1295#
1296# Since: 1.2
1297##
1298{ 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1299
1300##
1301# @query-migrate-cache-size
1302#
1303# query XBZRLE cache size
1304#
1305# Returns: XBZRLE cache size in bytes
1306#
1307# Since: 1.2
1308##
1309{ 'command': 'query-migrate-cache-size', 'returns': 'int' }
1310
b4b12c62 1311##
d03ee401 1312# @ObjectPropertyInfo:
b4b12c62
AL
1313#
1314# @name: the name of the property
1315#
1316# @type: the type of the property. This will typically come in one of four
1317# forms:
1318#
1319# 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1320# These types are mapped to the appropriate JSON type.
1321#
1322# 2) A legacy type in the form 'legacy<subtype>' where subtype is the
1323# legacy qdev typename. These types are always treated as strings.
1324#
1325# 3) A child type in the form 'child<subtype>' where subtype is a qdev
1326# device type name. Child properties create the composition tree.
1327#
1328# 4) A link type in the form 'link<subtype>' where subtype is a qdev
1329# device type name. Link properties form the device model graph.
1330#
51920820 1331# Since: 1.2
b4b12c62 1332##
57c9fafe 1333{ 'type': 'ObjectPropertyInfo',
b4b12c62
AL
1334 'data': { 'name': 'str', 'type': 'str' } }
1335
1336##
1337# @qom-list:
1338#
57c9fafe 1339# This command will list any properties of a object given a path in the object
b4b12c62
AL
1340# model.
1341#
57c9fafe 1342# @path: the path within the object model. See @qom-get for a description of
b4b12c62
AL
1343# this parameter.
1344#
57c9fafe
AL
1345# Returns: a list of @ObjectPropertyInfo that describe the properties of the
1346# object.
b4b12c62 1347#
51920820 1348# Since: 1.2
b4b12c62
AL
1349##
1350{ 'command': 'qom-list',
1351 'data': { 'path': 'str' },
57c9fafe 1352 'returns': [ 'ObjectPropertyInfo' ] }
eb6e8ea5
AL
1353
1354##
1355# @qom-get:
1356#
57c9fafe 1357# This command will get a property from a object model path and return the
eb6e8ea5
AL
1358# value.
1359#
57c9fafe 1360# @path: The path within the object model. There are two forms of supported
eb6e8ea5
AL
1361# paths--absolute and partial paths.
1362#
57c9fafe 1363# Absolute paths are derived from the root object and can follow child<>
eb6e8ea5
AL
1364# or link<> properties. Since they can follow link<> properties, they
1365# can be arbitrarily long. Absolute paths look like absolute filenames
1366# and are prefixed with a leading slash.
1367#
1368# Partial paths look like relative filenames. They do not begin
1369# with a prefix. The matching rules for partial paths are subtle but
57c9fafe 1370# designed to make specifying objects easy. At each level of the
eb6e8ea5
AL
1371# composition tree, the partial path is matched as an absolute path.
1372# The first match is not returned. At least two matches are searched
1373# for. A successful result is only returned if only one match is
1374# found. If more than one match is found, a flag is return to
1375# indicate that the match was ambiguous.
1376#
1377# @property: The property name to read
1378#
1379# Returns: The property value. The type depends on the property type. legacy<>
1380# properties are returned as #str. child<> and link<> properties are
1381# returns as #str pathnames. All integer property types (u8, u16, etc)
1382# are returned as #int.
1383#
51920820 1384# Since: 1.2
eb6e8ea5
AL
1385##
1386{ 'command': 'qom-get',
1387 'data': { 'path': 'str', 'property': 'str' },
1388 'returns': 'visitor',
1389 'gen': 'no' }
1390
1391##
1392# @qom-set:
1393#
57c9fafe 1394# This command will set a property from a object model path.
eb6e8ea5
AL
1395#
1396# @path: see @qom-get for a description of this parameter
1397#
1398# @property: the property name to set
1399#
1400# @value: a value who's type is appropriate for the property type. See @qom-get
1401# for a description of type mapping.
1402#
51920820 1403# Since: 1.2
eb6e8ea5
AL
1404##
1405{ 'command': 'qom-set',
1406 'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
1407 'gen': 'no' }
fbf796fd
LC
1408
1409##
1410# @set_password:
1411#
1412# Sets the password of a remote display session.
1413#
1414# @protocol: `vnc' to modify the VNC server password
1415# `spice' to modify the Spice server password
1416#
1417# @password: the new password
1418#
1419# @connected: #optional how to handle existing clients when changing the
b80e560b 1420# password. If nothing is specified, defaults to `keep'
fbf796fd
LC
1421# `fail' to fail the command if clients are connected
1422# `disconnect' to disconnect existing clients
1423# `keep' to maintain existing clients
1424#
1425# Returns: Nothing on success
1426# If Spice is not enabled, DeviceNotFound
fbf796fd
LC
1427#
1428# Since: 0.14.0
1429##
1430{ 'command': 'set_password',
1431 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
9ad5372d
LC
1432
1433##
1434# @expire_password:
1435#
1436# Expire the password of a remote display server.
1437#
1438# @protocol: the name of the remote display protocol `vnc' or `spice'
1439#
1440# @time: when to expire the password.
1441# `now' to expire the password immediately
1442# `never' to cancel password expiration
1443# `+INT' where INT is the number of seconds from now (integer)
1444# `INT' where INT is the absolute time in seconds
1445#
1446# Returns: Nothing on success
1447# If @protocol is `spice' and Spice is not active, DeviceNotFound
9ad5372d
LC
1448#
1449# Since: 0.14.0
1450#
1451# Notes: Time is relative to the server and currently there is no way to
1452# coordinate server time with client time. It is not recommended to
1453# use the absolute time version of the @time parameter unless you're
1454# sure you are on the same machine as the QEMU instance.
1455##
1456{ 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
c245b6a3 1457
270b243f
LC
1458##
1459# @change-vnc-password:
1460#
1461# Change the VNC server password.
1462#
1463# @target: the new password to use with VNC authentication
1464#
1465# Since: 1.1
1466#
1467# Notes: An empty password in this command will set the password to the empty
1468# string. Existing clients are unaffected by executing this command.
1469##
1470{ 'command': 'change-vnc-password', 'data': {'password': 'str'} }
333a96ec
LC
1471
1472##
1473# @change:
1474#
1475# This command is multiple commands multiplexed together.
1476#
1477# @device: This is normally the name of a block device but it may also be 'vnc'.
1478# when it's 'vnc', then sub command depends on @target
1479#
1480# @target: If @device is a block device, then this is the new filename.
1481# If @device is 'vnc', then if the value 'password' selects the vnc
1482# change password command. Otherwise, this specifies a new server URI
1483# address to listen to for VNC connections.
1484#
1485# @arg: If @device is a block device, then this is an optional format to open
1486# the device with.
1487# If @device is 'vnc' and @target is 'password', this is the new VNC
1488# password to set. If this argument is an empty string, then no future
1489# logins will be allowed.
1490#
1491# Returns: Nothing on success.
1492# If @device is not a valid block device, DeviceNotFound
333a96ec
LC
1493# If the new block device is encrypted, DeviceEncrypted. Note that
1494# if this error is returned, the device has been opened successfully
1495# and an additional call to @block_passwd is required to set the
1496# device's password. The behavior of reads and writes to the block
1497# device between when these calls are executed is undefined.
1498#
1499# Notes: It is strongly recommended that this interface is not used especially
1500# for changing block devices.
1501#
1502# Since: 0.14.0
1503##
1504{ 'command': 'change',
1505 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
80047da5 1506
5eeee3fa
AL
1507##
1508# @ObjectTypeInfo:
1509#
1510# This structure describes a search result from @qom-list-types
1511#
1512# @name: the type name found in the search
1513#
1514# Since: 1.1
1515#
1516# Notes: This command is experimental and may change syntax in future releases.
1517##
1518{ 'type': 'ObjectTypeInfo',
1519 'data': { 'name': 'str' } }
1520
1521##
1522# @qom-list-types:
1523#
1524# This command will return a list of types given search parameters
1525#
1526# @implements: if specified, only return types that implement this type name
1527#
1528# @abstract: if true, include abstract types in the results
1529#
1530# Returns: a list of @ObjectTypeInfo or an empty list if no results are found
1531#
1532# Since: 1.1
5eeee3fa
AL
1533##
1534{ 'command': 'qom-list-types',
1535 'data': { '*implements': 'str', '*abstract': 'bool' },
1536 'returns': [ 'ObjectTypeInfo' ] }
e1c37d0e 1537
1daa31b9
AL
1538##
1539# @DevicePropertyInfo:
1540#
1541# Information about device properties.
1542#
1543# @name: the name of the property
1544# @type: the typename of the property
1545#
1546# Since: 1.2
1547##
1548{ 'type': 'DevicePropertyInfo',
1549 'data': { 'name': 'str', 'type': 'str' } }
1550
1551##
1552# @device-list-properties:
1553#
1554# List properties associated with a device.
1555#
1556# @typename: the type name of a device
1557#
1558# Returns: a list of DevicePropertyInfo describing a devices properties
1559#
1560# Since: 1.2
1561##
1562{ 'command': 'device-list-properties',
1563 'data': { 'typename': 'str'},
1564 'returns': [ 'DevicePropertyInfo' ] }
1565
e1c37d0e
LC
1566##
1567# @migrate
1568#
1569# Migrates the current running guest to another Virtual Machine.
1570#
1571# @uri: the Uniform Resource Identifier of the destination VM
1572#
1573# @blk: #optional do block migration (full disk copy)
1574#
1575# @inc: #optional incremental disk copy migration
1576#
1577# @detach: this argument exists only for compatibility reasons and
1578# is ignored by QEMU
1579#
1580# Returns: nothing on success
1581#
1582# Since: 0.14.0
1583##
1584{ 'command': 'migrate',
1585 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
33cf629a 1586
a7ae8355
SS
1587# @xen-save-devices-state:
1588#
1589# Save the state of all devices to file. The RAM and the block devices
1590# of the VM are not saved by this command.
1591#
1592# @filename: the file to save the state of the devices to as binary
1593# data. See xen-save-devices-state.txt for a description of the binary
1594# format.
1595#
1596# Returns: Nothing on success
a7ae8355
SS
1597#
1598# Since: 1.1
1599##
1600{ 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
a15fef21 1601
39f42439
AP
1602##
1603# @xen-set-global-dirty-log
1604#
1605# Enable or disable the global dirty log mode.
1606#
1607# @enable: true to enable, false to disable.
1608#
1609# Returns: nothing
1610#
1611# Since: 1.3
1612##
1613{ 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
1614
a15fef21
LC
1615##
1616# @device_del:
1617#
1618# Remove a device from a guest
1619#
1620# @id: the name of the device
1621#
1622# Returns: Nothing on success
1623# If @id is not a valid device, DeviceNotFound
a15fef21
LC
1624#
1625# Notes: When this command completes, the device may not be removed from the
1626# guest. Hot removal is an operation that requires guest cooperation.
1627# This command merely requests that the guest begin the hot removal
0402a5d6
MT
1628# process. Completion of the device removal process is signaled with a
1629# DEVICE_DELETED event. Guest reset will automatically complete removal
1630# for all devices.
a15fef21
LC
1631#
1632# Since: 0.14.0
1633##
1634{ 'command': 'device_del', 'data': {'id': 'str'} }
783e9b48 1635
b53ccc30
QN
1636##
1637# @DumpGuestMemoryFormat:
1638#
1639# An enumeration of guest-memory-dump's format.
1640#
1641# @elf: elf format
1642#
1643# @kdump-zlib: kdump-compressed format with zlib-compressed
1644#
1645# @kdump-lzo: kdump-compressed format with lzo-compressed
1646#
1647# @kdump-snappy: kdump-compressed format with snappy-compressed
1648#
1649# Since: 2.0
1650##
1651{ 'enum': 'DumpGuestMemoryFormat',
1652 'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy' ] }
1653
783e9b48
WC
1654##
1655# @dump-guest-memory
1656#
1657# Dump guest's memory to vmcore. It is a synchronous operation that can take
1658# very long depending on the amount of guest memory. This command is only
f5b0d93b
LC
1659# supported on i386 and x86_64.
1660#
1661# @paging: if true, do paging to get guest's memory mapping. This allows
d691180e 1662# using gdb to process the core file.
f5b0d93b 1663#
d691180e
LC
1664# IMPORTANT: this option can make QEMU allocate several gigabytes
1665# of RAM. This can happen for a large guest, or a
1666# malicious guest pretending to be large.
1667#
1668# Also, paging=true has the following limitations:
1669#
1670# 1. The guest may be in a catastrophic state or can have corrupted
1671# memory, which cannot be trusted
1672# 2. The guest can be in real-mode even if paging is enabled. For
1673# example, the guest uses ACPI to sleep, and ACPI sleep state
1674# goes in real-mode
f5b0d93b 1675#
783e9b48 1676# @protocol: the filename or file descriptor of the vmcore. The supported
d691180e 1677# protocols are:
f5b0d93b 1678#
d691180e
LC
1679# 1. file: the protocol starts with "file:", and the following
1680# string is the file's path.
1681# 2. fd: the protocol starts with "fd:", and the following string
1682# is the fd's name.
f5b0d93b 1683#
783e9b48 1684# @begin: #optional if specified, the starting physical address.
f5b0d93b 1685#
783e9b48 1686# @length: #optional if specified, the memory size, in bytes. If you don't
d691180e
LC
1687# want to dump all guest's memory, please specify the start @begin
1688# and @length
783e9b48 1689#
b53ccc30
QN
1690# @format: #optional if specified, the format of guest memory dump. But non-elf
1691# format is conflict with paging and filter, ie. @paging, @begin and
1692# @length is not allowed to be specified with non-elf @format at the
1693# same time (since 2.0)
1694#
783e9b48 1695# Returns: nothing on success
783e9b48
WC
1696#
1697# Since: 1.2
1698##
1699{ 'command': 'dump-guest-memory',
1700 'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
b53ccc30 1701 '*length': 'int', '*format': 'DumpGuestMemoryFormat' } }
d691180e 1702
7d6dc7f3
QN
1703##
1704# @DumpGuestMemoryCapability:
1705#
1706# A list of the available formats for dump-guest-memory
1707#
1708# Since: 2.0
1709##
1710{ 'type': 'DumpGuestMemoryCapability',
1711 'data': {
1712 'formats': ['DumpGuestMemoryFormat'] } }
1713
1714##
1715# @query-dump-guest-memory-capability:
1716#
1717# Returns the available formats for dump-guest-memory
1718#
1719# Returns: A @DumpGuestMemoryCapability object listing available formats for
1720# dump-guest-memory
1721#
1722# Since: 2.0
1723##
1724{ 'command': 'query-dump-guest-memory-capability',
1725 'returns': 'DumpGuestMemoryCapability' }
d691180e 1726
928059a3
LC
1727##
1728# @netdev_add:
1729#
1730# Add a network backend.
1731#
1732# @type: the type of network backend. Current valid values are 'user', 'tap',
1733# 'vde', 'socket', 'dump' and 'bridge'
1734#
1735# @id: the name of the new network backend
1736#
1737# @props: #optional a list of properties to be passed to the backend in
1738# the format 'name=value', like 'ifname=tap0,script=no'
1739#
1740# Notes: The semantics of @props is not well defined. Future commands will be
1741# introduced that provide stronger typing for backend creation.
1742#
1743# Since: 0.14.0
1744#
1745# Returns: Nothing on success
1746# If @type is not a valid network backend, DeviceNotFound
928059a3
LC
1747##
1748{ 'command': 'netdev_add',
1749 'data': {'type': 'str', 'id': 'str', '*props': '**'},
1750 'gen': 'no' }
5f964155
LC
1751
1752##
1753# @netdev_del:
1754#
1755# Remove a network backend.
1756#
1757# @id: the name of the network backend to remove
1758#
1759# Returns: Nothing on success
1760# If @id is not a valid network backend, DeviceNotFound
1761#
1762# Since: 0.14.0
1763##
1764{ 'command': 'netdev_del', 'data': {'id': 'str'} }
208c9d1b 1765
cff8b2c6
PB
1766##
1767# @object-add:
1768#
1769# Create a QOM object.
1770#
1771# @qom-type: the class name for the object to be created
1772#
1773# @id: the name of the new object
1774#
1775# @props: #optional a dictionary of properties to be passed to the backend
1776#
1777# Returns: Nothing on success
1778# Error if @qom-type is not a valid class name
1779#
1780# Since: 2.0
1781##
1782{ 'command': 'object-add',
1783 'data': {'qom-type': 'str', 'id': 'str', '*props': 'dict'},
1784 'gen': 'no' }
1785
ab2d0531
PB
1786##
1787# @object-del:
1788#
1789# Remove a QOM object.
1790#
1791# @id: the name of the QOM object to remove
1792#
1793# Returns: Nothing on success
1794# Error if @id is not a valid id for a QOM object
1795#
1796# Since: 2.0
1797##
1798{ 'command': 'object-del', 'data': {'id': 'str'} }
1799
14aa0c2d
LE
1800##
1801# @NetdevNoneOptions
1802#
1803# Use it alone to have zero network devices.
1804#
1805# Since 1.2
1806##
1807{ 'type': 'NetdevNoneOptions',
1808 'data': { } }
1809
1810##
1811# @NetLegacyNicOptions
1812#
1813# Create a new Network Interface Card.
1814#
1815# @netdev: #optional id of -netdev to connect to
1816#
1817# @macaddr: #optional MAC address
1818#
1819# @model: #optional device model (e1000, rtl8139, virtio etc.)
1820#
1821# @addr: #optional PCI device address
1822#
1823# @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
1824#
1825# Since 1.2
1826##
1827{ 'type': 'NetLegacyNicOptions',
1828 'data': {
1829 '*netdev': 'str',
1830 '*macaddr': 'str',
1831 '*model': 'str',
1832 '*addr': 'str',
1833 '*vectors': 'uint32' } }
1834
1835##
1836# @String
1837#
1838# A fat type wrapping 'str', to be embedded in lists.
1839#
1840# Since 1.2
1841##
1842{ 'type': 'String',
1843 'data': {
1844 'str': 'str' } }
1845
1846##
1847# @NetdevUserOptions
1848#
1849# Use the user mode network stack which requires no administrator privilege to
1850# run.
1851#
1852# @hostname: #optional client hostname reported by the builtin DHCP server
1853#
1854# @restrict: #optional isolate the guest from the host
1855#
1856# @ip: #optional legacy parameter, use net= instead
1857#
1858# @net: #optional IP address and optional netmask
1859#
1860# @host: #optional guest-visible address of the host
1861#
1862# @tftp: #optional root directory of the built-in TFTP server
1863#
1864# @bootfile: #optional BOOTP filename, for use with tftp=
1865#
1866# @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
1867# assign
1868#
1869# @dns: #optional guest-visible address of the virtual nameserver
1870#
63d2960b
KS
1871# @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
1872# to the guest
1873#
14aa0c2d
LE
1874# @smb: #optional root directory of the built-in SMB server
1875#
1876# @smbserver: #optional IP address of the built-in SMB server
1877#
1878# @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
1879# endpoints
1880#
1881# @guestfwd: #optional forward guest TCP connections
1882#
1883# Since 1.2
1884##
1885{ 'type': 'NetdevUserOptions',
1886 'data': {
1887 '*hostname': 'str',
1888 '*restrict': 'bool',
1889 '*ip': 'str',
1890 '*net': 'str',
1891 '*host': 'str',
1892 '*tftp': 'str',
1893 '*bootfile': 'str',
1894 '*dhcpstart': 'str',
1895 '*dns': 'str',
63d2960b 1896 '*dnssearch': ['String'],
14aa0c2d
LE
1897 '*smb': 'str',
1898 '*smbserver': 'str',
1899 '*hostfwd': ['String'],
1900 '*guestfwd': ['String'] } }
1901
1902##
1903# @NetdevTapOptions
1904#
1905# Connect the host TAP network interface name to the VLAN.
1906#
1907# @ifname: #optional interface name
1908#
1909# @fd: #optional file descriptor of an already opened tap
1910#
2ca81baa
JW
1911# @fds: #optional multiple file descriptors of already opened multiqueue capable
1912# tap
1913#
14aa0c2d
LE
1914# @script: #optional script to initialize the interface
1915#
1916# @downscript: #optional script to shut down the interface
1917#
1918# @helper: #optional command to execute to configure bridge
1919#
1920# @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
1921#
1922# @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
1923#
1924# @vhost: #optional enable vhost-net network accelerator
1925#
1926# @vhostfd: #optional file descriptor of an already opened vhost net device
1927#
2ca81baa
JW
1928# @vhostfds: #optional file descriptors of multiple already opened vhost net
1929# devices
1930#
14aa0c2d
LE
1931# @vhostforce: #optional vhost on for non-MSIX virtio guests
1932#
ec396014
JW
1933# @queues: #optional number of queues to be created for multiqueue capable tap
1934#
14aa0c2d
LE
1935# Since 1.2
1936##
1937{ 'type': 'NetdevTapOptions',
1938 'data': {
1939 '*ifname': 'str',
1940 '*fd': 'str',
264986e2 1941 '*fds': 'str',
14aa0c2d
LE
1942 '*script': 'str',
1943 '*downscript': 'str',
1944 '*helper': 'str',
1945 '*sndbuf': 'size',
1946 '*vnet_hdr': 'bool',
1947 '*vhost': 'bool',
1948 '*vhostfd': 'str',
264986e2
JW
1949 '*vhostfds': 'str',
1950 '*vhostforce': 'bool',
1951 '*queues': 'uint32'} }
14aa0c2d
LE
1952
1953##
1954# @NetdevSocketOptions
1955#
1956# Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
1957# socket connection.
1958#
1959# @fd: #optional file descriptor of an already opened socket
1960#
1961# @listen: #optional port number, and optional hostname, to listen on
1962#
1963# @connect: #optional port number, and optional hostname, to connect to
1964#
1965# @mcast: #optional UDP multicast address and port number
1966#
1967# @localaddr: #optional source address and port for multicast and udp packets
1968#
1969# @udp: #optional UDP unicast address and port number
1970#
1971# Since 1.2
1972##
1973{ 'type': 'NetdevSocketOptions',
1974 'data': {
1975 '*fd': 'str',
1976 '*listen': 'str',
1977 '*connect': 'str',
1978 '*mcast': 'str',
1979 '*localaddr': 'str',
1980 '*udp': 'str' } }
1981
1982##
1983# @NetdevVdeOptions
1984#
1985# Connect the VLAN to a vde switch running on the host.
1986#
1987# @sock: #optional socket path
1988#
1989# @port: #optional port number
1990#
1991# @group: #optional group owner of socket
1992#
1993# @mode: #optional permissions for socket
1994#
1995# Since 1.2
1996##
1997{ 'type': 'NetdevVdeOptions',
1998 'data': {
1999 '*sock': 'str',
2000 '*port': 'uint16',
2001 '*group': 'str',
2002 '*mode': 'uint16' } }
2003
2004##
2005# @NetdevDumpOptions
2006#
2007# Dump VLAN network traffic to a file.
2008#
2009# @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2010# suffixes.
2011#
2012# @file: #optional dump file path (default is qemu-vlan0.pcap)
2013#
2014# Since 1.2
2015##
2016{ 'type': 'NetdevDumpOptions',
2017 'data': {
2018 '*len': 'size',
2019 '*file': 'str' } }
2020
2021##
2022# @NetdevBridgeOptions
2023#
2024# Connect a host TAP network interface to a host bridge device.
2025#
2026# @br: #optional bridge name
2027#
2028# @helper: #optional command to execute to configure bridge
2029#
2030# Since 1.2
2031##
2032{ 'type': 'NetdevBridgeOptions',
2033 'data': {
2034 '*br': 'str',
2035 '*helper': 'str' } }
2036
f6c874e3
SH
2037##
2038# @NetdevHubPortOptions
2039#
2040# Connect two or more net clients through a software hub.
2041#
2042# @hubid: hub identifier number
2043#
2044# Since 1.2
2045##
2046{ 'type': 'NetdevHubPortOptions',
2047 'data': {
2048 'hubid': 'int32' } }
2049
58952137
VM
2050##
2051# @NetdevNetmapOptions
2052#
2053# Connect a client to a netmap-enabled NIC or to a VALE switch port
2054#
2055# @ifname: Either the name of an existing network interface supported by
2056# netmap, or the name of a VALE port (created on the fly).
2057# A VALE port name is in the form 'valeXXX:YYY', where XXX and
2058# YYY are non-negative integers. XXX identifies a switch and
2059# YYY identifies a port of the switch. VALE ports having the
2060# same XXX are therefore connected to the same switch.
2061#
2062# @devname: #optional path of the netmap device (default: '/dev/netmap').
2063#
c27de2a3 2064# Since 2.0
58952137
VM
2065##
2066{ 'type': 'NetdevNetmapOptions',
2067 'data': {
2068 'ifname': 'str',
2069 '*devname': 'str' } }
2070
03ce5744
NN
2071##
2072# @NetdevVhostUserOptions
2073#
2074# Vhost-user network backend
2075#
2076# @chardev: name of a unix socket chardev
2077#
2078# @vhostforce: #optional vhost on for non-MSIX virtio guests (default: false).
2079#
2080# Since 2.1
2081##
2082{ 'type': 'NetdevVhostUserOptions',
2083 'data': {
2084 'chardev': 'str',
2085 '*vhostforce': 'bool' } }
2086
14aa0c2d
LE
2087##
2088# @NetClientOptions
2089#
2090# A discriminated record of network device traits.
2091#
2092# Since 1.2
2093##
2094{ 'union': 'NetClientOptions',
2095 'data': {
f6c874e3
SH
2096 'none': 'NetdevNoneOptions',
2097 'nic': 'NetLegacyNicOptions',
2098 'user': 'NetdevUserOptions',
2099 'tap': 'NetdevTapOptions',
2100 'socket': 'NetdevSocketOptions',
2101 'vde': 'NetdevVdeOptions',
2102 'dump': 'NetdevDumpOptions',
2103 'bridge': 'NetdevBridgeOptions',
58952137 2104 'hubport': 'NetdevHubPortOptions',
03ce5744
NN
2105 'netmap': 'NetdevNetmapOptions',
2106 'vhost-user': 'NetdevVhostUserOptions' } }
14aa0c2d
LE
2107
2108##
2109# @NetLegacy
2110#
2111# Captures the configuration of a network device; legacy.
2112#
2113# @vlan: #optional vlan number
2114#
2115# @id: #optional identifier for monitor commands
2116#
2117# @name: #optional identifier for monitor commands, ignored if @id is present
2118#
2119# @opts: device type specific properties (legacy)
2120#
2121# Since 1.2
2122##
2123{ 'type': 'NetLegacy',
2124 'data': {
2125 '*vlan': 'int32',
2126 '*id': 'str',
2127 '*name': 'str',
2128 'opts': 'NetClientOptions' } }
2129
2130##
2131# @Netdev
2132#
2133# Captures the configuration of a network device.
2134#
2135# @id: identifier for monitor commands.
2136#
2137# @opts: device type specific properties
2138#
2139# Since 1.2
2140##
2141{ 'type': 'Netdev',
2142 'data': {
2143 'id': 'str',
2144 'opts': 'NetClientOptions' } }
2145
5be8c759
PB
2146##
2147# @InetSocketAddress
2148#
2149# Captures a socket address or address range in the Internet namespace.
2150#
2151# @host: host part of the address
2152#
2153# @port: port part of the address, or lowest port if @to is present
2154#
2155# @to: highest port to try
2156#
2157# @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
2158# #optional
2159#
2160# @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
2161# #optional
2162#
2163# Since 1.3
2164##
2165{ 'type': 'InetSocketAddress',
2166 'data': {
2167 'host': 'str',
2168 'port': 'str',
2169 '*to': 'uint16',
2170 '*ipv4': 'bool',
2171 '*ipv6': 'bool' } }
2172
2173##
2174# @UnixSocketAddress
2175#
2176# Captures a socket address in the local ("Unix socket") namespace.
2177#
2178# @path: filesystem path to use
2179#
2180# Since 1.3
2181##
2182{ 'type': 'UnixSocketAddress',
2183 'data': {
2184 'path': 'str' } }
2185
2186##
2187# @SocketAddress
2188#
2189# Captures the address of a socket, which could also be a named file descriptor
2190#
2191# Since 1.3
2192##
2193{ 'union': 'SocketAddress',
2194 'data': {
2195 'inet': 'InetSocketAddress',
2196 'unix': 'UnixSocketAddress',
2197 'fd': 'String' } }
2198
208c9d1b
CB
2199##
2200# @getfd:
2201#
2202# Receive a file descriptor via SCM rights and assign it a name
2203#
2204# @fdname: file descriptor name
2205#
2206# Returns: Nothing on success
208c9d1b
CB
2207#
2208# Since: 0.14.0
2209#
2210# Notes: If @fdname already exists, the file descriptor assigned to
2211# it will be closed and replaced by the received file
2212# descriptor.
2213# The 'closefd' command can be used to explicitly close the
2214# file descriptor when it is no longer needed.
2215##
2216{ 'command': 'getfd', 'data': {'fdname': 'str'} }
2217
2218##
2219# @closefd:
2220#
2221# Close a file descriptor previously passed via SCM rights
2222#
2223# @fdname: file descriptor name
2224#
2225# Returns: Nothing on success
208c9d1b
CB
2226#
2227# Since: 0.14.0
2228##
2229{ 'command': 'closefd', 'data': {'fdname': 'str'} }
01d3c80d
AL
2230
2231##
2232# @MachineInfo:
2233#
2234# Information describing a machine.
2235#
2236# @name: the name of the machine
2237#
2238# @alias: #optional an alias for the machine name
2239#
2240# @default: #optional whether the machine is default
2241#
c72e7688
MN
2242# @cpu-max: maximum number of CPUs supported by the machine type
2243# (since 1.5.0)
2244#
01d3c80d
AL
2245# Since: 1.2.0
2246##
2247{ 'type': 'MachineInfo',
2248 'data': { 'name': 'str', '*alias': 'str',
c72e7688 2249 '*is-default': 'bool', 'cpu-max': 'int' } }
01d3c80d
AL
2250
2251##
2252# @query-machines:
2253#
2254# Return a list of supported machines
2255#
2256# Returns: a list of MachineInfo
2257#
2258# Since: 1.2.0
2259##
2260{ 'command': 'query-machines', 'returns': ['MachineInfo'] }
e4e31c63
AL
2261
2262##
2263# @CpuDefinitionInfo:
2264#
2265# Virtual CPU definition.
2266#
2267# @name: the name of the CPU definition
2268#
2269# Since: 1.2.0
2270##
2271{ 'type': 'CpuDefinitionInfo',
2272 'data': { 'name': 'str' } }
2273
2274##
2275# @query-cpu-definitions:
2276#
2277# Return a list of supported virtual CPU definitions
2278#
2279# Returns: a list of CpuDefInfo
2280#
2281# Since: 1.2.0
2282##
2283{ 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
ba1c048a
CB
2284
2285# @AddfdInfo:
2286#
2287# Information about a file descriptor that was added to an fd set.
2288#
2289# @fdset-id: The ID of the fd set that @fd was added to.
2290#
2291# @fd: The file descriptor that was received via SCM rights and
2292# added to the fd set.
2293#
2294# Since: 1.2.0
2295##
2296{ 'type': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
2297
2298##
2299# @add-fd:
2300#
2301# Add a file descriptor, that was passed via SCM rights, to an fd set.
2302#
2303# @fdset-id: #optional The ID of the fd set to add the file descriptor to.
2304#
2305# @opaque: #optional A free-form string that can be used to describe the fd.
2306#
2307# Returns: @AddfdInfo on success
2308# If file descriptor was not received, FdNotSupplied
9ac54af0 2309# If @fdset-id is a negative value, InvalidParameterValue
ba1c048a
CB
2310#
2311# Notes: The list of fd sets is shared by all monitor connections.
2312#
2313# If @fdset-id is not specified, a new fd set will be created.
2314#
2315# Since: 1.2.0
2316##
2317{ 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
2318 'returns': 'AddfdInfo' }
2319
2320##
2321# @remove-fd:
2322#
2323# Remove a file descriptor from an fd set.
2324#
2325# @fdset-id: The ID of the fd set that the file descriptor belongs to.
2326#
2327# @fd: #optional The file descriptor that is to be removed.
2328#
2329# Returns: Nothing on success
2330# If @fdset-id or @fd is not found, FdNotFound
2331#
2332# Since: 1.2.0
2333#
2334# Notes: The list of fd sets is shared by all monitor connections.
2335#
2336# If @fd is not specified, all file descriptors in @fdset-id
2337# will be removed.
2338##
2339{ 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
2340
2341##
2342# @FdsetFdInfo:
2343#
2344# Information about a file descriptor that belongs to an fd set.
2345#
2346# @fd: The file descriptor value.
2347#
2348# @opaque: #optional A free-form string that can be used to describe the fd.
2349#
2350# Since: 1.2.0
2351##
2352{ 'type': 'FdsetFdInfo',
2353 'data': {'fd': 'int', '*opaque': 'str'} }
2354
2355##
2356# @FdsetInfo:
2357#
2358# Information about an fd set.
2359#
2360# @fdset-id: The ID of the fd set.
2361#
2362# @fds: A list of file descriptors that belong to this fd set.
2363#
2364# Since: 1.2.0
2365##
2366{ 'type': 'FdsetInfo',
2367 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
2368
2369##
2370# @query-fdsets:
2371#
2372# Return information describing all fd sets.
2373#
2374# Returns: A list of @FdsetInfo
2375#
2376# Since: 1.2.0
2377#
2378# Note: The list of fd sets is shared by all monitor connections.
2379#
2380##
2381{ 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
99afc91d 2382
99afc91d
DB
2383##
2384# @TargetInfo:
2385#
2386# Information describing the QEMU target.
2387#
2388# @arch: the target architecture (eg "x86_64", "i386", etc)
2389#
2390# Since: 1.2.0
2391##
2392{ 'type': 'TargetInfo',
c02a9552 2393 'data': { 'arch': 'str' } }
99afc91d
DB
2394
2395##
2396# @query-target:
2397#
2398# Return information about the target for this QEMU
2399#
2400# Returns: TargetInfo
2401#
2402# Since: 1.2.0
2403##
2404{ 'command': 'query-target', 'returns': 'TargetInfo' }
411656f4
AK
2405
2406##
2407# @QKeyCode:
2408#
2409# An enumeration of key name.
2410#
2411# This is used by the send-key command.
2412#
2413# Since: 1.3.0
bbd1b1cc 2414#
8b6b0c59 2415# 'unmapped' and 'pause' since 2.0
411656f4
AK
2416##
2417{ 'enum': 'QKeyCode',
bbd1b1cc
GH
2418 'data': [ 'unmapped',
2419 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
411656f4
AK
2420 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
2421 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
2422 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
2423 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
2424 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
2425 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
2426 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
2427 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
2428 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
2429 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
2430 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
2431 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
2432 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
8b6b0c59 2433 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause' ] }
e4c8f004 2434
9f328977
LC
2435##
2436# @KeyValue
2437#
2438# Represents a keyboard key.
2439#
2440# Since: 1.3.0
2441##
2442{ 'union': 'KeyValue',
2443 'data': {
2444 'number': 'int',
2445 'qcode': 'QKeyCode' } }
2446
e4c8f004
AK
2447##
2448# @send-key:
2449#
2450# Send keys to guest.
2451#
9f328977
LC
2452# @keys: An array of @KeyValue elements. All @KeyValues in this array are
2453# simultaneously sent to the guest. A @KeyValue.number value is sent
2454# directly to the guest, while @KeyValue.qcode must be a valid
2455# @QKeyCode value
e4c8f004
AK
2456#
2457# @hold-time: #optional time to delay key up events, milliseconds. Defaults
2458# to 100
2459#
2460# Returns: Nothing on success
2461# If key is unknown or redundant, InvalidParameter
2462#
2463# Since: 1.3.0
2464#
2465##
2466{ 'command': 'send-key',
9f328977 2467 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
ad39cf6d
LC
2468
2469##
2470# @screendump:
2471#
2472# Write a PPM of the VGA screen to a file.
2473#
2474# @filename: the path of a new PPM file to store the image
2475#
2476# Returns: Nothing on success
2477#
2478# Since: 0.14.0
2479##
2480{ 'command': 'screendump', 'data': {'filename': 'str'} }
6dd844db 2481
ffbdbe59
GH
2482##
2483# @ChardevFile:
2484#
2485# Configuration info for file chardevs.
2486#
2487# @in: #optional The name of the input file
2488# @out: The name of the output file
2489#
2490# Since: 1.4
2491##
2492{ 'type': 'ChardevFile', 'data': { '*in' : 'str',
2493 'out' : 'str' } }
2494
d59044ef 2495##
d36b2b90 2496# @ChardevHostdev:
d59044ef 2497#
548cbb36 2498# Configuration info for device and pipe chardevs.
d59044ef
GH
2499#
2500# @device: The name of the special file for the device,
2501# i.e. /dev/ttyS0 on Unix or COM1: on Windows
2502# @type: What kind of device this is.
2503#
2504# Since: 1.4
2505##
d36b2b90 2506{ 'type': 'ChardevHostdev', 'data': { 'device' : 'str' } }
d59044ef 2507
f6bd5d6e
GH
2508##
2509# @ChardevSocket:
2510#
3ecc059d 2511# Configuration info for (stream) socket chardevs.
f6bd5d6e
GH
2512#
2513# @addr: socket address to listen on (server=true)
2514# or connect to (server=false)
2515# @server: #optional create server socket (default: true)
ef993ba7
GH
2516# @wait: #optional wait for incoming connection on server
2517# sockets (default: false).
f6bd5d6e 2518# @nodelay: #optional set TCP_NODELAY socket option (default: false)
ef993ba7
GH
2519# @telnet: #optional enable telnet protocol on server
2520# sockets (default: false)
f6bd5d6e
GH
2521#
2522# Since: 1.4
2523##
2524{ 'type': 'ChardevSocket', 'data': { 'addr' : 'SocketAddress',
2525 '*server' : 'bool',
2526 '*wait' : 'bool',
2527 '*nodelay' : 'bool',
2528 '*telnet' : 'bool' } }
2529
3ecc059d 2530##
08d0ab3f 2531# @ChardevUdp:
3ecc059d
GH
2532#
2533# Configuration info for datagram socket chardevs.
2534#
2535# @remote: remote address
2536# @local: #optional local address
2537#
2538# Since: 1.5
2539##
08d0ab3f
LL
2540{ 'type': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress',
2541 '*local' : 'SocketAddress' } }
3ecc059d 2542
edb2fb3c
GH
2543##
2544# @ChardevMux:
2545#
2546# Configuration info for mux chardevs.
2547#
2548# @chardev: name of the base chardev.
2549#
2550# Since: 1.5
2551##
2552{ 'type': 'ChardevMux', 'data': { 'chardev' : 'str' } }
2553
7c358031
GH
2554##
2555# @ChardevStdio:
2556#
2557# Configuration info for stdio chardevs.
2558#
2559# @signal: #optional Allow signals (such as SIGINT triggered by ^C)
2560# be delivered to qemu. Default: true in -nographic mode,
2561# false otherwise.
2562#
2563# Since: 1.5
2564##
2565{ 'type': 'ChardevStdio', 'data': { '*signal' : 'bool' } }
2566
cd153e2a
GH
2567##
2568# @ChardevSpiceChannel:
2569#
2570# Configuration info for spice vm channel chardevs.
2571#
2572# @type: kind of channel (for example vdagent).
2573#
2574# Since: 1.5
2575##
2576{ 'type': 'ChardevSpiceChannel', 'data': { 'type' : 'str' } }
2577
2578##
2579# @ChardevSpicePort:
2580#
2581# Configuration info for spice port chardevs.
2582#
2583# @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
2584#
2585# Since: 1.5
2586##
2587{ 'type': 'ChardevSpicePort', 'data': { 'fqdn' : 'str' } }
2588
702ec69c
GH
2589##
2590# @ChardevVC:
2591#
2592# Configuration info for virtual console chardevs.
2593#
2594# @width: console width, in pixels
2595# @height: console height, in pixels
2596# @cols: console width, in chars
2597# @rows: console height, in chars
2598#
2599# Since: 1.5
2600##
2601{ 'type': 'ChardevVC', 'data': { '*width' : 'int',
2602 '*height' : 'int',
2603 '*cols' : 'int',
2604 '*rows' : 'int' } }
2605
1da48c65 2606##
4f57378f 2607# @ChardevRingbuf:
1da48c65 2608#
3a1da42e 2609# Configuration info for ring buffer chardevs.
1da48c65 2610#
3a1da42e 2611# @size: #optional ring buffer size, must be power of two, default is 65536
1da48c65
GH
2612#
2613# Since: 1.5
2614##
4f57378f 2615{ 'type': 'ChardevRingbuf', 'data': { '*size' : 'int' } }
1da48c65 2616
f1a1a356
GH
2617##
2618# @ChardevBackend:
2619#
2620# Configuration info for the new chardev backend.
2621#
2622# Since: 1.4
2623##
2624{ 'type': 'ChardevDummy', 'data': { } }
2625
f6bd5d6e 2626{ 'union': 'ChardevBackend', 'data': { 'file' : 'ChardevFile',
d36b2b90
MA
2627 'serial' : 'ChardevHostdev',
2628 'parallel': 'ChardevHostdev',
548cbb36 2629 'pipe' : 'ChardevHostdev',
f6bd5d6e 2630 'socket' : 'ChardevSocket',
08d0ab3f 2631 'udp' : 'ChardevUdp',
0a1a7fab 2632 'pty' : 'ChardevDummy',
edb2fb3c 2633 'null' : 'ChardevDummy',
f5a51cab 2634 'mux' : 'ChardevMux',
2d57286d 2635 'msmouse': 'ChardevDummy',
7c358031 2636 'braille': 'ChardevDummy',
d9ac374f 2637 'stdio' : 'ChardevStdio',
cd153e2a
GH
2638 'console': 'ChardevDummy',
2639 'spicevmc' : 'ChardevSpiceChannel',
702ec69c 2640 'spiceport' : 'ChardevSpicePort',
1da48c65 2641 'vc' : 'ChardevVC',
3a1da42e
MA
2642 'ringbuf': 'ChardevRingbuf',
2643 # next one is just for compatibility
4f57378f 2644 'memory' : 'ChardevRingbuf' } }
f1a1a356
GH
2645
2646##
2647# @ChardevReturn:
2648#
2649# Return info about the chardev backend just created.
2650#
58fa4325
MA
2651# @pty: #optional name of the slave pseudoterminal device, present if
2652# and only if a chardev of type 'pty' was created
2653#
f1a1a356
GH
2654# Since: 1.4
2655##
0a1a7fab 2656{ 'type' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
f1a1a356
GH
2657
2658##
2659# @chardev-add:
2660#
58fa4325 2661# Add a character device backend
f1a1a356
GH
2662#
2663# @id: the chardev's ID, must be unique
2664# @backend: backend type and parameters
2665#
58fa4325 2666# Returns: ChardevReturn.
f1a1a356
GH
2667#
2668# Since: 1.4
2669##
2670{ 'command': 'chardev-add', 'data': {'id' : 'str',
2671 'backend' : 'ChardevBackend' },
2672 'returns': 'ChardevReturn' }
2673
2674##
2675# @chardev-remove:
2676#
58fa4325 2677# Remove a character device backend
f1a1a356
GH
2678#
2679# @id: the chardev's ID, must exist and not be in use
2680#
2681# Returns: Nothing on success
2682#
2683# Since: 1.4
2684##
2685{ 'command': 'chardev-remove', 'data': {'id': 'str'} }
d1a0cf73
SB
2686
2687##
2688# @TpmModel:
2689#
2690# An enumeration of TPM models
2691#
2692# @tpm-tis: TPM TIS model
2693#
2694# Since: 1.5
2695##
2696{ 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
2697
2698##
2699# @query-tpm-models:
2700#
2701# Return a list of supported TPM models
2702#
2703# Returns: a list of TpmModel
2704#
2705# Since: 1.5
2706##
2707{ 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
2708
2709##
2710# @TpmType:
2711#
2712# An enumeration of TPM types
2713#
2714# @passthrough: TPM passthrough type
2715#
2716# Since: 1.5
2717##
2718{ 'enum': 'TpmType', 'data': [ 'passthrough' ] }
2719
2720##
2721# @query-tpm-types:
2722#
2723# Return a list of supported TPM types
2724#
2725# Returns: a list of TpmType
2726#
2727# Since: 1.5
2728##
2729{ 'command': 'query-tpm-types', 'returns': ['TpmType'] }
2730
2731##
2732# @TPMPassthroughOptions:
2733#
2734# Information about the TPM passthrough type
2735#
2736# @path: #optional string describing the path used for accessing the TPM device
2737#
2738# @cancel-path: #optional string showing the TPM's sysfs cancel file
2739# for cancellation of TPM commands while they are executing
2740#
2741# Since: 1.5
2742##
2743{ 'type': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
2744 '*cancel-path' : 'str'} }
2745
2746##
2747# @TpmTypeOptions:
2748#
2749# A union referencing different TPM backend types' configuration options
2750#
88ca7bcf 2751# @passthrough: The configuration options for the TPM passthrough type
d1a0cf73
SB
2752#
2753# Since: 1.5
2754##
2755{ 'union': 'TpmTypeOptions',
88ca7bcf 2756 'data': { 'passthrough' : 'TPMPassthroughOptions' } }
d1a0cf73
SB
2757
2758##
2759# @TpmInfo:
2760#
2761# Information about the TPM
2762#
2763# @id: The Id of the TPM
2764#
2765# @model: The TPM frontend model
2766#
88ca7bcf 2767# @options: The TPM (backend) type configuration options
d1a0cf73
SB
2768#
2769# Since: 1.5
2770##
2771{ 'type': 'TPMInfo',
2772 'data': {'id': 'str',
2773 'model': 'TpmModel',
88ca7bcf 2774 'options': 'TpmTypeOptions' } }
d1a0cf73
SB
2775
2776##
2777# @query-tpm:
2778#
2779# Return information about the TPM device
2780#
2781# Returns: @TPMInfo on success
2782#
2783# Since: 1.5
2784##
2785{ 'command': 'query-tpm', 'returns': ['TPMInfo'] }
8ccbad5c
LE
2786
2787##
2788# @AcpiTableOptions
2789#
2790# Specify an ACPI table on the command line to load.
2791#
2792# At most one of @file and @data can be specified. The list of files specified
2793# by any one of them is loaded and concatenated in order. If both are omitted,
2794# @data is implied.
2795#
2796# Other fields / optargs can be used to override fields of the generic ACPI
2797# table header; refer to the ACPI specification 5.0, section 5.2.6 System
2798# Description Table Header. If a header field is not overridden, then the
2799# corresponding value from the concatenated blob is used (in case of @file), or
2800# it is filled in with a hard-coded value (in case of @data).
2801#
2802# String fields are copied into the matching ACPI member from lowest address
2803# upwards, and silently truncated / NUL-padded to length.
2804#
2805# @sig: #optional table signature / identifier (4 bytes)
2806#
2807# @rev: #optional table revision number (dependent on signature, 1 byte)
2808#
2809# @oem_id: #optional OEM identifier (6 bytes)
2810#
2811# @oem_table_id: #optional OEM table identifier (8 bytes)
2812#
2813# @oem_rev: #optional OEM-supplied revision number (4 bytes)
2814#
2815# @asl_compiler_id: #optional identifier of the utility that created the table
2816# (4 bytes)
2817#
2818# @asl_compiler_rev: #optional revision number of the utility that created the
2819# table (4 bytes)
2820#
2821# @file: #optional colon (:) separated list of pathnames to load and
2822# concatenate as table data. The resultant binary blob is expected to
2823# have an ACPI table header. At least one file is required. This field
2824# excludes @data.
2825#
2826# @data: #optional colon (:) separated list of pathnames to load and
2827# concatenate as table data. The resultant binary blob must not have an
2828# ACPI table header. At least one file is required. This field excludes
2829# @file.
2830#
2831# Since 1.5
2832##
2833{ 'type': 'AcpiTableOptions',
2834 'data': {
2835 '*sig': 'str',
2836 '*rev': 'uint8',
2837 '*oem_id': 'str',
2838 '*oem_table_id': 'str',
2839 '*oem_rev': 'uint32',
2840 '*asl_compiler_id': 'str',
2841 '*asl_compiler_rev': 'uint32',
2842 '*file': 'str',
2843 '*data': 'str' }}
1f8f987d
AK
2844
2845##
2846# @CommandLineParameterType:
2847#
2848# Possible types for an option parameter.
2849#
2850# @string: accepts a character string
2851#
2852# @boolean: accepts "on" or "off"
2853#
2854# @number: accepts a number
2855#
2856# @size: accepts a number followed by an optional suffix (K)ilo,
2857# (M)ega, (G)iga, (T)era
2858#
2859# Since 1.5
2860##
2861{ 'enum': 'CommandLineParameterType',
2862 'data': ['string', 'boolean', 'number', 'size'] }
2863
2864##
2865# @CommandLineParameterInfo:
2866#
2867# Details about a single parameter of a command line option.
2868#
2869# @name: parameter name
2870#
2871# @type: parameter @CommandLineParameterType
2872#
2873# @help: #optional human readable text string, not suitable for parsing.
2874#
e36af94f
CL
2875# @default: #optional default value string (since 2.1)
2876#
1f8f987d
AK
2877# Since 1.5
2878##
2879{ 'type': 'CommandLineParameterInfo',
2880 'data': { 'name': 'str',
2881 'type': 'CommandLineParameterType',
e36af94f
CL
2882 '*help': 'str',
2883 '*default': 'str' } }
1f8f987d
AK
2884
2885##
2886# @CommandLineOptionInfo:
2887#
2888# Details about a command line option, including its list of parameter details
2889#
2890# @option: option name
2891#
2892# @parameters: an array of @CommandLineParameterInfo
2893#
2894# Since 1.5
2895##
2896{ 'type': 'CommandLineOptionInfo',
2897 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
2898
2899##
2900# @query-command-line-options:
2901#
2902# Query command line option schema.
2903#
2904# @option: #optional option name
2905#
2906# Returns: list of @CommandLineOptionInfo for all options (or for the given
2907# @option). Returns an error if the given @option doesn't exist.
2908#
2909# Since 1.5
2910##
2911{'command': 'query-command-line-options', 'data': { '*option': 'str' },
2912 'returns': ['CommandLineOptionInfo'] }
8e8aba50
EH
2913
2914##
2915# @X86CPURegister32
2916#
2917# A X86 32-bit register
2918#
2919# Since: 1.5
2920##
2921{ 'enum': 'X86CPURegister32',
2922 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
2923
2924##
2925# @X86CPUFeatureWordInfo
2926#
2927# Information about a X86 CPU feature word
2928#
2929# @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
2930#
2931# @cpuid-input-ecx: #optional Input ECX value for CPUID instruction for that
2932# feature word
2933#
2934# @cpuid-register: Output register containing the feature bits
2935#
2936# @features: value of output register, containing the feature bits
2937#
2938# Since: 1.5
2939##
2940{ 'type': 'X86CPUFeatureWordInfo',
2941 'data': { 'cpuid-input-eax': 'int',
2942 '*cpuid-input-ecx': 'int',
2943 'cpuid-register': 'X86CPURegister32',
2944 'features': 'int' } }
b1be4280
AK
2945
2946##
2947# @RxState:
2948#
2949# Packets receiving state
2950#
2951# @normal: filter assigned packets according to the mac-table
2952#
2953# @none: don't receive any assigned packet
2954#
2955# @all: receive all assigned packets
2956#
2957# Since: 1.6
2958##
2959{ 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
2960
2961##
2962# @RxFilterInfo:
2963#
2964# Rx-filter information for a NIC.
2965#
2966# @name: net client name
2967#
2968# @promiscuous: whether promiscuous mode is enabled
2969#
2970# @multicast: multicast receive state
2971#
2972# @unicast: unicast receive state
2973#
f7bc8ef8
AK
2974# @vlan: vlan receive state (Since 2.0)
2975#
b1be4280
AK
2976# @broadcast-allowed: whether to receive broadcast
2977#
2978# @multicast-overflow: multicast table is overflowed or not
2979#
2980# @unicast-overflow: unicast table is overflowed or not
2981#
2982# @main-mac: the main macaddr string
2983#
2984# @vlan-table: a list of active vlan id
2985#
2986# @unicast-table: a list of unicast macaddr string
2987#
2988# @multicast-table: a list of multicast macaddr string
2989#
2990# Since 1.6
2991##
2992
2993{ 'type': 'RxFilterInfo',
2994 'data': {
2995 'name': 'str',
2996 'promiscuous': 'bool',
2997 'multicast': 'RxState',
2998 'unicast': 'RxState',
f7bc8ef8 2999 'vlan': 'RxState',
b1be4280
AK
3000 'broadcast-allowed': 'bool',
3001 'multicast-overflow': 'bool',
3002 'unicast-overflow': 'bool',
3003 'main-mac': 'str',
3004 'vlan-table': ['int'],
3005 'unicast-table': ['str'],
3006 'multicast-table': ['str'] }}
3007
3008##
3009# @query-rx-filter:
3010#
3011# Return rx-filter information for all NICs (or for the given NIC).
3012#
3013# @name: #optional net client name
3014#
3015# Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
3016# Returns an error if the given @name doesn't exist, or given
3017# NIC doesn't support rx-filter querying, or given net client
3018# isn't a NIC.
3019#
3020# Since: 1.6
3021##
3022{ 'command': 'query-rx-filter', 'data': { '*name': 'str' },
3023 'returns': ['RxFilterInfo'] }
d26c9a15 3024
031fa964
GH
3025##
3026# @InputButton
3027#
3028# Button of a pointer input device (mouse, tablet).
3029#
3030# Since: 2.0
3031##
3032{ 'enum' : 'InputButton',
3033 'data' : [ 'Left', 'Middle', 'Right', 'WheelUp', 'WheelDown' ] }
3034
3035##
3036# @InputButton
3037#
3038# Position axis of a pointer input device (mouse, tablet).
3039#
3040# Since: 2.0
3041##
3042{ 'enum' : 'InputAxis',
3043 'data' : [ 'X', 'Y' ] }
3044
3045##
3046# @InputKeyEvent
3047#
3048# Keyboard input event.
3049#
3050# @key: Which key this event is for.
3051# @down: True for key-down and false for key-up events.
3052#
3053# Since: 2.0
3054##
3055{ 'type' : 'InputKeyEvent',
3056 'data' : { 'key' : 'KeyValue',
3057 'down' : 'bool' } }
3058
3059##
3060# @InputBtnEvent
3061#
3062# Pointer button input event.
3063#
3064# @button: Which button this event is for.
3065# @down: True for key-down and false for key-up events.
3066#
3067# Since: 2.0
3068##
3069{ 'type' : 'InputBtnEvent',
3070 'data' : { 'button' : 'InputButton',
3071 'down' : 'bool' } }
3072
3073##
3074# @InputMoveEvent
3075#
3076# Pointer motion input event.
3077#
3078# @axis: Which axis is referenced by @value.
3079# @value: Pointer position. For absolute coordinates the
3080# valid range is 0 -> 0x7ffff
3081#
3082# Since: 2.0
3083##
3084{ 'type' : 'InputMoveEvent',
3085 'data' : { 'axis' : 'InputAxis',
3086 'value' : 'int' } }
3087
3088##
3089# @InputEvent
3090#
3091# Input event union.
3092#
3093# Since: 2.0
3094##
3095{ 'union' : 'InputEvent',
3096 'data' : { 'key' : 'InputKeyEvent',
3097 'btn' : 'InputBtnEvent',
3098 'rel' : 'InputMoveEvent',
3099 'abs' : 'InputMoveEvent' } }
0042109a
WG
3100
3101##
3102# @NumaOptions
3103#
3104# A discriminated record of NUMA options. (for OptsVisitor)
3105#
3106# Since 2.1
3107##
3108{ 'union': 'NumaOptions',
3109 'data': {
3110 'node': 'NumaNodeOptions' }}
3111
3112##
3113# @NumaNodeOptions
3114#
3115# Create a guest NUMA node. (for OptsVisitor)
3116#
3117# @nodeid: #optional NUMA node ID (increase by 1 from 0 if omitted)
3118#
3119# @cpus: #optional VCPUs belonging to this node (assign VCPUS round-robin
3120# if omitted)
3121#
3122# @mem: #optional memory size of this node (equally divide total memory among
3123# nodes if omitted)
3124#
3125# Since: 2.1
3126##
3127{ 'type': 'NumaNodeOptions',
3128 'data': {
3129 '*nodeid': 'uint16',
3130 '*cpus': ['uint16'],
3131 '*mem': 'size' }}