Am 11.04.2017 um 17:07 hat Laurent Vivier geschrieben:
> On 11/04/2017 16:58, Kevin Wolf wrote:
> > Am 11.04.2017 um 16:50 hat Max Reitz geschrieben:
> >> In case of block migration, there may be writes to BlockBackends that do
> >> not have the write permission taken. Before this issue is fixed (which
> >> is not going to happen in 2.9), we therefore cannot assert that this is
> >> the case.
> >>
> >> Suggested-by: Kevin Wolf <[email protected]>
> >> Signed-off-by: Max Reitz <[email protected]>
> >
> > I tested block migration (migrate -b). Leaving postcopy migration, which
> > is apparently also broken, to Laurent.
> >
> > Reviewed-by: Kevin Wolf <[email protected]>
> > Tested-by: Kevin Wolf <[email protected]>
>
> With postcopy migration
>
> Tested-by: Laurent Vivier <[email protected]>
I think the following is the real fix for postcopy migration, in case
someone wants to give it a test before I send it as a proper patch (the
bug is a result of duplicating code between precopy/postcopy migration
instead of sharing it - commit d35ff5e6 only updated one of both).
Kevin
diff --git a/migration/savevm.c b/migration/savevm.c
index 3b19a4a..43fa9bf 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -1623,6 +1623,14 @@ static void loadvm_postcopy_handle_run_bh(void *opaque)
error_report_err(local_err);
}
+ /* If we get an error here, just don't restart the VM yet. */
+ blk_resume_after_migration(&local_err);
+ if (local_err) {
+ error_free(local_err);
+ local_err = NULL;
+ autostart = false;
+ }
+
trace_loadvm_postcopy_handle_run_cpu_sync();
cpu_synchronize_all_post_init();