Skip to content

Commit

Permalink
qapi-schema: Collect run state stuff in qapi/run-state.json
Browse files Browse the repository at this point in the history
Cc: Paolo Bonzini <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Marc-André Lureau <[email protected]>
  • Loading branch information
Markus Armbruster committed Sep 4, 2017
1 parent a2ff5a4 commit 0e201d3
Show file tree
Hide file tree
Showing 5 changed files with 355 additions and 346 deletions.
1 change: 1 addition & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1338,6 +1338,7 @@ F: cpus.c
F: util/main-loop.c
F: util/qemu-timer.c
F: vl.c
F: qapi/run-state.json

Human Monitor (HMP)
M: Dr. David Alan Gilbert <[email protected]>
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ qapi-modules = $(SRC_PATH)/qapi-schema.json $(SRC_PATH)/qapi/common.json \
$(SRC_PATH)/qapi/crypto.json \
$(SRC_PATH)/qapi/event.json $(SRC_PATH)/qapi/introspect.json \
$(SRC_PATH)/qapi/rocker.json \
$(SRC_PATH)/qapi/run-state.json \
$(SRC_PATH)/qapi/sockets.json \
$(SRC_PATH)/qapi/trace.json

Expand Down
165 changes: 1 addition & 164 deletions qapi-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@

{ 'include': 'qapi/common.json' }
{ 'include': 'qapi/sockets.json' }
{ 'include': 'qapi/run-state.json' }
{ 'include': 'qapi/crypto.json' }
{ 'include': 'qapi/block.json' }
{ 'include': 'qapi/rocker.json' }
Expand Down Expand Up @@ -242,94 +243,6 @@
##
{ 'command': 'query-kvm', 'returns': 'KvmInfo' }

##
# @RunState:
#
# An enumeration of VM run states.
#
# @debug: QEMU is running on a debugger
#
# @finish-migrate: guest is paused to finish the migration process
#
# @inmigrate: guest is paused waiting for an incoming migration. Note
# that this state does not tell whether the machine will start at the
# end of the migration. This depends on the command-line -S option and
# any invocation of 'stop' or 'cont' that has happened since QEMU was
# started.
#
# @internal-error: An internal error that prevents further guest execution
# has occurred
#
# @io-error: the last IOP has failed and the device is configured to pause
# on I/O errors
#
# @paused: guest has been paused via the 'stop' command
#
# @postmigrate: guest is paused following a successful 'migrate'
#
# @prelaunch: QEMU was started with -S and guest has not started
#
# @restore-vm: guest is paused to restore VM state
#
# @running: guest is actively running
#
# @save-vm: guest is paused to save the VM state
#
# @shutdown: guest is shut down (and -no-shutdown is in use)
#
# @suspended: guest is suspended (ACPI S3)
#
# @watchdog: the watchdog action is configured to pause and has been triggered
#
# @guest-panicked: guest has been panicked as a result of guest OS panic
#
# @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)
##
{ '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' ] }

##
# @StatusInfo:
#
# Information about VCPU run state
#
# @running: true if all VCPUs are runnable, false if not runnable
#
# @singlestep: true if VCPUs are in single-step mode
#
# @status: the virtual machine @RunState
#
# Since: 0.14.0
#
# Notes: @singlestep is enabled through the GDB stub
##
{ 'struct': 'StatusInfo',
'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }

##
# @query-status:
#
# Query the run status of all VCPUs
#
# Returns: @StatusInfo reflecting all VCPUs
#
# Since: 0.14.0
#
# Example:
#
# -> { "execute": "query-status" }
# <- { "return": { "running": true,
# "singlestep": false,
# "status": "running" } }
#
##
{ 'command': 'query-status', 'returns': 'StatusInfo' }

##
# @UuidInfo:
#
Expand Down Expand Up @@ -6016,34 +5929,6 @@
##
{ 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }

##
# @WatchdogExpirationAction:
#
# An enumeration of the actions taken when the watchdog device's timer is
# expired
#
# @reset: system resets
#
# @shutdown: system shutdown, note that it is similar to @powerdown, which
# tries to set to system status and notify guest
#
# @poweroff: system poweroff, the emulator program exits
#
# @pause: system pauses, similar to @stop
#
# @debug: system enters debug state
#
# @none: nothing is done
#
# @inject-nmi: a non-maskable interrupt is injected into the first VCPU (all
# VCPUS on x86) (since 2.4)
#
# Since: 2.1
##
{ 'enum': 'WatchdogExpirationAction',
'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none',
'inject-nmi' ] }

##
# @IoOperationType:
#
Expand All @@ -6058,54 +5943,6 @@
{ 'enum': 'IoOperationType',
'data': [ 'read', 'write' ] }

##
# @GuestPanicAction:
#
# An enumeration of the actions taken when guest OS panic is detected
#
# @pause: system pauses
#
# Since: 2.1 (poweroff since 2.8)
##
{ 'enum': 'GuestPanicAction',
'data': [ 'pause', 'poweroff' ] }

##
# @GuestPanicInformationType:
#
# An enumeration of the guest panic information types
#
# Since: 2.9
##
{ 'enum': 'GuestPanicInformationType',
'data': [ 'hyper-v'] }

##
# @GuestPanicInformation:
#
# Information about a guest panic
#
# Since: 2.9
##
{'union': 'GuestPanicInformation',
'base': {'type': 'GuestPanicInformationType'},
'discriminator': 'type',
'data': { 'hyper-v': 'GuestPanicInformationHyperV' } }

##
# @GuestPanicInformationHyperV:
#
# Hyper-V specific guest panic information (HV crash MSRs)
#
# Since: 2.9
##
{'struct': 'GuestPanicInformationHyperV',
'data': { 'arg1': 'uint64',
'arg2': 'uint64',
'arg3': 'uint64',
'arg4': 'uint64',
'arg5': 'uint64' } }

##
# @rtc-reset-reinjection:
#
Expand Down
Loading

0 comments on commit 0e201d3

Please sign in to comment.