Commit 69717d0f authored by Peter Maydell's avatar Peter Maydell
Browse files

Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2019-10-22-v3' into staging



QAPI patches for 2019-10-22

# gpg: Signature made Tue 22 Oct 2019 15:56:36 BST
# gpg:                using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg:                issuer "armbru@redhat.com"
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full]
# gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>" [full]
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653

* remotes/armbru/tags/pull-qapi-2019-10-22-v3:
  qapi: Allow introspecting fix for savevm's cooperation with blockdev
  tests/qapi-schema: Cover feature documentation comments
  tests: qapi: Test 'features' of commands
  qapi: Add feature flags to commands
  tests/qapi-schema: Tidy up test output indentation
  qapi: Clear scripts/qapi/doc.py executable bits again
  qapi: Split up scripts/qapi/common.py
  qapi: Move gen_enum(), gen_enum_lookup() back to qapi/types.py
  qapi: Speed up frontend tests
  qapi: Eliminate accidental global frontend state
  qapi: Store pragma state in QAPISourceInfo, not global state
  qapi: Don't suppress doc generation without pragma doc-required

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents ec97eb61 5f76a7aa
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -582,13 +582,20 @@ qemu-ga$(EXESUF): QEMU_CFLAGS += -I qga/qapi-generated
qemu-keymap$(EXESUF): LIBS += $(XKBCOMMON_LIBS)
qemu-keymap$(EXESUF): QEMU_CFLAGS += $(XKBCOMMON_CFLAGS)

qapi-py = $(SRC_PATH)/scripts/qapi/commands.py \
qapi-py = $(SRC_PATH)/scripts/qapi/__init__.py \
$(SRC_PATH)/scripts/qapi/commands.py \
$(SRC_PATH)/scripts/qapi/common.py \
$(SRC_PATH)/scripts/qapi/doc.py \
$(SRC_PATH)/scripts/qapi/error.py \
$(SRC_PATH)/scripts/qapi/events.py \
$(SRC_PATH)/scripts/qapi/expr.py \
$(SRC_PATH)/scripts/qapi/gen.py \
$(SRC_PATH)/scripts/qapi/introspect.py \
$(SRC_PATH)/scripts/qapi/parser.py \
$(SRC_PATH)/scripts/qapi/schema.py \
$(SRC_PATH)/scripts/qapi/source.py \
$(SRC_PATH)/scripts/qapi/types.py \
$(SRC_PATH)/scripts/qapi/visit.py \
$(SRC_PATH)/scripts/qapi/common.py \
$(SRC_PATH)/scripts/qapi/doc.py \
$(SRC_PATH)/scripts/qapi-gen.py

qga/qapi-generated/qga-qapi-types.c qga/qapi-generated/qga-qapi-types.h \
+6 −4
Original line number Diff line number Diff line
@@ -457,7 +457,8 @@ Syntax:
                '*gen': false,
                '*allow-oob': true,
                '*allow-preconfig': true,
                '*if': COND }
                '*if': COND,
                '*features': FEATURES }

Member 'command' names the command.

@@ -640,9 +641,10 @@ change in the QMP syntax (usually by allowing values or operations
that previously resulted in an error).  QMP clients may still need to
know whether the extension is available.

For this purpose, a list of features can be specified for a struct type.
This is exposed to the client as a list of string, where each string
signals that this build of QEMU shows a certain behaviour.
For this purpose, a list of features can be specified for a command or
struct type.  This is exposed to the client as a list of strings,
where each string signals that this build of QEMU shows a certain
behaviour.

Each member of the 'features' array defines a feature.  It can either
be { 'name': STRING, '*if': COND }, or STRING, which is shorthand for
+5 −1
Original line number Diff line number Diff line
@@ -266,13 +266,17 @@
# @allow-oob: whether the command allows out-of-band execution,
#             defaults to false (Since: 2.12)
#
# @features: names of features associated with the command, in no particular
#            order. (since 4.2)
#
# TODO: @success-response (currently irrelevant, because it's QGA, not QMP)
#
# Since: 2.5
##
{ 'struct': 'SchemaInfoCommand',
  'data': { 'arg-type': 'str', 'ret-type': 'str',
            '*allow-oob': 'bool' } }
            '*allow-oob': 'bool',
            '*features': [ 'str' ] } }

##
# @SchemaInfoEvent:
+8 −1
Original line number Diff line number Diff line
@@ -1020,6 +1020,12 @@
#
# @cpu-index: The CPU to use for commands that require an implicit CPU
#
# Features:
# @savevm-monitor-nodes: If present, HMP command savevm only snapshots
#                        monitor-owned nodes if they have no parents.
#                        This allows the use of 'savevm' with
#                        -blockdev. (since 4.2)
#
# Returns: the output of the command as a string
#
# Since: 0.14.0
@@ -1047,7 +1053,8 @@
##
{ 'command': 'human-monitor-command',
  'data': {'command-line': 'str', '*cpu-index': 'int'},
  'returns': 'str' }
  'returns': 'str',
  'features': [ 'savevm-monitor-nodes' ] }

##
# @change:
+6 −4
Original line number Diff line number Diff line
@@ -5,16 +5,18 @@
# See the COPYING file in the top-level directory.

from __future__ import print_function

import argparse
import re
import sys
from qapi.common import QAPIError, QAPISchema
from qapi.types import gen_types
from qapi.visit import gen_visit

from qapi.commands import gen_commands
from qapi.doc import gen_doc
from qapi.events import gen_events
from qapi.introspect import gen_introspect
from qapi.doc import gen_doc
from qapi.schema import QAPIError, QAPISchema
from qapi.types import gen_types
from qapi.visit import gen_visit


def main(argv):
Loading