aboutsummaryrefslogtreecommitdiff
path: root/hw/remote
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2024-03-05 15:59:16 +0100
committerMarkus Armbruster <armbru@redhat.com>2024-03-12 14:02:46 +0100
commit68192a5ffd00e4b5123b86fe93986d03ff066c68 (patch)
tree7939800d27eb7e25094a5c1bcee99f41427801e4 /hw/remote
parentef6783d3f7d06cf185971afbb30ff35209e9db49 (diff)
downloadqemu-68192a5ffd00e4b5123b86fe93986d03ff066c68.zip
qemu-68192a5ffd00e4b5123b86fe93986d03ff066c68.tar.gz
qemu-68192a5ffd00e4b5123b86fe93986d03ff066c68.tar.bz2
target/i386: Fix query-cpu-model-expansion to reject props
CpuModelInfo member @props is semantically a mapping from name to value, and syntactically a JSON object on the wire. This translates to QDict in C. Since the QAPI schema language lacks the means to express 'object', we use 'any' instead. This is QObject in C. Commands taking a CpuModelInfo argument need to check the QObject is a QDict. The i386 version of qmp_query_cpu_model_expansion() fails to check. Instead, @props is silently ignored when it's not an object. For instance, {"execute": "query-cpu-model-expansion", "arguments": {"type": "full", "model": {"name": "qemu64", "props": null}}} succeeds. Fix by refactoring the code to match the other targets. Now the command fails as it should: {"error": {"class": "GenericError", "desc": "Invalid parameter type for 'props', expected: object"}} Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-ID: <20240305145919.2186971-3-armbru@redhat.com>
Diffstat (limited to 'hw/remote')
0 files changed, 0 insertions, 0 deletions