From: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
To: qemu-s390x mailing list <qemu-s390x@nongnu.org>,
Thomas Huth <thuth@redhat.com>
Cc: Daniel Berrange <berrange@redhat.com>,
qemu-devel mailing list <qemu-devel@nongnu.org>,
Nina Schoetterl-Glausch <nsg@linux.ibm.com>,
Hendrik Brueckner <brueckner@linux.ibm.com>,
Shalini Chellathurai Saroja <shalini@linux.ibm.com>
Subject: [PATCH v6 3/3] hw/s390x: support migration of CPI data
Date: Mon, 16 Jun 2025 16:01:07 +0200 [thread overview]
Message-ID: <20250616140107.990538-4-shalini@linux.ibm.com> (raw)
In-Reply-To: <20250616140107.990538-1-shalini@linux.ibm.com>
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>
---
hw/s390x/sclpcpi.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/hw/s390x/sclpcpi.c b/hw/s390x/sclpcpi.c
index 352ef0461d..88012f2279 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;
--
2.49.0
next prev parent reply other threads:[~2025-06-16 14:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-16 14:01 [PATCH v6 0/3] Add SCLP event type CPI Shalini Chellathurai Saroja
2025-06-16 14:01 ` [PATCH v6 1/3] hw/s390x: add " Shalini Chellathurai Saroja
2025-06-16 14:01 ` [PATCH v6 2/3] hw/s390x: add Control-Program Identification to QOM Shalini Chellathurai Saroja
2025-06-17 17:09 ` Nina Schoetterl-Glausch
2025-06-18 6:35 ` Shalini Chellathurai Saroja
2025-06-24 10:17 ` Thomas Huth
2025-06-16 14:01 ` Shalini Chellathurai Saroja [this message]
2025-06-24 10:25 ` [PATCH v6 0/3] Add SCLP event type CPI Thomas Huth
2025-06-26 8:28 ` Shalini Chellathurai Saroja
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250616140107.990538-4-shalini@linux.ibm.com \
--to=shalini@linux.ibm.com \
--cc=berrange@redhat.com \
--cc=brueckner@linux.ibm.com \
--cc=nsg@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).