---
 ui/spice-core.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/ui/spice-core.c b/ui/spice-core.c
index bdc18e8245..ecdaf19c72 100644
--- a/ui/spice-core.c
+++ b/ui/spice-core.c
@@ -658,11 +658,17 @@ void qemu_spice_display_init_done(void)
     qemu_add_vm_change_state_handler(vm_change_state_handler, NULL);
 }
 
+static void do_reset(SpicePowerInstance *sin) {
+    info_report("do_reset");
+    qemu_system_reset_request(SHUTDOWN_CAUSE_HOST_UI);
+}
+
 static const SpicePowerInterface power_sif = {
     .base.type          = SPICE_INTERFACE_POWER,
     .base.description   = "power",
     .base.major_version = SPICE_INTERFACE_POWER_MAJOR,
     .base.minor_version = SPICE_INTERFACE_POWER_MINOR,
+    .do_reset = do_reset,
 };
 static SpicePowerInstance power_sin = {
     .base.sif = &power_sif.base,
-- 
2.52.0

Reply via email to