diff --git a/qapi/compat.json b/qapi/compat.json index fc24a58a9eac36cf8ce586bb931d32204a3e170c..ae3afc22df3c3dd2e4c945ceec66b6ec97ae7a68 100644 --- a/qapi/compat.json +++ b/qapi/compat.json @@ -11,11 +11,12 @@ # # @accept: Accept silently # @reject: Reject with an error +# @crash: abort() the process # # Since: 6.0 ## { 'enum': 'CompatPolicyInput', - 'data': [ 'accept', 'reject' ] } + 'data': [ 'accept', 'reject', 'crash' ] } ## # @CompatPolicyOutput: diff --git a/qapi/qmp-dispatch.c b/qapi/qmp-dispatch.c index 797df33be4f42264c9c7a4121b6aeeac7d19575e..59600210cec19dedf1aa61dc2f73430705f9f3f8 100644 --- a/qapi/qmp-dispatch.c +++ b/qapi/qmp-dispatch.c @@ -185,6 +185,7 @@ QDict *qmp_dispatch(const QmpCommandList *cmds, QObject *request, "Deprecated command %s disabled by policy", command); goto out; + case COMPAT_POLICY_INPUT_CRASH: default: abort(); } diff --git a/qapi/qobject-input-visitor.c b/qapi/qobject-input-visitor.c index bd94cf187aaf5083969bab34100ae344695f05d2..04b790412eb1d924e70638b1a1ec11dd43e57a01 100644 --- a/qapi/qobject-input-visitor.c +++ b/qapi/qobject-input-visitor.c @@ -676,6 +676,7 @@ static bool qobject_input_deprecated_accept(Visitor *v, const char *name, error_setg(errp, "Deprecated parameter '%s' disabled by policy", name); return false; + case COMPAT_POLICY_INPUT_CRASH: default: abort(); } diff --git a/qemu-options.hx b/qemu-options.hx index 6b5a244b3318dcda379dc48c2c93f8cfdb4fd241..d60a03d3a9733abc85089112e44667685c1e17f1 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -3508,7 +3508,7 @@ DEFHEADING() DEFHEADING(Debug/Expert options:) DEF("compat", HAS_ARG, QEMU_OPTION_compat, - "-compat [deprecated-input=accept|reject][,deprecated-output=accept|hide]\n" + "-compat [deprecated-input=accept|reject|crash][,deprecated-output=accept|hide]\n" " Policy for handling deprecated management interfaces\n", QEMU_ARCH_ALL) SRST @@ -3519,6 +3519,8 @@ SRST Accept deprecated commands and arguments ``deprecated-input=reject`` Reject deprecated commands and arguments + ``deprecated-input=crash`` + Crash on deprecated commands and arguments ``deprecated-output=accept`` (default) Emit deprecated command results and events ``deprecated-output=hide``