exec: use qemu_ram_ptr_length to access guest ram
[qemu/ar7.git] / qapi / event.json
blob6d22b025cc20d4b51963bca091486dc85ff5c95a
1 # -*- Mode: Python -*-
3 ##
4 # = Other events
5 ##
7 ##
8 # @SHUTDOWN:
10 # Emitted when the virtual machine has shut down, indicating that qemu is
11 # about to exit.
13 # @guest: If true, the shutdown was triggered by a guest request (such as
14 # a guest-initiated ACPI shutdown request or other hardware-specific action)
15 # rather than a host request (such as sending qemu a SIGINT). (since 2.10)
17 # Note: If the command-line option "-no-shutdown" has been specified, qemu will
18 # not exit, and a STOP event will eventually follow the SHUTDOWN event
20 # Since: 0.12.0
22 # Example:
24 # <- { "event": "SHUTDOWN", "data": { "guest": true },
25 #      "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
28 { 'event': 'SHUTDOWN', 'data': { 'guest': 'bool' } }
31 # @POWERDOWN:
33 # Emitted when the virtual machine is powered down through the power control
34 # system, such as via ACPI.
36 # Since: 0.12.0
38 # Example:
40 # <- { "event": "POWERDOWN",
41 #      "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
44 { 'event': 'POWERDOWN' }
47 # @RESET:
49 # Emitted when the virtual machine is reset
51 # @guest: If true, the reset was triggered by a guest request (such as
52 # a guest-initiated ACPI reboot request or other hardware-specific action)
53 # rather than a host request (such as the QMP command system_reset).
54 # (since 2.10)
56 # Since: 0.12.0
58 # Example:
60 # <- { "event": "RESET", "data": { "guest": false },
61 #      "timestamp": { "seconds": 1267041653, "microseconds": 9518 } }
64 { 'event': 'RESET', 'data': { 'guest': 'bool' } }
67 # @STOP:
69 # Emitted when the virtual machine is stopped
71 # Since: 0.12.0
73 # Example:
75 # <- { "event": "STOP",
76 #      "timestamp": { "seconds": 1267041730, "microseconds": 281295 } }
79 { 'event': 'STOP' }
82 # @RESUME:
84 # Emitted when the virtual machine resumes execution
86 # Since: 0.12.0
88 # Example:
90 # <- { "event": "RESUME",
91 #      "timestamp": { "seconds": 1271770767, "microseconds": 582542 } }
94 { 'event': 'RESUME' }
97 # @SUSPEND:
99 # Emitted when guest enters a hardware suspension state, for example, S3 state,
100 # which is sometimes called standby state
102 # Since: 1.1
104 # Example:
106 # <- { "event": "SUSPEND",
107 #      "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
110 { 'event': 'SUSPEND' }
113 # @SUSPEND_DISK:
115 # Emitted when guest enters a hardware suspension state with data saved on
116 # disk, for example, S4 state, which is sometimes called hibernate state
118 # Note: QEMU shuts down (similar to event @SHUTDOWN) when entering this state
120 # Since: 1.2
122 # Example:
124 # <-   { "event": "SUSPEND_DISK",
125 #        "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
128 { 'event': 'SUSPEND_DISK' }
131 # @WAKEUP:
133 # Emitted when the guest has woken up from suspend state and is running
135 # Since: 1.1
137 # Example:
139 # <- { "event": "WAKEUP",
140 #      "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
143 { 'event': 'WAKEUP' }
146 # @RTC_CHANGE:
148 # Emitted when the guest changes the RTC time.
150 # @offset: offset between base RTC clock (as specified by -rtc base), and
151 #          new RTC clock value
153 # Note: This event is rate-limited.
155 # Since: 0.13.0
157 # Example:
159 # <-   { "event": "RTC_CHANGE",
160 #        "data": { "offset": 78 },
161 #        "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
164 { 'event': 'RTC_CHANGE',
165   'data': { 'offset': 'int' } }
168 # @WATCHDOG:
170 # Emitted when the watchdog device's timer is expired
172 # @action: action that has been taken
174 # Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is
175 # followed respectively by the RESET, SHUTDOWN, or STOP events
177 # Note: This event is rate-limited.
179 # Since: 0.13.0
181 # Example:
183 # <- { "event": "WATCHDOG",
184 #      "data": { "action": "reset" },
185 #      "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
188 { 'event': 'WATCHDOG',
189   'data': { 'action': 'WatchdogExpirationAction' } }
192 # @DEVICE_DELETED:
194 # Emitted whenever the device removal completion is acknowledged by the guest.
195 # At this point, it's safe to reuse the specified device ID. Device removal can
196 # be initiated by the guest or by HMP/QMP commands.
198 # @device: device name
200 # @path: device path
202 # Since: 1.5
204 # Example:
206 # <- { "event": "DEVICE_DELETED",
207 #      "data": { "device": "virtio-net-pci-0",
208 #                "path": "/machine/peripheral/virtio-net-pci-0" },
209 #      "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
212 { 'event': 'DEVICE_DELETED',
213   'data': { '*device': 'str', 'path': 'str' } }
216 # @NIC_RX_FILTER_CHANGED:
218 # Emitted once until the 'query-rx-filter' command is executed, the first event
219 # will always be emitted
221 # @name: net client name
223 # @path: device path
225 # Since: 1.6
227 # Example:
229 # <- { "event": "NIC_RX_FILTER_CHANGED",
230 #      "data": { "name": "vnet0",
231 #                "path": "/machine/peripheral/vnet0/virtio-backend" },
232 #      "timestamp": { "seconds": 1368697518, "microseconds": 326866 } }
233 #    }
236 { 'event': 'NIC_RX_FILTER_CHANGED',
237   'data': { '*name': 'str', 'path': 'str' } }
240 # @VNC_CONNECTED:
242 # Emitted when a VNC client establishes a connection
244 # @server: server information
246 # @client: client information
248 # Note: This event is emitted before any authentication takes place, thus
249 # the authentication ID is not provided
251 # Since: 0.13.0
253 # Example:
255 # <- { "event": "VNC_CONNECTED",
256 #      "data": {
257 #            "server": { "auth": "sasl", "family": "ipv4",
258 #                        "service": "5901", "host": "0.0.0.0" },
259 #            "client": { "family": "ipv4", "service": "58425",
260 #                        "host": "127.0.0.1" } },
261 #      "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
264 { 'event': 'VNC_CONNECTED',
265   'data': { 'server': 'VncServerInfo',
266             'client': 'VncBasicInfo' } }
269 # @VNC_INITIALIZED:
271 # Emitted after authentication takes place (if any) and the VNC session is
272 # made active
274 # @server: server information
276 # @client: client information
278 # Since: 0.13.0
280 # Example:
282 # <-  { "event": "VNC_INITIALIZED",
283 #       "data": {
284 #            "server": { "auth": "sasl", "family": "ipv4",
285 #                        "service": "5901", "host": "0.0.0.0"},
286 #            "client": { "family": "ipv4", "service": "46089",
287 #                        "host": "127.0.0.1", "sasl_username": "luiz" } },
288 #       "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
291 { 'event': 'VNC_INITIALIZED',
292   'data': { 'server': 'VncServerInfo',
293             'client': 'VncClientInfo' } }
296 # @VNC_DISCONNECTED:
298 # Emitted when the connection is closed
300 # @server: server information
302 # @client: client information
304 # Since: 0.13.0
306 # Example:
308 # <- { "event": "VNC_DISCONNECTED",
309 #      "data": {
310 #            "server": { "auth": "sasl", "family": "ipv4",
311 #                        "service": "5901", "host": "0.0.0.0" },
312 #            "client": { "family": "ipv4", "service": "58425",
313 #                        "host": "127.0.0.1", "sasl_username": "luiz" } },
314 #      "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
317 { 'event': 'VNC_DISCONNECTED',
318   'data': { 'server': 'VncServerInfo',
319             'client': 'VncClientInfo' } }
322 # @SPICE_CONNECTED:
324 # Emitted when a SPICE client establishes a connection
326 # @server: server information
328 # @client: client information
330 # Since: 0.14.0
332 # Example:
334 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
335 #      "event": "SPICE_CONNECTED",
336 #      "data": {
337 #        "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
338 #        "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
339 #    }}
342 { 'event': 'SPICE_CONNECTED',
343   'data': { 'server': 'SpiceBasicInfo',
344             'client': 'SpiceBasicInfo' } }
347 # @SPICE_INITIALIZED:
349 # Emitted after initial handshake and authentication takes place (if any)
350 # and the SPICE channel is up and running
352 # @server: server information
354 # @client: client information
356 # Since: 0.14.0
358 # Example:
360 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
361 #      "event": "SPICE_INITIALIZED",
362 #      "data": {"server": {"auth": "spice", "port": "5921",
363 #                          "family": "ipv4", "host": "127.0.0.1"},
364 #               "client": {"port": "49004", "family": "ipv4", "channel-type": 3,
365 #                          "connection-id": 1804289383, "host": "127.0.0.1",
366 #                          "channel-id": 0, "tls": true}
367 #    }}
370 { 'event': 'SPICE_INITIALIZED',
371   'data': { 'server': 'SpiceServerInfo',
372             'client': 'SpiceChannel' } }
375 # @SPICE_DISCONNECTED:
377 # Emitted when the SPICE connection is closed
379 # @server: server information
381 # @client: client information
383 # Since: 0.14.0
385 # Example:
387 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 388707},
388 #      "event": "SPICE_DISCONNECTED",
389 #      "data": {
390 #        "server": { "port": "5920", "family": "ipv4", "host": "127.0.0.1"},
391 #        "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
392 #    }}
395 { 'event': 'SPICE_DISCONNECTED',
396   'data': { 'server': 'SpiceBasicInfo',
397             'client': 'SpiceBasicInfo' } }
400 # @SPICE_MIGRATE_COMPLETED:
402 # Emitted when SPICE migration has completed
404 # Since: 1.3
406 # Example:
408 # <- { "timestamp": {"seconds": 1290688046, "microseconds": 417172},
409 #      "event": "SPICE_MIGRATE_COMPLETED" }
412 { 'event': 'SPICE_MIGRATE_COMPLETED' }
415 # @MIGRATION:
417 # Emitted when a migration event happens
419 # @status: @MigrationStatus describing the current migration status.
421 # Since: 2.4
423 # Example:
425 # <- {"timestamp": {"seconds": 1432121972, "microseconds": 744001},
426 #     "event": "MIGRATION",
427 #     "data": {"status": "completed"} }
430 { 'event': 'MIGRATION',
431   'data': {'status': 'MigrationStatus'}}
434 # @MIGRATION_PASS:
436 # Emitted from the source side of a migration at the start of each pass
437 # (when it syncs the dirty bitmap)
439 # @pass: An incrementing count (starting at 1 on the first pass)
441 # Since: 2.6
443 # Example:
445 # { "timestamp": {"seconds": 1449669631, "microseconds": 239225},
446 #   "event": "MIGRATION_PASS", "data": {"pass": 2} }
449 { 'event': 'MIGRATION_PASS',
450   'data': { 'pass': 'int' } }
453 # @ACPI_DEVICE_OST:
455 # Emitted when guest executes ACPI _OST method.
457 # @info: ACPIOSTInfo type as described in qapi-schema.json
459 # Since: 2.1
461 # Example:
463 # <- { "event": "ACPI_DEVICE_OST",
464 #      "data": { "device": "d1", "slot": "0",
465 #                "slot-type": "DIMM", "source": 1, "status": 0 } }
468 { 'event': 'ACPI_DEVICE_OST',
469      'data': { 'info': 'ACPIOSTInfo' } }
472 # @BALLOON_CHANGE:
474 # Emitted when the guest changes the actual BALLOON level. This value is
475 # equivalent to the @actual field return by the 'query-balloon' command
477 # @actual: actual level of the guest memory balloon in bytes
479 # Note: this event is rate-limited.
481 # Since: 1.2
483 # Example:
485 # <- { "event": "BALLOON_CHANGE",
486 #      "data": { "actual": 944766976 },
487 #      "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
490 { 'event': 'BALLOON_CHANGE',
491   'data': { 'actual': 'int' } }
494 # @GUEST_PANICKED:
496 # Emitted when guest OS panic is detected
498 # @action: action that has been taken, currently always "pause"
500 # @info: information about a panic (since 2.9)
502 # Since: 1.5
504 # Example:
506 # <- { "event": "GUEST_PANICKED",
507 #      "data": { "action": "pause" } }
510 { 'event': 'GUEST_PANICKED',
511   'data': { 'action': 'GuestPanicAction', '*info': 'GuestPanicInformation' } }
514 # @QUORUM_FAILURE:
516 # Emitted by the Quorum block driver if it fails to establish a quorum
518 # @reference: device name if defined else node name
520 # @sector-num: number of the first sector of the failed read operation
522 # @sectors-count: failed read operation sector count
524 # Note: This event is rate-limited.
526 # Since: 2.0
528 # Example:
530 # <- { "event": "QUORUM_FAILURE",
531 #      "data": { "reference": "usr1", "sector-num": 345435, "sectors-count": 5 },
532 #      "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
535 { 'event': 'QUORUM_FAILURE',
536   'data': { 'reference': 'str', 'sector-num': 'int', 'sectors-count': 'int' } }
539 # @QUORUM_REPORT_BAD:
541 # Emitted to report a corruption of a Quorum file
543 # @type: quorum operation type (Since 2.6)
545 # @error: error message. Only present on failure. This field
546 #         contains a human-readable error message. There are no semantics other
547 #         than that the block layer reported an error and clients should not
548 #         try to interpret the error string.
550 # @node-name: the graph node name of the block driver state
552 # @sector-num: number of the first sector of the failed read operation
554 # @sectors-count: failed read operation sector count
556 # Note: This event is rate-limited.
558 # Since: 2.0
560 # Example:
562 # 1. Read operation
564 # { "event": "QUORUM_REPORT_BAD",
565 #      "data": { "node-name": "node0", "sector-num": 345435, "sectors-count": 5,
566 #                "type": "read" },
567 #      "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
569 # 2. Flush operation
571 # { "event": "QUORUM_REPORT_BAD",
572 #      "data": { "node-name": "node0", "sector-num": 0, "sectors-count": 2097120,
573 #                "type": "flush", "error": "Broken pipe" },
574 #      "timestamp": { "seconds": 1456406829, "microseconds": 291763 } }
577 { 'event': 'QUORUM_REPORT_BAD',
578   'data': { 'type': 'QuorumOpType', '*error': 'str', 'node-name': 'str',
579             'sector-num': 'int', 'sectors-count': 'int' } }
582 # @VSERPORT_CHANGE:
584 # Emitted when the guest opens or closes a virtio-serial port.
586 # @id: device identifier of the virtio-serial port
588 # @open: true if the guest has opened the virtio-serial port
590 # Since: 2.1
592 # Example:
594 # <- { "event": "VSERPORT_CHANGE",
595 #      "data": { "id": "channel0", "open": true },
596 #      "timestamp": { "seconds": 1401385907, "microseconds": 422329 } }
599 { 'event': 'VSERPORT_CHANGE',
600   'data': { 'id': 'str', 'open': 'bool' } }
603 # @MEM_UNPLUG_ERROR:
605 # Emitted when memory hot unplug error occurs.
607 # @device: device name
609 # @msg: Informative message
611 # Since: 2.4
613 # Example:
615 # <- { "event": "MEM_UNPLUG_ERROR"
616 #      "data": { "device": "dimm1",
617 #                "msg": "acpi: device unplug for unsupported device"
618 #      },
619 #      "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
622 { 'event': 'MEM_UNPLUG_ERROR',
623   'data': { 'device': 'str', 'msg': 'str' } }
626 # @DUMP_COMPLETED:
628 # Emitted when background dump has completed
630 # @result: DumpQueryResult type described in qapi-schema.json.
632 # @error: human-readable error string that provides
633 #         hint on why dump failed. Only presents on failure. The
634 #         user should not try to interpret the error string.
636 # Since: 2.6
638 # Example:
640 # { "event": "DUMP_COMPLETED",
641 #   "data": {"result": {"total": 1090650112, "status": "completed",
642 #                       "completed": 1090650112} } }
645 { 'event': 'DUMP_COMPLETED' ,
646   'data': { 'result': 'DumpQueryResult', '*error': 'str' } }