@@ -259,6 +259,20 @@ static void s390_create_sclpconsole(SCLPDevice *sclp,
qdev_realize_and_unref(dev, ev_fac_bus, &error_fatal);
}
+static const VMStateDescription vmstate_cpi = {
+ .name = "s390_cpi",
+ .version_id = 0,
+ .minimum_version_id = 0,
+ .fields = (const VMStateField[]) {
+ VMSTATE_UINT8_ARRAY(system_type, Cpi, 8),
+ VMSTATE_UINT8_ARRAY(system_name, Cpi, 8),
+ VMSTATE_UINT64(system_level, Cpi),
+ VMSTATE_UINT8_ARRAY(sysplex_name, Cpi, 8),
+ VMSTATE_UINT64(timestamp, Cpi),
+ VMSTATE_END_OF_LIST()
+ }
+};
+
static void ccw_init(MachineState *machine)
{
MachineClass *mc = MACHINE_GET_CLASS(machine);
@@ -307,6 +321,9 @@ static void ccw_init(MachineState *machine)
ret = css_create_css_image(VIRTUAL_CSSID, true);
assert(ret == 0);
+ /* register CPI values */
+ vmstate_register_any(NULL, &vmstate_cpi, &ms->cpi);
+
css_register_vmstate();
/* Create VirtIO network adapters */
This commit saves the state of CPI values in the guest and transfers this state during live migration of the guest. Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com> --- hw/s390x/s390-virtio-ccw.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)