---
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- [RFC 00/22] Add power-control to SPICE protocol corubba
- [PATCH spice 03/22] power: Add channel corubba
- [PATCH qemu 04/22] spice: Add power interface corubba
- [PATCH spice-common 01/22] proto: Add power channel corubba
- [PATCH qemu 16/22] spice: Add poweroff corubba
- [PATCH spice-gtk 17/22] power: Add poweroff corubba
- [PATCH qemu 10/22] spice: Add power reset corubba
- [PATCH spice 22/22] docs: Add power corubba
- [PATCH virt-viewer 12/22] spice: Add power reset corubba
- [PATCH spice-protocol 02/22] protocol: Add power channel corubba
- [PATCH virt-viewer 06/22] spice: Add power channel corubba
- [PATCH spice-common 07/22] proto: Add power reset message corubba
- [PATCH spice 09/22] power: Add reset corubba
- [PATCH spice-protocol 08/22] protocol: Add power reset messag... corubba
- [PATCH spice-common 13/22] proto: Add poweroff message corubba
- [PATCH spice-gtk 05/22] power: Add channel corubba
- [PATCH spice 20/22] power: Add capabilities corubba
