From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40783) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAZ8r-0001FJ-VZ for qemu-devel@nongnu.org; Thu, 02 Jul 2015 03:42:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZAZ8m-0006Rr-Rs for qemu-devel@nongnu.org; Thu, 02 Jul 2015 03:42:41 -0400 Received: from e06smtp13.uk.ibm.com ([195.75.94.109]:58924) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAZ8m-0006RM-HU for qemu-devel@nongnu.org; Thu, 02 Jul 2015 03:42:36 -0400 Received: from /spool/local by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 2 Jul 2015 08:42:33 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 70B362190056 for ; Thu, 2 Jul 2015 08:42:11 +0100 (BST) Received: from d06av05.portsmouth.uk.ibm.com (d06av05.portsmouth.uk.ibm.com [9.149.37.229]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t627gXew31260764 for ; Thu, 2 Jul 2015 07:42:33 GMT Received: from d06av05.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t627gWdm010011 for ; Thu, 2 Jul 2015 01:42:32 -0600 From: Cornelia Huck Date: Thu, 2 Jul 2015 09:42:16 +0200 Message-Id: <1435822945-30232-3-git-send-email-cornelia.huck@de.ibm.com> In-Reply-To: <1435822945-30232-1-git-send-email-cornelia.huck@de.ibm.com> References: <1435822945-30232-1-git-send-email-cornelia.huck@de.ibm.com> Subject: [Qemu-devel] [PULL for-2.4 02/11] css: mss/mcss-e vs. migration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: peter.maydell@linaro.org Cc: Cornelia Huck , borntraeger@de.ibm.com, jfrei@linux.vnet.ibm.com, qemu-devel@nongnu.org, agraf@suse.de 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 --- 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