From: Heinz Graalfs <graa...@linux.vnet.ibm.com> This patch adds the necessary life migration pieces to sclpquiesce by using the vmstate_register.
Signed-off-by: Heinz Graalfs <graa...@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntrae...@de.ibm.com> --- hw/s390x/sclpquiesce.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/hw/s390x/sclpquiesce.c b/hw/s390x/sclpquiesce.c index 5fadc86..eba0e6e 100644 --- a/hw/s390x/sclpquiesce.c +++ b/hw/s390x/sclpquiesce.c @@ -65,6 +65,17 @@ static int read_event_data(SCLPEvent *event, EventBufferHeader *evt_buf_hdr, return 1; } +static const VMStateDescription vmstate_sclpquiesce = { + .name = "sclpquiesce", + .version_id = 0, + .minimum_version_id = 0, + .minimum_version_id_old = 0, + .fields = (VMStateField[]) { + VMSTATE_BOOL(event_pending, SCLPEvent), + VMSTATE_END_OF_LIST() + } +}; + typedef struct QuiesceNotifier QuiesceNotifier; static struct QuiesceNotifier { @@ -91,7 +102,7 @@ static int quiesce_init(SCLPEvent *event) qemu_register_powerdown_notifier(&qn.notifier); - return 0; + return vmstate_register(NULL, 0, &vmstate_sclpquiesce, event); } static void quiesce_class_init(ObjectClass *klass, void *data) -- 1.8.3.1