提交 00e7c07b 编写于 作者: P Peter Maydell

Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20170320' into staging

One bugfix for device plug/unplug and migration in the
channel subsystem code.

# gpg: Signature made Mon 20 Mar 2017 08:45:59 GMT
# gpg:                using RSA key 0xDECF6B93C6F02FAF
# gpg: Good signature from "Cornelia Huck <huckc@linux.vnet.ibm.com>"
# gpg:                 aka "Cornelia Huck <cornelia.huck@de.ibm.com>"
# Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0  18CE DECF 6B93 C6F0 2FAF

* remotes/cohuck/tags/s390x-20170320:
  s390x/css: reassign subchannel if schid is changed after migration
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
......@@ -1675,12 +1675,27 @@ void subch_device_save(SubchDev *s, QEMUFile *f)
int subch_device_load(SubchDev *s, QEMUFile *f)
{
SubchDev *old_s;
uint16_t old_schid = s->schid;
int i;
s->cssid = qemu_get_byte(f);
s->ssid = qemu_get_byte(f);
s->schid = qemu_get_be16(f);
s->devno = qemu_get_be16(f);
/* Re-assign subch. */
if (old_schid != s->schid) {
old_s = channel_subsys.css[s->cssid]->sch_set[s->ssid]->sch[old_schid];
/*
* (old_s != s) means that some other device has its correct
* subchannel already assigned (in load).
*/
if (old_s == s) {
css_subch_assign(s->cssid, s->ssid, old_schid, s->devno, NULL);
}
/* It's OK to re-assign without a prior de-assign. */
css_subch_assign(s->cssid, s->ssid, s->schid, s->devno, s);
}
s->thinint_active = qemu_get_byte(f);
/* SCHIB */
/* PMCW */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册