|
@@ -60,11 +60,13 @@ void hmp_migrationmode(Monitor *mon, const QDict *qdict)
|
|
S390StAttribState *sas = s390_get_stattrib_device();
|
|
S390StAttribState *sas = s390_get_stattrib_device();
|
|
S390StAttribClass *sac = S390_STATTRIB_GET_CLASS(sas);
|
|
S390StAttribClass *sac = S390_STATTRIB_GET_CLASS(sas);
|
|
uint64_t what = qdict_get_int(qdict, "mode");
|
|
uint64_t what = qdict_get_int(qdict, "mode");
|
|
|
|
+ Error *local_err = NULL;
|
|
int r;
|
|
int r;
|
|
|
|
|
|
- r = sac->set_migrationmode(sas, what);
|
|
|
|
|
|
+ r = sac->set_migrationmode(sas, what, &local_err);
|
|
if (r < 0) {
|
|
if (r < 0) {
|
|
- monitor_printf(mon, "Error: %s", strerror(-r));
|
|
|
|
|
|
+ monitor_printf(mon, "Error: %s", error_get_pretty(local_err));
|
|
|
|
+ error_free(local_err);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -170,13 +172,15 @@ static int cmma_save_setup(QEMUFile *f, void *opaque)
|
|
{
|
|
{
|
|
S390StAttribState *sas = S390_STATTRIB(opaque);
|
|
S390StAttribState *sas = S390_STATTRIB(opaque);
|
|
S390StAttribClass *sac = S390_STATTRIB_GET_CLASS(sas);
|
|
S390StAttribClass *sac = S390_STATTRIB_GET_CLASS(sas);
|
|
|
|
+ Error *local_err = NULL;
|
|
int res;
|
|
int res;
|
|
/*
|
|
/*
|
|
* Signal that we want to start a migration, thus needing PGSTE dirty
|
|
* Signal that we want to start a migration, thus needing PGSTE dirty
|
|
* tracking.
|
|
* tracking.
|
|
*/
|
|
*/
|
|
- res = sac->set_migrationmode(sas, 1);
|
|
|
|
|
|
+ res = sac->set_migrationmode(sas, true, &local_err);
|
|
if (res) {
|
|
if (res) {
|
|
|
|
+ error_report_err(local_err);
|
|
return res;
|
|
return res;
|
|
}
|
|
}
|
|
qemu_put_be64(f, STATTR_FLAG_EOS);
|
|
qemu_put_be64(f, STATTR_FLAG_EOS);
|
|
@@ -260,7 +264,7 @@ static void cmma_save_cleanup(void *opaque)
|
|
{
|
|
{
|
|
S390StAttribState *sas = S390_STATTRIB(opaque);
|
|
S390StAttribState *sas = S390_STATTRIB(opaque);
|
|
S390StAttribClass *sac = S390_STATTRIB_GET_CLASS(sas);
|
|
S390StAttribClass *sac = S390_STATTRIB_GET_CLASS(sas);
|
|
- sac->set_migrationmode(sas, 0);
|
|
|
|
|
|
+ sac->set_migrationmode(sas, false, NULL);
|
|
}
|
|
}
|
|
|
|
|
|
static bool cmma_active(void *opaque)
|
|
static bool cmma_active(void *opaque)
|
|
@@ -293,7 +297,8 @@ static long long qemu_s390_get_dirtycount_stub(S390StAttribState *sa)
|
|
{
|
|
{
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
-static int qemu_s390_set_migrationmode_stub(S390StAttribState *sa, bool value)
|
|
|
|
|
|
+static int qemu_s390_set_migrationmode_stub(S390StAttribState *sa, bool value,
|
|
|
|
+ Error **errp)
|
|
{
|
|
{
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|