We'll soon need an enumeration type that lists all the softmmu targets that QEMU (the project) supports. Introduce @SysEmuTarget to "common.json". The enum constant @x86_64 doesn't match the QAPI convention of preferring hyphen ("-") over underscore ("_"). This is intentional; the @SysEmuTarget constants are supposed to produce QEMU executable names when stringified and appended to the "qemu-system-" prefix. Put differently, the replacement text of the TARGET_NAME preprocessor macro must be possible to look up in the list of (stringified) enum constants. Like other enum types, @SysEmuTarget too can be used for discriminator fields in unions. For the @i386 constant, a C-language union member called "i386" would be generated. On mingw build hosts, "i386" is a macro however. Add "i386" to "polluted_words" at once. Cc: "Daniel P. Berrange" <berrange@redhat.com> Cc: Eric Blake <eblake@redhat.com> Cc: Markus Armbruster <armbru@redhat.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20180427192852.15013-3-lersek@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
152 lines
3.3 KiB
Python
152 lines
3.3 KiB
Python
# -*- Mode: Python -*-
|
|
|
|
##
|
|
# = Common data types
|
|
##
|
|
|
|
##
|
|
# @QapiErrorClass:
|
|
#
|
|
# QEMU error classes
|
|
#
|
|
# @GenericError: this is used for errors that don't require a specific error
|
|
# class. This should be the default case for most errors
|
|
#
|
|
# @CommandNotFound: the requested command has not been found
|
|
#
|
|
# @DeviceNotActive: a device has failed to be become active
|
|
#
|
|
# @DeviceNotFound: the requested device has not been found
|
|
#
|
|
# @KVMMissingCap: the requested operation can't be fulfilled because a
|
|
# required KVM capability is missing
|
|
#
|
|
# Since: 1.2
|
|
##
|
|
{ 'enum': 'QapiErrorClass',
|
|
# Keep this in sync with ErrorClass in error.h
|
|
'data': [ 'GenericError', 'CommandNotFound',
|
|
'DeviceNotActive', 'DeviceNotFound', 'KVMMissingCap' ] }
|
|
|
|
##
|
|
# @IoOperationType:
|
|
#
|
|
# An enumeration of the I/O operation types
|
|
#
|
|
# @read: read operation
|
|
#
|
|
# @write: write operation
|
|
#
|
|
# Since: 2.1
|
|
##
|
|
{ 'enum': 'IoOperationType',
|
|
'data': [ 'read', 'write' ] }
|
|
|
|
##
|
|
# @OnOffAuto:
|
|
#
|
|
# An enumeration of three options: on, off, and auto
|
|
#
|
|
# @auto: QEMU selects the value between on and off
|
|
#
|
|
# @on: Enabled
|
|
#
|
|
# @off: Disabled
|
|
#
|
|
# Since: 2.2
|
|
##
|
|
{ 'enum': 'OnOffAuto',
|
|
'data': [ 'auto', 'on', 'off' ] }
|
|
|
|
##
|
|
# @OnOffSplit:
|
|
#
|
|
# An enumeration of three values: on, off, and split
|
|
#
|
|
# @on: Enabled
|
|
#
|
|
# @off: Disabled
|
|
#
|
|
# @split: Mixed
|
|
#
|
|
# Since: 2.6
|
|
##
|
|
{ 'enum': 'OnOffSplit',
|
|
'data': [ 'on', 'off', 'split' ] }
|
|
|
|
##
|
|
# @String:
|
|
#
|
|
# A fat type wrapping 'str', to be embedded in lists.
|
|
#
|
|
# Since: 1.2
|
|
##
|
|
{ 'struct': 'String',
|
|
'data': {
|
|
'str': 'str' } }
|
|
|
|
##
|
|
# @StrOrNull:
|
|
#
|
|
# This is a string value or the explicit lack of a string (null
|
|
# pointer in C). Intended for cases when 'optional absent' already
|
|
# has a different meaning.
|
|
#
|
|
# @s: the string value
|
|
# @n: no string value
|
|
#
|
|
# Since: 2.10
|
|
##
|
|
{ 'alternate': 'StrOrNull',
|
|
'data': { 's': 'str',
|
|
'n': 'null' } }
|
|
|
|
##
|
|
# @OffAutoPCIBAR:
|
|
#
|
|
# An enumeration of options for specifying a PCI BAR
|
|
#
|
|
# @off: The specified feature is disabled
|
|
#
|
|
# @auto: The PCI BAR for the feature is automatically selected
|
|
#
|
|
# @bar0: PCI BAR0 is used for the feature
|
|
#
|
|
# @bar1: PCI BAR1 is used for the feature
|
|
#
|
|
# @bar2: PCI BAR2 is used for the feature
|
|
#
|
|
# @bar3: PCI BAR3 is used for the feature
|
|
#
|
|
# @bar4: PCI BAR4 is used for the feature
|
|
#
|
|
# @bar5: PCI BAR5 is used for the feature
|
|
#
|
|
# Since: 2.12
|
|
##
|
|
{ 'enum': 'OffAutoPCIBAR',
|
|
'data': [ 'off', 'auto', 'bar0', 'bar1', 'bar2', 'bar3', 'bar4', 'bar5' ] }
|
|
|
|
##
|
|
# @SysEmuTarget:
|
|
#
|
|
# The comprehensive enumeration of QEMU system emulation ("softmmu")
|
|
# targets. Run "./configure --help" in the project root directory, and
|
|
# look for the *-softmmu targets near the "--target-list" option. The
|
|
# individual target constants are not documented here, for the time
|
|
# being.
|
|
#
|
|
# Notes: The resulting QMP strings can be appended to the "qemu-system-"
|
|
# prefix to produce the corresponding QEMU executable name. This
|
|
# is true even for "qemu-system-x86_64".
|
|
#
|
|
# Since: 2.13
|
|
##
|
|
{ 'enum' : 'SysEmuTarget',
|
|
'data' : [ 'aarch64', 'alpha', 'arm', 'cris', 'hppa', 'i386', 'lm32',
|
|
'm68k', 'microblaze', 'microblazeel', 'mips', 'mips64',
|
|
'mips64el', 'mipsel', 'moxie', 'nios2', 'or1k', 'ppc',
|
|
'ppc64', 'ppcemb', 'riscv32', 'riscv64', 's390x', 'sh4',
|
|
'sh4eb', 'sparc', 'sparc64', 'tricore', 'unicore32',
|
|
'x86_64', 'xtensa', 'xtensaeb' ] }
|