xref: /openbmc/qemu/qapi/vfio.json (revision 03582094)
1# -*- Mode: Python -*-
2# vim: filetype=python
3#
4
5##
6# = VFIO devices
7##
8
9##
10# @VfioMigrationState:
11#
12# An enumeration of the VFIO device migration states.
13#
14# @stop: The device is stopped.
15#
16# @running: The device is running.
17#
18# @stop-copy: The device is stopped and its internal state is available
19#     for reading.
20#
21# @resuming: The device is stopped and its internal state is available
22#     for writing.
23#
24# @running-p2p: The device is running in the P2P quiescent state.
25#
26# @pre-copy: The device is running, tracking its internal state and its
27#     internal state is available for reading.
28#
29# @pre-copy-p2p: The device is running in the P2P quiescent state,
30#     tracking its internal state and its internal state is available
31#     for reading.
32#
33# Since: 9.1
34##
35{ 'enum': 'VfioMigrationState',
36  'data': [ 'stop', 'running', 'stop-copy', 'resuming', 'running-p2p',
37            'pre-copy', 'pre-copy-p2p' ],
38  'prefix': 'QAPI_VFIO_MIGRATION_STATE' }
39
40##
41# @VFIO_MIGRATION:
42#
43# This event is emitted when a VFIO device migration state is changed.
44#
45# @device-id: The device's id, if it has one.
46#
47# @qom-path: The device's QOM path.
48#
49# @device-state: The new changed device migration state.
50#
51# Since: 9.1
52#
53# Example:
54#
55#     <- { "timestamp": { "seconds": 1713771323, "microseconds": 212268 },
56#          "event": "VFIO_MIGRATION",
57#          "data": {
58#              "device-id": "vfio_dev1",
59#              "qom-path": "/machine/peripheral/vfio_dev1",
60#              "device-state": "stop" } }
61##
62{ 'event': 'VFIO_MIGRATION',
63  'data': {
64      'device-id': 'str',
65      'qom-path': 'str',
66      'device-state': 'VfioMigrationState'
67  } }
68