diff options
author | Shalini Chellathurai Saroja <shalini@linux.ibm.com> | 2025-06-16 16:01:07 +0200 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2025-06-25 17:04:40 +0200 |
commit | c61927ba8e4375fcb80aef9d9bc9e32b8130af01 (patch) | |
tree | a9bd4e031700cf8f59c74a435609cedd9d1a55a4 | |
parent | f345978f24becfab4445fbf1ed2519ee9101d1dd (diff) | |
download | qemu-c61927ba8e4375fcb80aef9d9bc9e32b8130af01.zip qemu-c61927ba8e4375fcb80aef9d9bc9e32b8130af01.tar.gz qemu-c61927ba8e4375fcb80aef9d9bc9e32b8130af01.tar.bz2 |
hw/s390x: support migration of CPI data
Register Control-Program Identification data with the live
migration infrastructure.
Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
Reviewed-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20250616140107.990538-4-shalini@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
-rw-r--r-- | hw/s390x/sclpcpi.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/hw/s390x/sclpcpi.c b/hw/s390x/sclpcpi.c index 440a5ff..7aa039d 100644 --- a/hw/s390x/sclpcpi.c +++ b/hw/s390x/sclpcpi.c @@ -54,6 +54,7 @@ #include "hw/s390x/event-facility.h" #include "hw/s390x/ebcdic.h" #include "qapi/qapi-visit-machine.h" +#include "migration/vmstate.h" typedef struct Data { uint8_t id_format; @@ -145,12 +146,26 @@ static void get_timestamp(Object *obj, Visitor *v, const char *name, visit_type_uint64(v, name, &e->timestamp, errp); } +static const VMStateDescription vmstate_sclpcpi = { + .name = "s390_control_program_id", + .version_id = 0, + .fields = (const VMStateField[]) { + VMSTATE_UINT8_ARRAY(system_type, SCLPEventCPI, 8), + VMSTATE_UINT8_ARRAY(system_name, SCLPEventCPI, 8), + VMSTATE_UINT64(system_level, SCLPEventCPI), + VMSTATE_UINT8_ARRAY(sysplex_name, SCLPEventCPI, 8), + VMSTATE_UINT64(timestamp, SCLPEventCPI), + VMSTATE_END_OF_LIST() + } +}; + static void cpi_class_init(ObjectClass *klass, const void *data) { DeviceClass *dc = DEVICE_CLASS(klass); SCLPEventClass *k = SCLP_EVENT_CLASS(klass); dc->user_creatable = false; + dc->vmsd = &vmstate_sclpcpi; k->can_handle_event = can_handle_event; k->get_send_mask = send_mask; |