From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org
Cc: Stefan Hajnoczi <stefanha@redhat.com>,
Shalini Chellathurai Saroja <shalini@linux.ibm.com>,
Nina Schoetterl-Glausch <nsg@linux.ibm.com>
Subject: [PULL 05/19] hw/s390x: support migration of CPI data
Date: Thu, 26 Jun 2025 07:53:36 +0200 [thread overview]
Message-ID: <20250626055350.218271-6-thuth@redhat.com> (raw)
In-Reply-To: <20250626055350.218271-1-thuth@redhat.com>
From: Shalini Chellathurai Saroja <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>
Message-ID: <20250616140107.990538-4-shalini@linux.ibm.com>
Signed-off-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 440a5ff1eb6..7aa039d5100 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.50.0
next prev parent reply other threads:[~2025-06-26 5:55 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-26 5:53 [PULL 00/19] s390x and misc patches Thomas Huth
2025-06-26 5:53 ` [PULL 01/19] tests/functional/test_pc_cpu_hotplug_props: Set 'pc' machine type explicitly Thomas Huth
2025-06-26 5:53 ` [PULL 02/19] MAINTAINERS: Yoshinori Sato email address has been updated Thomas Huth
2025-06-26 5:53 ` [PULL 03/19] hw/s390x: add SCLP event type CPI Thomas Huth
2025-06-26 5:53 ` [PULL 04/19] hw/s390x: add Control-Program Identification to QOM Thomas Huth
2025-06-26 5:53 ` Thomas Huth [this message]
2025-06-26 5:53 ` [PULL 06/19] MAINTAINERS: add reviewers for some s390 areas Thomas Huth
2025-06-26 5:53 ` [PULL 07/19] hw/s390x/ccw-device: Fix memory leak in loadparm setter Thomas Huth
2025-06-26 5:53 ` [PULL 08/19] tests/vm: update openbsd image to 7.7 Thomas Huth
2025-06-26 5:53 ` [PULL 09/19] COPYING: replace FSF postal address with licenses URL Thomas Huth
2025-06-26 5:53 ` [PULL 10/19] libdecnumber: " Thomas Huth
2025-06-26 5:53 ` [PULL 11/19] include/libdecnumber: " Thomas Huth
2025-06-26 5:53 ` [PULL 12/19] include/hw: " Thomas Huth
2025-06-26 5:53 ` [PULL 13/19] include/qemu: " Thomas Huth
2025-06-26 5:53 ` [PULL 14/19] util/rcu.c: " Thomas Huth
2025-06-26 5:53 ` [PULL 15/19] hw: " Thomas Huth
2025-06-26 5:53 ` [PULL 16/19] scripts: " Thomas Huth
2025-06-26 5:53 ` [PULL 17/19] contrib: " Thomas Huth
2025-06-26 5:53 ` [PULL 18/19] target/xtensa: " Thomas Huth
2025-06-26 5:53 ` [PULL 19/19] target/i386/emulate: " Thomas Huth
2025-06-27 18:30 ` [PULL 00/19] s390x and misc patches Stefan Hajnoczi
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=20250626055350.218271-6-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=nsg@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=shalini@linux.ibm.com \
--cc=stefanha@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).