qemu/monitor
Markus Armbruster ec17de0ac0 migration: Fix migrate-set-parameters argument validation
Commit 741d4086c8 "migration: Use proper types in json" (v2.12.0)
switched MigrationParameters to narrower integer types, and removed
the simplified qmp_migrate_set_parameters()'s argument checking
accordingly.

Good idea, except qmp_migrate_set_parameters() takes
MigrateSetParameters, not MigrationParameters.  Its job is updating
migrate_get_current()->parameters (which *is* of type
MigrationParameters) according to its argument.  The integers now get
truncated silently.  Reproducer:

    ---> {'execute': 'query-migrate-parameters'}
    <--- {"return": {[...] "compress-threads": 8, [...]}}
    ---> {"execute": "migrate-set-parameters", "arguments": {"compress-threads": 257}}
    <--- {"return": {}}
    ---> {'execute': 'query-migrate-parameters'}
    <--- {"return": {[...] "compress-threads": 1, [...]}}

Fix by resynchronizing MigrateSetParameters with MigrationParameters.

Fixes: 741d4086c8
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <20210202141734.2488076-2-armbru@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2021-02-08 11:19:51 +00:00
..
hmp-cmds.c migration: Fix migrate-set-parameters argument validation 2021-02-08 11:19:51 +00:00
hmp.c machine: introduce MachineInitPhase 2020-12-15 12:51:52 -05:00
meson.build meson: add spice_headers dependency. 2020-10-15 11:14:40 +02:00
misc.c remove TCG includes from common code 2021-01-02 21:03:36 +01:00
monitor-internal.h monitor: Use GString instead of QString for output buffer 2020-12-19 10:38:35 +01:00
monitor.c monitor: Use GString instead of QString for output buffer 2020-12-19 10:38:35 +01:00
qmp-cmds-control.c qapi: A couple more QAPI_LIST_PREPEND() stragglers 2021-01-28 08:08:45 +01:00
qmp-cmds.c monitor/qmp-cmds.c: Don't include ui/vnc.h 2021-02-04 13:20:28 +01:00
qmp.c qmp: Resume OOB-enabled monitor before processing the request 2021-02-04 13:20:29 +01:00
trace-events qmp: Add more tracepoints 2021-02-04 13:20:29 +01:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00