@@ -73,6 +73,7 @@ static const char *action_string[] = {
"none",
"suspend",
"resume",
+ "force-reset",
};
static bool suspend_pending;
@@ -677,6 +678,8 @@ static bool record_intercept_action(VMI_intercept_command action)
case VMI_INTERCEPT_RESUME:
suspend_pending = false;
break;
+ case VMI_INTERCEPT_FORCE_RESET:
+ break;
default:
return false;
}
@@ -693,6 +696,9 @@ static bool intercept_action(VMIntrospection *i,
}
switch (action) {
+ case VMI_INTERCEPT_FORCE_RESET:
+ disconnect_and_unhook_kvmi(i);
+ return false;
case VMI_INTERCEPT_RESUME:
enable_socket_reconnect(i);
return false;
@@ -14,8 +14,10 @@ typedef enum {
VMI_INTERCEPT_NONE = 0,
VMI_INTERCEPT_SUSPEND,
VMI_INTERCEPT_RESUME,
+ VMI_INTERCEPT_FORCE_RESET,
} VMI_intercept_command;
bool vm_introspection_intercept(VMI_intercept_command ic, Error **errp);
+bool vm_introspection_qmp_delay(void *mon, QObject *id, bool resume);
#endif /* QEMU_VMI_INTERCEPT_H */
@@ -98,6 +98,10 @@ void qmp_stop(Error **errp)
void qmp_system_reset(Error **errp)
{
+ if (vm_introspection_intercept(VMI_INTERCEPT_FORCE_RESET, errp)) {
+ return;
+ }
+
qemu_system_reset_request(SHUTDOWN_CAUSE_HOST_QMP_SYSTEM_RESET);
}