diff options
Diffstat (limited to 'qapi')
-rw-r--r-- | qapi/block-core.json | 22 | ||||
-rw-r--r-- | qapi/common.json | 2 | ||||
-rw-r--r-- | qapi/introspect.json | 5 | ||||
-rw-r--r-- | qapi/job.json | 4 | ||||
-rw-r--r-- | qapi/migration.json | 16 | ||||
-rw-r--r-- | qapi/misc.json | 53 | ||||
-rw-r--r-- | qapi/net.json | 6 | ||||
-rw-r--r-- | qapi/qmp-dispatch.c | 8 | ||||
-rw-r--r-- | qapi/run-state.json | 8 | ||||
-rw-r--r-- | qapi/ui.json | 2 |
10 files changed, 96 insertions, 30 deletions
diff --git a/qapi/block-core.json b/qapi/block-core.json index 7dfa77a05c..4b1de474a9 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -2424,7 +2424,7 @@ # @vxhs: Since 2.10 # @throttle: Since 2.11 # @nvme: Since 2.12 -# @copy-on-read: Since 2.13 +# @copy-on-read: Since 3.0 # # Since: 2.9 ## @@ -2452,7 +2452,7 @@ # @x-check-cache-dropped: whether to check that page cache was dropped on live # migration. May cause noticeable delays if the image # file is large, do not use in production. -# (default: off) (since: 2.13) +# (default: off) (since: 3.0) # # Since: 2.9 ## @@ -4011,16 +4011,20 @@ } } ## -# @x-blockdev-create: +# @blockdev-create: # -# Create an image format on a given node. -# TODO Replace with something asynchronous (block job?) +# Starts a job to create an image format on a given node. The job is +# automatically finalized, but a manual job-dismiss is required. # -# Since: 2.12 +# @job-id: Identifier for the newly created job. +# +# @options: Options for the image creation. +# +# Since: 3.0 ## -{ 'command': 'x-blockdev-create', - 'data': 'BlockdevCreateOptions', - 'boxed': true } +{ 'command': 'blockdev-create', + 'data': { 'job-id': 'str', + 'options': 'BlockdevCreateOptions' } } ## # @blockdev-open-tray: diff --git a/qapi/common.json b/qapi/common.json index c811d04984..c367adc4b6 100644 --- a/qapi/common.json +++ b/qapi/common.json @@ -140,7 +140,7 @@ # prefix to produce the corresponding QEMU executable name. This # is true even for "qemu-system-x86_64". # -# Since: 2.13 +# Since: 3.0 ## { 'enum' : 'SysEmuTarget', 'data' : [ 'aarch64', 'alpha', 'arm', 'cris', 'hppa', 'i386', 'lm32', diff --git a/qapi/introspect.json b/qapi/introspect.json index c7f67b7d78..80a0a3e656 100644 --- a/qapi/introspect.json +++ b/qapi/introspect.json @@ -262,13 +262,16 @@ # @allow-oob: whether the command allows out-of-band execution. # (Since: 2.12) # +# @allow-preconfig: command can be executed in preconfig runstate, +# default: false (Since 3.0) +# # 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', 'allow-preconfig': 'bool' } } ## # @SchemaInfoEvent: diff --git a/qapi/job.json b/qapi/job.json index 970124de76..17d10037c4 100644 --- a/qapi/job.json +++ b/qapi/job.json @@ -17,10 +17,12 @@ # # @backup: drive backup job type, see "drive-backup" # +# @create: image creation job type, see "blockdev-create" (since 3.0) +# # Since: 1.7 ## { 'enum': 'JobType', - 'data': ['commit', 'stream', 'mirror', 'backup'] } + 'data': ['commit', 'stream', 'mirror', 'backup', 'create'] } ## # @JobStatus: diff --git a/qapi/migration.json b/qapi/migration.json index 3ec418dabf..dc9cc85545 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -89,9 +89,9 @@ # # @postcopy-active: like active, but now in postcopy mode. (since 2.5) # -# @postcopy-paused: during postcopy but paused. (since 2.13) +# @postcopy-paused: during postcopy but paused. (since 3.0) # -# @postcopy-recover: trying to recover from a paused postcopy. (since 2.13) +# @postcopy-recover: trying to recover from a paused postcopy. (since 3.0) # # @completed: migration is finished. # @@ -163,11 +163,11 @@ # # @postcopy-blocktime: total time when all vCPU were blocked during postcopy # live migration. This is only present when the postcopy-blocktime -# migration capability is enabled. (Since 2.13) +# migration capability is enabled. (Since 3.0) # # @postcopy-vcpu-blocktime: list of the postcopy blocktime per vCPU. This is # only present when the postcopy-blocktime migration capability -# is enabled. (Since 2.13) +# is enabled. (Since 3.0) # # # Since: 0.14.0 @@ -374,7 +374,7 @@ # (since 2.12) # # @postcopy-blocktime: Calculate downtime for postcopy live migration -# (since 2.13) +# (since 3.0) # # Since: 1.2 ## @@ -1034,7 +1034,7 @@ # @detach: this argument exists only for compatibility reasons and # is ignored by QEMU # -# @resume: resume one paused migration, default "off". (since 2.13) +# @resume: resume one paused migration, default "off". (since 3.0) # # Returns: nothing on success # @@ -1208,7 +1208,7 @@ # "arguments": { "uri": "tcp:192.168.1.200:12345" } } # <- { "return": {} } # -# Since: 2.13 +# Since: 3.0 ## { 'command': 'migrate-recover', 'data': { 'uri': 'str' }, 'allow-oob': true } @@ -1225,6 +1225,6 @@ # -> { "execute": "migrate-pause" } # <- { "return": {} } # -# Since: 2.13 +# Since: 3.0 ## { 'command': 'migrate-pause', 'allow-oob': true } diff --git a/qapi/misc.json b/qapi/misc.json index efc3d23057..f83a63a0ab 100644 --- a/qapi/misc.json +++ b/qapi/misc.json @@ -37,7 +37,8 @@ # ## { 'command': 'qmp_capabilities', - 'data': { '*enable': [ 'QMPCapability' ] } } + 'data': { '*enable': [ 'QMPCapability' ] }, + 'allow-preconfig': true } ## # @QMPCapability: @@ -155,7 +156,8 @@ # Note: This example has been shortened as the real response is too long. # ## -{ 'command': 'query-commands', 'returns': ['CommandInfo'] } +{ 'command': 'query-commands', 'returns': ['CommandInfo'], + 'allow-preconfig': true } ## # @LostTickPolicy: @@ -558,11 +560,11 @@ # @props: properties describing to which node/socket/core/thread # virtual CPU belongs to, provided if supported by board # -# @arch: base architecture of the cpu; deprecated since 2.13.0 in favor +# @arch: base architecture of the cpu; deprecated since 3.0.0 in favor # of @target # # @target: the QEMU system emulation target, which determines which -# additional fields will be listed (since 2.13) +# additional fields will be listed (since 3.0) # # Since: 2.12 # @@ -1243,6 +1245,29 @@ { 'command': 'cont' } ## +# @exit-preconfig: +# +# Exit from "preconfig" state +# +# This command makes QEMU exit the preconfig state and proceed with +# VM initialization using configuration data provided on the command line +# and via the QMP monitor during the preconfig state. The command is only +# available during the preconfig state (i.e. when the --preconfig command +# line option was in use). +# +# Since 3.0 +# +# Returns: nothing +# +# Example: +# +# -> { "execute": "exit-preconfig" } +# <- { "return": {} } +# +## +{ 'command': 'exit-preconfig', 'allow-preconfig': true } + +## # @system_wakeup: # # Wakeup guest from suspend. Does nothing in case the guest isn't suspended. @@ -2656,7 +2681,8 @@ # ## {'command': 'query-command-line-options', 'data': { '*option': 'str' }, - 'returns': ['CommandLineOptionInfo'] } + 'returns': ['CommandLineOptionInfo'], + 'allow-preconfig': true } ## # @X86CPURegister32: @@ -3267,7 +3293,8 @@ # ]} # ## -{ 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'] } +{ 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'], + 'allow-preconfig': true } ## # @GuidInfo: @@ -3491,3 +3518,17 @@ ## { 'command': 'x-oob-test', 'data' : { 'lock': 'bool' }, 'allow-oob': true } + +## +# @set-numa-node: +# +# Runtime equivalent of '-numa' CLI option, available at +# preconfigure stage to configure numa mapping before initializing +# machine. +# +# Since 3.0 +## +{ 'command': 'set-numa-node', 'boxed': true, + 'data': 'NumaOptions', + 'allow-preconfig': true +} diff --git a/qapi/net.json b/qapi/net.json index b8adf1f03f..32681a1af7 100644 --- a/qapi/net.json +++ b/qapi/net.json @@ -160,6 +160,9 @@ # @dnssearch: list of DNS suffixes to search, passed as DHCP option # to the guest # +# @domainname: guest-visible domain name of the virtual nameserver +# (since 2.12) +# # @ipv6-prefix: IPv6 network prefix (default is fec0::) (since # 2.6). The network prefix is given in the usual # hexadecimal IPv6 address notation. @@ -197,6 +200,7 @@ '*dhcpstart': 'str', '*dns': 'str', '*dnssearch': ['String'], + '*domainname': 'str', '*ipv6-prefix': 'str', '*ipv6-prefixlen': 'int', '*ipv6-host': 'str', @@ -498,7 +502,7 @@ # # Since: 1.2 # -# 'vlan': dropped in 2.13 +# 'vlan': dropped in 3.0 ## { 'struct': 'NetLegacy', 'data': { diff --git a/qapi/qmp-dispatch.c b/qapi/qmp-dispatch.c index f9377b27fd..935f9e159c 100644 --- a/qapi/qmp-dispatch.c +++ b/qapi/qmp-dispatch.c @@ -18,6 +18,7 @@ #include "qapi/qmp/qdict.h" #include "qapi/qmp/qjson.h" #include "qapi/qmp/qbool.h" +#include "sysemu/sysemu.h" QDict *qmp_dispatch_check_obj(const QObject *request, Error **errp) { @@ -101,6 +102,13 @@ static QObject *do_qmp_dispatch(QmpCommandList *cmds, QObject *request, return NULL; } + if (runstate_check(RUN_STATE_PRECONFIG) && + !(cmd->options & QCO_ALLOW_PRECONFIG)) { + error_setg(errp, "The command '%s' isn't permitted in '%s' state", + cmd->name, RunState_str(RUN_STATE_PRECONFIG)); + return NULL; + } + if (!qdict_haskey(dict, "arguments")) { args = qdict_new(); } else { diff --git a/qapi/run-state.json b/qapi/run-state.json index 1c9fff3aef..332e44897b 100644 --- a/qapi/run-state.json +++ b/qapi/run-state.json @@ -49,12 +49,15 @@ # @colo: guest is paused to save/restore VM state under colo checkpoint, # VM can not get into this state unless colo capability is enabled # for migration. (since 2.8) +# @preconfig: QEMU is paused before board specific init callback is executed. +# The state is reachable only if the --preconfig CLI option is used. +# (Since 3.0) ## { 'enum': 'RunState', 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused', 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm', 'running', 'save-vm', 'shutdown', 'suspended', 'watchdog', - 'guest-panicked', 'colo' ] } + 'guest-panicked', 'colo', 'preconfig' ] } ## # @StatusInfo: @@ -91,7 +94,8 @@ # "status": "running" } } # ## -{ 'command': 'query-status', 'returns': 'StatusInfo' } +{ 'command': 'query-status', 'returns': 'StatusInfo', + 'allow-preconfig': true } ## # @SHUTDOWN: diff --git a/qapi/ui.json b/qapi/ui.json index 3ad7835992..fc18a05f0f 100644 --- a/qapi/ui.json +++ b/qapi/ui.json @@ -1031,7 +1031,7 @@ # @core: Use OpenGL with Core (desktop) Context. # @es: Use OpenGL with ES (embedded systems) Context. # - # Since: 2.13 + # Since: 3.0 # ## { 'enum' : 'DisplayGLMode', |