[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH V7 24/29] loader: suppress rom_reset during cpr
From: |
Steve Sistare |
Subject: |
[PATCH V7 24/29] loader: suppress rom_reset during cpr |
Date: |
Wed, 22 Dec 2021 11:05:29 -0800 |
Reported-by: Zheng Chuan <zhengchuan@huawei.com>
Signed-off-by: Steve Sistare <steven.sistare@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
- [PATCH V7 20/29] vfio-pci: cpr part 2 (msi), (continued)
- [PATCH V7 20/29] vfio-pci: cpr part 2 (msi), Steve Sistare, 2021/12/22
- [PATCH V7 19/29] vfio-pci: cpr part 1 (fd and dma), Steve Sistare, 2021/12/22
- [PATCH V7 16/29] hostmem-memfd: cpr for memory-backend-memfd, Steve Sistare, 2021/12/22
- [PATCH V7 14/29] cpr: restart mode, Steve Sistare, 2021/12/22
- [PATCH V7 18/29] vfio-pci: refactor for cpr, Steve Sistare, 2021/12/22
- [PATCH V7 25/29] chardev: cpr framework, Steve Sistare, 2021/12/22
- [PATCH V7 26/29] chardev: cpr for simple devices, Steve Sistare, 2021/12/22
- [PATCH V7 29/29] cpr: only-cpr-capable option, Steve Sistare, 2021/12/22
- [PATCH V7 21/29] vfio-pci: cpr part 3 (intx), Steve Sistare, 2021/12/22
- [PATCH V7 22/29] vfio-pci: recover from unmap-all-vaddr failure, Steve Sistare, 2021/12/22
- [PATCH V7 24/29] loader: suppress rom_reset during cpr,
Steve Sistare <=
- [PATCH V7 23/29] vhost: reset vhost devices for cpr, Steve Sistare, 2021/12/22
- [PATCH V7 27/29] chardev: cpr for pty, Steve Sistare, 2021/12/22
- [PATCH V7 10/29] machine: memfd-alloc option, Steve Sistare, 2021/12/22
- [PATCH V7 08/29] memory: flat section iterator, Steve Sistare, 2021/12/22
- [PATCH V7 28/29] chardev: cpr for sockets, Steve Sistare, 2021/12/22