From: Paolo Bonzini Date: Tue, 3 Nov 2020 09:39:02 +0000 (-0500) Subject: object: add more commands to preconfig mode X-Git-Tag: v6.1.0-rc0~100^2~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9e33013bd494b43c81a2730b9f5cba2b5743343b;p=thirdparty%2Fqemu.git object: add more commands to preconfig mode Creating and destroying QOM objects does not require a fully constructed machine. Allow running object-add and object-del before machine initialization has concluded. Signed-off-by: Paolo Bonzini --- diff --git a/hmp-commands.hx b/hmp-commands.hx index 435c591a1cc..146a13c8966 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -1297,6 +1297,7 @@ ERST .help = "create QOM object", .cmd = hmp_object_add, .command_completion = object_add_completion, + .flags = "p", }, SRST @@ -1311,6 +1312,7 @@ ERST .help = "destroy QOM object", .cmd = hmp_object_del, .command_completion = object_del_completion, + .flags = "p", }, SRST diff --git a/qapi/qom.json b/qapi/qom.json index 40d70c434a0..4f48035831a 100644 --- a/qapi/qom.json +++ b/qapi/qom.json @@ -857,7 +857,8 @@ # <- { "return": {} } # ## -{ 'command': 'object-add', 'data': 'ObjectOptions', 'boxed': true } +{ 'command': 'object-add', 'data': 'ObjectOptions', 'boxed': true, + 'allow-preconfig': true } ## # @object-del: @@ -877,4 +878,5 @@ # <- { "return": {} } # ## -{ 'command': 'object-del', 'data': {'id': 'str'} } +{ 'command': 'object-del', 'data': {'id': 'str'}, + 'allow-preconfig': true }