mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
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>
This commit is contained in:
committed by
Thomas Huth
parent
f345978f24
commit
c61927ba8e
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user