summaryrefslogtreecommitdiff
path: root/hw/s390x
diff options
context:
space:
mode:
authorCornelia Huck <cornelia.huck@de.ibm.com>2015-06-24 10:57:23 +0200
committerCornelia Huck <cornelia.huck@de.ibm.com>2015-06-30 09:34:57 +0200
commitec7353a146bb39c3bb3e5ccc50ca585aed97b7cf (patch)
treef19099b8b69d23b35af321efd85810ae5431172d /hw/s390x
parentfa8b0ca5d1b69975b715a259d3586cadf7a5280f (diff)
downloadqemu-ec7353a146bb39c3bb3e5ccc50ca585aed97b7cf.tar.gz
css: mss/mcss-e vs. migration
Our main channel_subsys structure is not a device (yet), but we need to setup mss/mcss-e again if the guest had enabled it before. Use a hack that should catch most configurations (assuming that the guest will have enabled at least one device in higher subchannel sets or channel subsystems if it enabled the functionality.) Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'hw/s390x')
-rw-r--r--hw/s390x/css.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/hw/s390x/css.c b/hw/s390x/css.c
index 5561d807dc..a9cf3d7f97 100644
--- a/hw/s390x/css.c
+++ b/hw/s390x/css.c
@@ -1464,6 +1464,21 @@ int subch_device_load(SubchDev *s, QEMUFile *f)
}
s->ccw_fmt_1 = qemu_get_byte(f);
s->ccw_no_data_cnt = qemu_get_byte(f);
+ /*
+ * Hack alert. We don't migrate the channel subsystem status (no
+ * device!), but we need to find out if the guest enabled mss/mcss-e.
+ * If the subchannel is enabled, it certainly was able to access it,
+ * so adjust the max_ssid/max_cssid values for relevant ssid/cssid
+ * values. This is not watertight, but better than nothing.
+ */
+ if (s->curr_status.pmcw.flags & PMCW_FLAGS_MASK_ENA) {
+ if (s->ssid) {
+ channel_subsys->max_ssid = MAX_SSID;
+ }
+ if (s->cssid != channel_subsys->default_cssid) {
+ channel_subsys->max_cssid = MAX_CSSID;
+ }
+ }
return 0;
}