From: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
To: qemu-s390x mailing list <qemu-s390x@nongnu.org>,
Thomas Huth <thuth@redhat.com>,
Daniel Berrange <berrange@redhat.com>
Cc: 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 v4 3/4] hw/s390x: support migration of CPI data
Date: Thu, 10 Apr 2025 17:09:33 +0200 [thread overview]
Message-ID: <20250410150934.1331433-4-shalini@linux.ibm.com> (raw)
In-Reply-To: <20250410150934.1331433-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>
---
hw/s390x/sclpcpi.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/hw/s390x/sclpcpi.c b/hw/s390x/sclpcpi.c
index dcc8bd3245..40a74c16b5 100644
--- a/hw/s390x/sclpcpi.c
+++ b/hw/s390x/sclpcpi.c
@@ -22,6 +22,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;
@@ -94,12 +95,36 @@ static void get_control_program_id(Object *obj, Visitor *v,
visit_type_S390ControlProgramId(v, name, &cpi, errp);
}
+static const VMStateDescription vmstate_control_program_id = {
+ .name = "s390_control_program_id",
+ .version_id = 0,
+ .fields = (const VMStateField[]) {
+ VMSTATE_UINT8_ARRAY(system_type, ControlProgramId, 8),
+ VMSTATE_UINT8_ARRAY(system_name, ControlProgramId, 8),
+ VMSTATE_UINT64(system_level, ControlProgramId),
+ VMSTATE_UINT8_ARRAY(sysplex_name, ControlProgramId, 8),
+ VMSTATE_UINT64(timestamp, ControlProgramId),
+ VMSTATE_END_OF_LIST()
+ }
+};
+
+static const VMStateDescription vmstate_sclpcpi = {
+ .name = "s390_sclpcpi",
+ .version_id = 0,
+ .fields = (const VMStateField[]) {
+ VMSTATE_STRUCT(cpi, SCLPEventCPI, 0, vmstate_control_program_id,
+ ControlProgramId),
+ VMSTATE_END_OF_LIST()
+ }
+};
+
static void cpi_class_init(ObjectClass *klass, 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-04-10 15:11 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-10 15:09 [PATCH v4 0/4] Add SCLP event type CPI Shalini Chellathurai Saroja
2025-04-10 15:09 ` [PATCH v4 1/4] hw/s390x: add " Shalini Chellathurai Saroja
2025-04-28 9:22 ` Janis Schoetterl-Glausch
2025-04-29 9:20 ` Nina Schoetterl-Glausch
2025-05-05 6:58 ` Shalini Chellathurai Saroja
2025-04-10 15:09 ` [PATCH v4 2/4] hw/s390x: add Control-Program Identification to QOM Shalini Chellathurai Saroja
2025-04-28 12:01 ` Nina Schoetterl-Glausch
2025-05-05 7:27 ` Shalini Chellathurai Saroja
2025-04-30 10:34 ` Thomas Huth
2025-05-05 7:42 ` Shalini Chellathurai Saroja
2025-04-10 15:09 ` Shalini Chellathurai Saroja [this message]
2025-04-10 15:09 ` [PATCH v4 4/4] hw/s390x: compat handling for backward migration Shalini Chellathurai Saroja
2025-04-28 12:05 ` Nina Schoetterl-Glausch
2025-05-05 8:54 ` Shalini Chellathurai Saroja
2025-05-06 6:39 ` Nina Schoetterl-Glausch
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=20250410150934.1331433-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).