From: Jens Freimann <jfrei@linux.vnet.ibm.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>,
Alexander Graf <agraf@suse.de>,
Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: Jens Freimann <jfrei@linux.vnet.ibm.com>,
qemu-devel@nongnu.org, Fan Zhang <zhangfan@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH 4/4] s390x/ipl: make s390x ipl device aware of migration
Date: Thu, 12 Feb 2015 18:02:16 +0100 [thread overview]
Message-ID: <1423760536-58356-5-git-send-email-jfrei@linux.vnet.ibm.com> (raw)
In-Reply-To: <1423760536-58356-1-git-send-email-jfrei@linux.vnet.ibm.com>
From: Fan Zhang <zhangfan@linux.vnet.ibm.com>
We have to migrate the reipl parameters, so a reboot on the migrated machine
will behave just like on the origin. Otherwise, the reipl parameters configured
by the guest would be lost.
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Signed-off-by: Fan Zhang <zhangfan@linux.vnet.ibm.com>
---
hw/s390x/ipl.c | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c
index a1aa051..b57adbd 100644
--- a/hw/s390x/ipl.c
+++ b/hw/s390x/ipl.c
@@ -67,6 +67,33 @@ typedef struct S390IPLState {
uint16_t devno;
} S390IPLState;
+static const VMStateDescription vmstate_iplb = {
+ .name = "ipl/iplb",
+ .version_id = 0,
+ .minimum_version_id = 0,
+ .fields = (VMStateField[]) {
+ VMSTATE_UINT8_ARRAY(reserved1, IplParameterBlock, 110),
+ VMSTATE_UINT16(devno, IplParameterBlock),
+ VMSTATE_UINT8_ARRAY(reserved2, IplParameterBlock, 88),
+ VMSTATE_END_OF_LIST()
+ }
+};
+
+static const VMStateDescription vmstate_ipl = {
+ .name = "ipl",
+ .version_id = 0,
+ .minimum_version_id = 0,
+ .fields = (VMStateField[]) {
+ VMSTATE_UINT64(start_addr, S390IPLState),
+ VMSTATE_UINT64(bios_start_addr, S390IPLState),
+ VMSTATE_STRUCT(iplb, S390IPLState, 0, vmstate_iplb, IplParameterBlock),
+ VMSTATE_BOOL(iplb_valid, S390IPLState),
+ VMSTATE_UINT8(cssid, S390IPLState),
+ VMSTATE_UINT8(ssid, S390IPLState),
+ VMSTATE_UINT16(devno, S390IPLState),
+ VMSTATE_END_OF_LIST()
+ }
+};
static int s390_ipl_init(SysBusDevice *dev)
{
@@ -273,6 +300,7 @@ static void s390_ipl_class_init(ObjectClass *klass, void *data)
k->init = s390_ipl_init;
dc->props = s390_ipl_properties;
dc->reset = s390_ipl_reset;
+ dc->vmsd = &vmstate_ipl;
}
static const TypeInfo s390_ipl_info = {
--
2.1.4
next prev parent reply other threads:[~2015-02-12 17:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-12 17:02 [Qemu-devel] [PATCH 0/4] s390x/kvm: add support to change the IPL device in guest Jens Freimann
2015-02-12 17:02 ` [Qemu-devel] [PATCH 1/4] s390x/ipl: always load the bios for ccw machine Jens Freimann
2015-02-12 17:02 ` [Qemu-devel] [PATCH 2/4] s390x/ipl: support diagnose 308 subcodes 5 and 6 Jens Freimann
2015-02-12 17:02 ` [Qemu-devel] [PATCH 3/4] s390x/ipl: drop reipl parameters on resets Jens Freimann
2015-02-12 17:02 ` Jens Freimann [this message]
2015-02-13 16:36 ` [Qemu-devel] [PATCH 0/4] s390x/kvm: add support to change the IPL device in guest Christian Borntraeger
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=1423760536-58356-5-git-send-email-jfrei@linux.vnet.ibm.com \
--to=jfrei@linux.vnet.ibm.com \
--cc=agraf@suse.de \
--cc=borntraeger@de.ibm.com \
--cc=cornelia.huck@de.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=zhangfan@linux.vnet.ibm.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).