All of lore.kernel.org
 help / color / mirror / Atom feed
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 v5 3/3] hw/s390x: support migration of CPI data
Date: Tue,  3 Jun 2025 15:56:55 +0200	[thread overview]
Message-ID: <20250603135655.595602-4-shalini@linux.ibm.com> (raw)
In-Reply-To: <20250603135655.595602-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 | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/hw/s390x/sclpcpi.c b/hw/s390x/sclpcpi.c
index ec711e2291..12664b0a57 100644
--- a/hw/s390x/sclpcpi.c
+++ b/hw/s390x/sclpcpi.c
@@ -18,6 +18,7 @@
 #include "qemu/timer.h"
 #include "hw/s390x/event-facility.h"
 #include "hw/s390x/ebcdic.h"
+#include "migration/vmstate.h"
 
 typedef struct Data {
     uint8_t id_format;
@@ -93,12 +94,26 @@ static char *get_sysplex_name(Object *obj, Error **errp)
     return g_strndup((char *) e->sysplex_name, sizeof(e->sysplex_name));
 }
 
+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



  parent reply	other threads:[~2025-06-03 13:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-03 13:56 [PATCH v5 0/3] Add SCLP event type CPI Shalini Chellathurai Saroja
2025-06-03 13:56 ` [PATCH v5 1/3] hw/s390x: add " Shalini Chellathurai Saroja
2025-06-05  8:45   ` Nina Schoetterl-Glausch
2025-06-03 13:56 ` [PATCH v5 2/3] hw/s390x: add Control-Program Identification to QOM Shalini Chellathurai Saroja
2025-06-05  8:34   ` Nina Schoetterl-Glausch
2025-06-05 11:56     ` Thomas Huth
2025-06-05 12:03       ` Thomas Huth
2025-06-05 13:19         ` Nina Schoetterl-Glausch
2025-06-16  7:21         ` Shalini Chellathurai Saroja
2025-06-05 13:16       ` Nina Schotterl-Glausch
2025-06-16  7:14         ` Shalini Chellathurai Saroja
2025-06-06  9:34       ` Shalini Chellathurai Saroja
2025-06-13  9:59   ` Thomas Huth
2025-06-13 11:37     ` Shalini Chellathurai Saroja
2025-06-03 13:56 ` Shalini Chellathurai Saroja [this message]
2025-06-05 12:04   ` [PATCH v5 3/3] hw/s390x: support migration of CPI data Thomas Huth

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=20250603135655.595602-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.