mirror of https://gitee.com/openkylin/qemu.git
QAPI and monitor patches for 2018-07-23 (3.0.0-rc2)
-----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJbVdNVAAoJEDhwtADrkYZT00MP+gL9WPGhKbmVsyNVwighKGic VkIv8rq3SWj3bdobOZrixR50ZgwOdc00e0SfSTTf23Pk7kmsgq0qgquO2pGn1Ob3 uqY4L3+DXw3SSbDZioRsAzuTZeKAu/b4yMLKyqWFHWERVInAFuwmV4+Dt3T62Og5 VL8/3kOdmqwOeoACtBONI1VEJdveDLjH7BHNGYJbsyMzUUAejYURzuJVRmwGU7/g r+8KfaSq1gq9rqbENCOJVVMkJ0IuSOZw1a9TwymWzxlaoY6hCN+fy3ac/cNWM7eX TtE11TnGGlwcM2/yCTL5PBGeLwBr1pQDW1qQhr4fG+enJRZveU2apJJVl+/ziEZt LB80eu2OKq9iMmSgo3zHsWkEvUPz5wkyPsmcTZTYlPnL5EHIrbq71mUUzjXPgkVE XAfBIXU/toEWaemVMy1a96Ejombx8UbxyPRDyY/fpRyEN9cNhfvcsi//36bofr33 aE6GwiyYUbdWuj9EhqgDBKTQwxNlk4D69GiBh6uEvXvC3c1VgAu1YFEqSv8AZfQ/ k9pSVZVx8AXhCviwS8141iu/5Ir3280TYv1nJVCBkdqvn/YIpXLeSbsKvZeOs941 O515r9Uv4pPjEsWOeWHSV+TF3LQxhZ9kKcYj4/3V7a+7RBER4Ec8EWANH+64bRIb cJuLfmDIQshzkrbjYB78 =bjEh -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2018-07-23' into staging QAPI and monitor patches for 2018-07-23 (3.0.0-rc2) # gpg: Signature made Mon 23 Jul 2018 14:08:37 BST # gpg: using RSA key 3870B400EB918653 # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-qapi-2018-07-23: monitor: Fix unsafe sharing of @cur_mon among threads qapi: Make 'allow-oob' optional in SchemaInfoCommand Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
9ba7dd1435
|
@ -6,7 +6,7 @@
|
|||
#include "qapi/qapi-types-misc.h"
|
||||
#include "qemu/readline.h"
|
||||
|
||||
extern Monitor *cur_mon;
|
||||
extern __thread Monitor *cur_mon;
|
||||
|
||||
/* flags for monitor_init */
|
||||
/* 0x01 unused */
|
||||
|
|
|
@ -290,7 +290,7 @@ static mon_cmd_t info_cmds[];
|
|||
|
||||
QmpCommandList qmp_commands, qmp_cap_negotiation_commands;
|
||||
|
||||
Monitor *cur_mon;
|
||||
__thread Monitor *cur_mon;
|
||||
|
||||
static void monitor_command_cb(void *opaque, const char *cmdline,
|
||||
void *readline_opaque);
|
||||
|
|
|
@ -259,8 +259,8 @@
|
|||
#
|
||||
# @ret-type: the name of the command's result type.
|
||||
#
|
||||
# @allow-oob: whether the command allows out-of-band execution.
|
||||
# (Since: 2.12)
|
||||
# @allow-oob: whether the command allows out-of-band execution,
|
||||
# defaults to false (Since: 2.12)
|
||||
#
|
||||
# TODO: @success-response (currently irrelevant, because it's QGA, not QMP)
|
||||
#
|
||||
|
@ -268,7 +268,7 @@
|
|||
##
|
||||
{ 'struct': 'SchemaInfoCommand',
|
||||
'data': { 'arg-type': 'str', 'ret-type': 'str',
|
||||
'allow-oob': 'bool' } }
|
||||
'*allow-oob': 'bool' } }
|
||||
|
||||
##
|
||||
# @SchemaInfoEvent:
|
||||
|
|
|
@ -184,11 +184,11 @@ def visit_command(self, name, info, ifcond, arg_type, ret_type, gen,
|
|||
success_response, boxed, allow_oob, allow_preconfig):
|
||||
arg_type = arg_type or self._schema.the_empty_object_type
|
||||
ret_type = ret_type or self._schema.the_empty_object_type
|
||||
self._gen_qlit(name, 'command',
|
||||
{'arg-type': self._use_type(arg_type),
|
||||
'ret-type': self._use_type(ret_type),
|
||||
'allow-oob': allow_oob},
|
||||
ifcond)
|
||||
obj = {'arg-type': self._use_type(arg_type),
|
||||
'ret-type': self._use_type(ret_type) }
|
||||
if allow_oob:
|
||||
obj['allow-oob'] = allow_oob
|
||||
self._gen_qlit(name, 'command', obj, ifcond)
|
||||
|
||||
def visit_event(self, name, info, ifcond, arg_type, boxed):
|
||||
arg_type = arg_type or self._schema.the_empty_object_type
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include "qemu-common.h"
|
||||
#include "monitor/monitor.h"
|
||||
|
||||
Monitor *cur_mon = NULL;
|
||||
__thread Monitor *cur_mon;
|
||||
|
||||
int monitor_get_fd(Monitor *mon, const char *name, Error **errp)
|
||||
{
|
||||
|
|
|
@ -69,7 +69,7 @@ int monitor_get_fd(Monitor *mon, const char *fdname, Error **errp)
|
|||
* stubs/monitor.c is defined, to make sure monitor.o is discarded
|
||||
* otherwise we get duplicate syms at link time.
|
||||
*/
|
||||
Monitor *cur_mon;
|
||||
__thread Monitor *cur_mon;
|
||||
void monitor_init(Chardev *chr, int flags) {}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue