Lines Matching +full:- +full:- +full:with +full:- +full:coroutine
10 * See the COPYING.LIB file in the top-level directory.
17 #include "qapi/compat-policy.h"
19 #include "qapi/qmp-registry.h"
22 #include "qapi/qobject-input-visitor.h"
23 #include "qapi/qobject-output-visitor.h"
25 #include "qemu/coroutine.h"
26 #include "qemu/main-loop.h"
58 || (!strcmp(arg_name, "exec-oob") && allow_oob)) { in qmp_dispatch_check_obj()
65 error_setg(errp, "QMP input member '%s' clashes with '%s'", in qmp_dispatch_check_obj()
105 * Does @qdict look like a command to be run out-of-band?
109 return qdict_haskey(dict, "exec-oob") in qmp_is_oob()
119 Coroutine *co;
127 monitor_set_cur(qemu_coroutine_self(), data->cur_mon); in do_qmp_dispatch_bh()
128 data->cmd->fn(data->args, data->ret, data->errp); in do_qmp_dispatch_bh()
130 aio_co_wake(data->co); in do_qmp_dispatch_bh()
134 * Runs outside of coroutine context for OOB commands, but in coroutine
167 command = qdict_get_str(dict, "exec-oob"); in qmp_dispatch()
176 if (!compat_policy_input_ok(cmd->features, &compat_policy, in qmp_dispatch()
181 if (!cmd->enabled) { in qmp_dispatch()
185 cmd->disable_reason ? ": " : "", in qmp_dispatch()
186 cmd->disable_reason ?: ""); in qmp_dispatch()
189 if (oob && !(cmd->options & QCO_ALLOW_OOB)) { in qmp_dispatch()
208 if (!!(cmd->options & QCO_COROUTINE) == qemu_in_coroutine()) { in qmp_dispatch()
211 * Move the coroutine from iohandler_ctx to qemu_aio_context for in qmp_dispatch()
220 cmd->fn(args, &ret, &err); in qmp_dispatch()
238 * Case 1: we are in coroutine context, but command does not in qmp_dispatch()
239 * have QCO_COROUTINE. We need to drop out of coroutine in qmp_dispatch()
242 * Case 2: we are outside coroutine context, but command has in qmp_dispatch()
244 * outside coroutine context only when executing a command in qmp_dispatch()
247 assert(!oob && qemu_in_coroutine() && !(cmd->options & QCO_COROUTINE)); in qmp_dispatch()
268 if (cmd->options & QCO_NO_SUCCESS_RESP) { in qmp_dispatch()
273 * When the command's schema has no 'returns', cmd->fn() in qmp_dispatch()