From 4b5e06c9465ece90b48cb0b978c0b898ea46e133 Mon Sep 17 00:00:00 2001 From: Nicholas Piggin Date: Mon, 22 Jul 2019 15:32:13 +1000 Subject: machine: Add wakeup method to MachineClass Waking from suspend is not logically a machine reset on all machines, particularly in the paravirtualized case rather than hardware emulated. The ppc spapr machine for example just invokes hypervisor to suspend, and expects that call to return with the machine in the same state (modulo some possible migration and reconfiguration details). Implement a machine ->wakeup method and use that if it exists. Signed-off-by: Nicholas Piggin Message-Id: <20190722053215.20808-2-npiggin@gmail.com> Acked-by: Paolo Bonzini Signed-off-by: David Gibson --- include/hw/boards.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/hw/boards.h') diff --git a/include/hw/boards.h b/include/hw/boards.h index aa35955..60d6921 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -180,6 +180,7 @@ struct MachineClass { void (*init)(MachineState *state); void (*reset)(MachineState *state); + void (*wakeup)(MachineState *state); void (*hot_add_cpu)(MachineState *state, const int64_t id, Error **errp); int (*kvm_type)(MachineState *machine, const char *arg); void (*smp_parse)(MachineState *ms, QemuOpts *opts); -- cgit v1.1