From: Heinz Graalfs <graa...@linux.vnet.ibm.com>

This patch adds the necessary life migration pieces to the
event facility 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/event-facility.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/hw/s390x/event-facility.c b/hw/s390x/event-facility.c
index a3aceef..225b42c 100644
--- a/hw/s390x/event-facility.c
+++ b/hw/s390x/event-facility.c
@@ -313,6 +313,17 @@ static void command_handler(SCLPEventFacility *ef, SCCB 
*sccb, uint64_t code)
     }
 }
 
+static const VMStateDescription vmstate_eventfacility = {
+    .name = "sclpeventfacility",
+    .version_id = 0,
+    .minimum_version_id = 0,
+    .minimum_version_id_old = 0,
+    .fields      = (VMStateField[]) {
+        VMSTATE_UINT32(receive_mask, SCLPEventFacility),
+        VMSTATE_END_OF_LIST()
+     }
+};
+
 static int init_event_facility(S390SCLPDevice *sdev)
 {
     SCLPEventFacility *event_facility;
@@ -335,7 +346,7 @@ static int init_event_facility(S390SCLPDevice *sdev)
     }
     qdev_init_nofail(quiesce);
 
-    return 0;
+    return vmstate_register(NULL, 0, &vmstate_eventfacility, sdev->ef);
 }
 
 static void init_event_facility_class(ObjectClass *klass, void *data)
-- 
1.8.3.1


Reply via email to