xref: /openbmc/qemu/qapi/common.json (revision 30e863e5)
1d34bda71SBenoît Canet# -*- Mode: Python -*-
2f7160f32SAndrea Bolognani# vim: filetype=python
3d3a48372SMarc-André Lureau
4d3a48372SMarc-André Lureau##
5f5cf31c5SMarkus Armbruster# = Common data types
6d3a48372SMarc-André Lureau##
7d34bda71SBenoît Canet
8d34bda71SBenoît Canet##
92031c133SMarkus Armbruster# @IoOperationType:
102031c133SMarkus Armbruster#
112031c133SMarkus Armbruster# An enumeration of the I/O operation types
122031c133SMarkus Armbruster#
132031c133SMarkus Armbruster# @read: read operation
142031c133SMarkus Armbruster#
152031c133SMarkus Armbruster# @write: write operation
162031c133SMarkus Armbruster#
172031c133SMarkus Armbruster# Since: 2.1
182031c133SMarkus Armbruster##
192031c133SMarkus Armbruster{ 'enum': 'IoOperationType',
202031c133SMarkus Armbruster  'data': [ 'read', 'write' ] }
212031c133SMarkus Armbruster
222031c133SMarkus Armbruster##
235072f7b3SMarc-André Lureau# @OnOffAuto:
24d1048befSDon Slutz#
25d1048befSDon Slutz# An enumeration of three options: on, off, and auto
26d1048befSDon Slutz#
27d1048befSDon Slutz# @auto: QEMU selects the value between on and off
28d1048befSDon Slutz#
29d1048befSDon Slutz# @on: Enabled
30d1048befSDon Slutz#
31d1048befSDon Slutz# @off: Disabled
32d1048befSDon Slutz#
33d1048befSDon Slutz# Since: 2.2
34d1048befSDon Slutz##
35d1048befSDon Slutz{ 'enum': 'OnOffAuto',
36d1048befSDon Slutz  'data': [ 'auto', 'on', 'off' ] }
3732c18a2dSMatt Gingell
3832c18a2dSMatt Gingell##
395072f7b3SMarc-André Lureau# @OnOffSplit:
4032c18a2dSMatt Gingell#
4132c18a2dSMatt Gingell# An enumeration of three values: on, off, and split
4232c18a2dSMatt Gingell#
4332c18a2dSMatt Gingell# @on: Enabled
4432c18a2dSMatt Gingell#
4532c18a2dSMatt Gingell# @off: Disabled
4632c18a2dSMatt Gingell#
4732c18a2dSMatt Gingell# @split: Mixed
4832c18a2dSMatt Gingell#
4932c18a2dSMatt Gingell# Since: 2.6
5032c18a2dSMatt Gingell##
5132c18a2dSMatt Gingell{ 'enum': 'OnOffSplit',
5232c18a2dSMatt Gingell  'data': [ 'on', 'off', 'split' ] }
53a2ff5a48SMarkus Armbruster
54a2ff5a48SMarkus Armbruster##
55a2ff5a48SMarkus Armbruster# @String:
56a2ff5a48SMarkus Armbruster#
57a2ff5a48SMarkus Armbruster# A fat type wrapping 'str', to be embedded in lists.
58a2ff5a48SMarkus Armbruster#
59a2ff5a48SMarkus Armbruster# Since: 1.2
60a2ff5a48SMarkus Armbruster##
61a2ff5a48SMarkus Armbruster{ 'struct': 'String',
62a2ff5a48SMarkus Armbruster  'data': {
63a2ff5a48SMarkus Armbruster    'str': 'str' } }
6448685a8eSMarkus Armbruster
6548685a8eSMarkus Armbruster##
6648685a8eSMarkus Armbruster# @StrOrNull:
6748685a8eSMarkus Armbruster#
6848685a8eSMarkus Armbruster# This is a string value or the explicit lack of a string (null
6948685a8eSMarkus Armbruster# pointer in C).  Intended for cases when 'optional absent' already
7048685a8eSMarkus Armbruster# has a different meaning.
7148685a8eSMarkus Armbruster#
7248685a8eSMarkus Armbruster# @s: the string value
7348685a8eSMarkus Armbruster# @n: no string value
7448685a8eSMarkus Armbruster#
7548685a8eSMarkus Armbruster# Since: 2.10
7648685a8eSMarkus Armbruster##
7748685a8eSMarkus Armbruster{ 'alternate': 'StrOrNull',
7848685a8eSMarkus Armbruster  'data': { 's': 'str',
7948685a8eSMarkus Armbruster            'n': 'null' } }
80c3bbbdbfSAlex Williamson
81c3bbbdbfSAlex Williamson##
82c3bbbdbfSAlex Williamson# @OffAutoPCIBAR:
83c3bbbdbfSAlex Williamson#
84c3bbbdbfSAlex Williamson# An enumeration of options for specifying a PCI BAR
85c3bbbdbfSAlex Williamson#
86c3bbbdbfSAlex Williamson# @off: The specified feature is disabled
87c3bbbdbfSAlex Williamson#
88c3bbbdbfSAlex Williamson# @auto: The PCI BAR for the feature is automatically selected
89c3bbbdbfSAlex Williamson#
90c3bbbdbfSAlex Williamson# @bar0: PCI BAR0 is used for the feature
91c3bbbdbfSAlex Williamson#
92c3bbbdbfSAlex Williamson# @bar1: PCI BAR1 is used for the feature
93c3bbbdbfSAlex Williamson#
94c3bbbdbfSAlex Williamson# @bar2: PCI BAR2 is used for the feature
95c3bbbdbfSAlex Williamson#
96c3bbbdbfSAlex Williamson# @bar3: PCI BAR3 is used for the feature
97c3bbbdbfSAlex Williamson#
98c3bbbdbfSAlex Williamson# @bar4: PCI BAR4 is used for the feature
99c3bbbdbfSAlex Williamson#
100c3bbbdbfSAlex Williamson# @bar5: PCI BAR5 is used for the feature
101c3bbbdbfSAlex Williamson#
102c3bbbdbfSAlex Williamson# Since: 2.12
103c3bbbdbfSAlex Williamson##
104c3bbbdbfSAlex Williamson{ 'enum': 'OffAutoPCIBAR',
105c3bbbdbfSAlex Williamson  'data': [ 'off', 'auto', 'bar0', 'bar1', 'bar2', 'bar3', 'bar4', 'bar5' ] }
1069a801c7dSLaszlo Ersek
1079a801c7dSLaszlo Ersek##
1084695a2c5SAlex Williamson# @PCIELinkSpeed:
1094695a2c5SAlex Williamson#
1104695a2c5SAlex Williamson# An enumeration of PCIe link speeds in units of GT/s
1114695a2c5SAlex Williamson#
1124695a2c5SAlex Williamson# @2_5: 2.5GT/s
1134695a2c5SAlex Williamson#
1144695a2c5SAlex Williamson# @5: 5.0GT/s
1154695a2c5SAlex Williamson#
1164695a2c5SAlex Williamson# @8: 8.0GT/s
1174695a2c5SAlex Williamson#
1184695a2c5SAlex Williamson# @16: 16.0GT/s
1194695a2c5SAlex Williamson#
1204695a2c5SAlex Williamson# Since: 4.0
1214695a2c5SAlex Williamson##
1224695a2c5SAlex Williamson{ 'enum': 'PCIELinkSpeed',
1234695a2c5SAlex Williamson  'data': [ '2_5', '5', '8', '16' ] }
1244695a2c5SAlex Williamson
1254695a2c5SAlex Williamson##
1264695a2c5SAlex Williamson# @PCIELinkWidth:
1274695a2c5SAlex Williamson#
1284695a2c5SAlex Williamson# An enumeration of PCIe link width
1294695a2c5SAlex Williamson#
1304695a2c5SAlex Williamson# @1: x1
1314695a2c5SAlex Williamson#
1324695a2c5SAlex Williamson# @2: x2
1334695a2c5SAlex Williamson#
1344695a2c5SAlex Williamson# @4: x4
1354695a2c5SAlex Williamson#
1364695a2c5SAlex Williamson# @8: x8
1374695a2c5SAlex Williamson#
1384695a2c5SAlex Williamson# @12: x12
1394695a2c5SAlex Williamson#
1404695a2c5SAlex Williamson# @16: x16
1414695a2c5SAlex Williamson#
1424695a2c5SAlex Williamson# @32: x32
1434695a2c5SAlex Williamson#
1444695a2c5SAlex Williamson# Since: 4.0
1454695a2c5SAlex Williamson##
1464695a2c5SAlex Williamson{ 'enum': 'PCIELinkWidth',
1474695a2c5SAlex Williamson  'data': [ '1', '2', '4', '8', '12', '16', '32' ] }
148913d9063SKevin Wolf
149913d9063SKevin Wolf##
150913d9063SKevin Wolf# @HostMemPolicy:
151913d9063SKevin Wolf#
152913d9063SKevin Wolf# Host memory policy types
153913d9063SKevin Wolf#
154913d9063SKevin Wolf# @default: restore default policy, remove any nondefault policy
155913d9063SKevin Wolf#
156913d9063SKevin Wolf# @preferred: set the preferred host nodes for allocation
157913d9063SKevin Wolf#
158913d9063SKevin Wolf# @bind: a strict policy that restricts memory allocation to the
159913d9063SKevin Wolf#        host nodes specified
160913d9063SKevin Wolf#
161913d9063SKevin Wolf# @interleave: memory allocations are interleaved across the set
162913d9063SKevin Wolf#              of host nodes specified
163913d9063SKevin Wolf#
164913d9063SKevin Wolf# Since: 2.1
165913d9063SKevin Wolf##
166913d9063SKevin Wolf{ 'enum': 'HostMemPolicy',
167913d9063SKevin Wolf  'data': [ 'default', 'preferred', 'bind', 'interleave' ] }
1681156a675SKevin Wolf
1691156a675SKevin Wolf##
1701156a675SKevin Wolf# @NetFilterDirection:
1711156a675SKevin Wolf#
1721156a675SKevin Wolf# Indicates whether a netfilter is attached to a netdev's transmit queue or
1731156a675SKevin Wolf# receive queue or both.
1741156a675SKevin Wolf#
1751156a675SKevin Wolf# @all: the filter is attached both to the receive and the transmit
1761156a675SKevin Wolf#       queue of the netdev (default).
1771156a675SKevin Wolf#
1781156a675SKevin Wolf# @rx: the filter is attached to the receive queue of the netdev,
1791156a675SKevin Wolf#      where it will receive packets sent to the netdev.
1801156a675SKevin Wolf#
1811156a675SKevin Wolf# @tx: the filter is attached to the transmit queue of the netdev,
1821156a675SKevin Wolf#      where it will receive packets sent by the netdev.
1831156a675SKevin Wolf#
1841156a675SKevin Wolf# Since: 2.5
1851156a675SKevin Wolf##
1861156a675SKevin Wolf{ 'enum': 'NetFilterDirection',
1871156a675SKevin Wolf  'data': [ 'all', 'rx', 'tx' ] }
188*30e863e5SKevin Wolf
189*30e863e5SKevin Wolf##
190*30e863e5SKevin Wolf# @GrabToggleKeys:
191*30e863e5SKevin Wolf#
192*30e863e5SKevin Wolf# Keys to toggle input-linux between host and guest.
193*30e863e5SKevin Wolf#
194*30e863e5SKevin Wolf# Since: 4.0
195*30e863e5SKevin Wolf#
196*30e863e5SKevin Wolf##
197*30e863e5SKevin Wolf{ 'enum': 'GrabToggleKeys',
198*30e863e5SKevin Wolf  'data': [ 'ctrl-ctrl', 'alt-alt', 'shift-shift','meta-meta', 'scrolllock',
199*30e863e5SKevin Wolf            'ctrl-scrolllock' ] }
200