提交 28f8dbe8 编写于 作者: C Collin L. Walling 提交者: Cornelia Huck

s390/kvm: make TOD setting failures fatal for migration

If we fail to set a proper TOD clock on the target system,  this can
already result in some problematic cases. We print several warn messages
on source and target in that case.

If kvm fails to set a nonzero epoch index, then we must ultimately fail
the migration as this will result in a giant time leap backwards. This
patch lets the migration fail if we can not set the guest time on the
target.

On failure the guest will resume normally on the original host machine.
Signed-off-by: NCollin L. Walling <walling@linux.vnet.ibm.com>
Reviewed-by: NEric Farman <farman@linux.vnet.ibm.com>
Reviewed-by: NClaudio Imbrenda <imbrenda@linux.vnet.ibm.com>
Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
[split failure change from epoch index change, minor fixups]
Message-Id: <20171004105751.24655-3-borntraeger@de.ibm.com>
Reviewed-by: NThomas Huth <thuth@redhat.com>
Signed-off-by: NCornelia Huck <cohuck@redhat.com>
上级 7edd4a49
......@@ -189,13 +189,10 @@ static int gtod_load(QEMUFile *f, void *opaque, int version_id)
r = s390_set_clock(&tod_high, &tod_low);
if (r) {
warn_report("Unable to set guest clock for migration: %s",
strerror(-r));
error_printf("Guest clock will not be restored "
"which could cause the guest to hang.");
error_report("Unable to set KVM guest TOD clock: %s", strerror(-r));
}
return 0;
return r;
}
static SaveVMHandlers savevm_gtod = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册