Reported-by: Zheng Chuan <zhengch...@huawei.com> Signed-off-by: Steve Sistare <steven.sist...@oracle.com> --- hw/core/loader.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/core/loader.c b/hw/core/loader.c index 052a0fd..e88fab2 100644 --- a/hw/core/loader.c +++ b/hw/core/loader.c @@ -52,6 +52,7 @@ #include "hw/hw.h" #include "disas/disas.h" #include "migration/vmstate.h" +#include "migration/cpr.h" #include "monitor/monitor.h" #include "sysemu/reset.h" #include "sysemu/sysemu.h" @@ -1137,6 +1138,7 @@ int rom_add_option(const char *file, int32_t bootindex) static void rom_reset(void *unused) { Rom *rom; + bool cpr_is_active = (cpr_get_mode() != CPR_MODE_NONE); QTAILQ_FOREACH(rom, &roms, next) { if (rom->fw_file) { @@ -1147,7 +1149,7 @@ static void rom_reset(void *unused) * the data in during the next incoming migration in all cases. Note * that some of those RAMs can actually be modified by the guest. */ - if (runstate_check(RUN_STATE_INMIGRATE)) { + if (runstate_check(RUN_STATE_INMIGRATE) || cpr_is_active) { if (rom->data && rom->isrom) { /* * Free it so that a rom_reset after migration doesn't -- 1.8.3.1