[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH for-2.4 2/8] css: mss/mcss-e vs. migration
From: |
Cornelia Huck |
Subject: |
[Qemu-devel] [PATCH for-2.4 2/8] css: mss/mcss-e vs. migration |
Date: |
Fri, 26 Jun 2015 12:47:28 +0200 |
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 <address@hidden>
---
hw/s390x/css.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/hw/s390x/css.c b/hw/s390x/css.c
index 5561d80..a9cf3d7 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;
}
--
2.4.5
- [Qemu-devel] [PATCH for-2.4 0/8] s390x patches for 2.4, Cornelia Huck, 2015/06/26
- [Qemu-devel] [PATCH for-2.4 2/8] css: mss/mcss-e vs. migration,
Cornelia Huck <=
- [Qemu-devel] [PATCH for-2.4 5/8] s390x/css: Add a callback for when subchannel gets disabled, Cornelia Huck, 2015/06/26
- [Qemu-devel] [PATCH for-2.4 1/8] virtio-ccw: complete handling of guest-initiated resets, Cornelia Huck, 2015/06/26
- [Qemu-devel] [PATCH for-2.4 3/8] s390-ccw.img: Consume service interrupts, Cornelia Huck, 2015/06/26
- [Qemu-devel] [PATCH for-2.4 6/8] s390x/virtio-ccw: add virtio set-revision call, Cornelia Huck, 2015/06/26
- [Qemu-devel] [PATCH for-2.4 4/8] s390-ccw.img: update, Cornelia Huck, 2015/06/26
- [Qemu-devel] [PATCH for-2.4 7/8] s390x/virtio-ccw: support virtio-1 set_vq format, Cornelia Huck, 2015/06/26
- [Qemu-devel] [PATCH for-2.4 8/8] virtio-ccw: migrate ->revision, Cornelia Huck, 2015/06/26