Skip to content

Commit

Permalink
qapi: Remove deprecated 'singlestep' member of StatusInfo
Browse files Browse the repository at this point in the history
This member has been deprecated before the 8.1 release, in commit
34c1820 ("qmp: Deprecate 'singlestep' member of StatusInfo").
Time to drop it.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20240117151430.29235-2-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
  • Loading branch information
philmd authored and huth committed Jan 19, 2024
1 parent 1e7886e commit fe17522
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 42 deletions.
14 changes: 0 additions & 14 deletions docs/about/deprecated.rst
Original file line number Diff line number Diff line change
Expand Up @@ -151,20 +151,6 @@ accepted incorrect commands will return an error. Users should make sure that
all arguments passed to ``device_add`` are consistent with the documented
property types.

``StatusInfo`` member ``singlestep`` (since 8.1)
''''''''''''''''''''''''''''''''''''''''''''''''

The ``singlestep`` member of the ``StatusInfo`` returned from the
``query-status`` command is deprecated. This member has a confusing
name and it never did what the documentation claimed or what its name
suggests. We do not believe that anybody is actually using the
information provided in this member.

The information it reports is whether the TCG JIT is in "one
instruction per translated block" mode (which can be set on the
command line or via the HMP, but not via QMP). The information remains
available via the HMP 'info jit' command.

QEMU Machine Protocol (QMP) events
----------------------------------

Expand Down
11 changes: 0 additions & 11 deletions qapi/run-state.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,25 +106,15 @@
#
# @running: true if all VCPUs are runnable, false if not runnable
#
# @singlestep: true if using TCG with one guest instruction per
# translation block
#
# @status: the virtual machine @RunState
#
# Features:
#
# @deprecated: Member 'singlestep' is deprecated (with no
# replacement).
#
# Since: 0.14
#
# Notes: @singlestep is enabled on the command line with '-accel
# tcg,one-insn-per-tb=on', or with the HMP 'one-insn-per-tb'
# command.
##
{ 'struct': 'StatusInfo',
'data': {'running': 'bool',
'singlestep': { 'type': 'bool', 'features': [ 'deprecated' ]},
'status': 'RunState'} }

##
Expand All @@ -140,7 +130,6 @@
#
# -> { "execute": "query-status" }
# <- { "return": { "running": true,
# "singlestep": false,
# "status": "running" } }
##
{ 'command': 'query-status', 'returns': 'StatusInfo',
Expand Down
8 changes: 0 additions & 8 deletions system/runstate.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,15 +242,7 @@ bool runstate_needs_reset(void)
StatusInfo *qmp_query_status(Error **errp)
{
StatusInfo *info = g_malloc0(sizeof(*info));
AccelState *accel = current_accel();

/*
* We ignore errors, which will happen if the accelerator
* is not TCG. "singlestep" is meaningless for other accelerators,
* so we will set the StatusInfo field to false for those.
*/
info->singlestep = object_property_get_bool(OBJECT(accel),
"one-insn-per-tb", NULL);
info->running = runstate_is_running();
info->status = current_run_state;

Expand Down
4 changes: 2 additions & 2 deletions tests/qemu-iotests/183.out
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ read 65536/65536 bytes at offset 0
'arguments': { 'uri': 'unix:SOCK_DIR/migrate', 'blk': true } }
{"return": {}}
{ 'execute': 'query-status' }
{"return": {"status": "postmigrate", "singlestep": false, "running": false}}
{"return": {"status": "postmigrate", "running": false}}

=== Do some I/O on the destination ===

{ 'execute': 'query-status' }
{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "RESUME"}
{"return": {"status": "running", "singlestep": false, "running": true}}
{"return": {"status": "running", "running": true}}
{ 'execute': 'human-monitor-command',
'arguments': { 'command-line':
'qemu-io disk "read -P 0x55 0 64k"' } }
Expand Down
8 changes: 4 additions & 4 deletions tests/qemu-iotests/234.out
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ Starting migration to B...
{"data": {"status": "completed"}, "event": "MIGRATION", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
completed
completed
{"return": {"running": false, "singlestep": false, "status": "postmigrate"}}
{"return": {"running": true, "singlestep": false, "status": "running"}}
{"return": {"running": false, "status": "postmigrate"}}
{"return": {"running": true, "status": "running"}}
Add a second parent to drive0-file...
{"return": {}}
Restart A with -incoming and second parent...
Expand All @@ -32,5 +32,5 @@ Starting migration back to A...
{"data": {"status": "completed"}, "event": "MIGRATION", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
completed
completed
{"return": {"running": true, "singlestep": false, "status": "running"}}
{"return": {"running": false, "singlestep": false, "status": "postmigrate"}}
{"return": {"running": true, "status": "running"}}
{"return": {"running": false, "status": "postmigrate"}}
4 changes: 2 additions & 2 deletions tests/qemu-iotests/262.out
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ Starting migration to B...
{"data": {"status": "completed"}, "event": "MIGRATION", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
completed
completed
{"return": {"running": false, "singlestep": false, "status": "postmigrate"}}
{"return": {"running": true, "singlestep": false, "status": "running"}}
{"return": {"running": false, "status": "postmigrate"}}
{"return": {"running": true, "status": "running"}}
2 changes: 1 addition & 1 deletion tests/qemu-iotests/280.out
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Enabling migration QMP events on VM...
VM is now stopped:
completed
{"execute": "query-status", "arguments": {}}
{"return": {"running": false, "singlestep": false, "status": "postmigrate"}}
{"return": {"running": false, "status": "postmigrate"}}

=== Create a snapshot of the disk image ===
{"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-top", "size": 0}}}
Expand Down

0 comments on commit fe17522

Please sign in to comment.