[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH V8 32/39] loader: suppress rom_reset during cpr
From: |
Steve Sistare |
Subject: |
[PATCH V8 32/39] loader: suppress rom_reset during cpr |
Date: |
Wed, 15 Jun 2022 07:52:19 -0700 |
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 0548830..7b39c07 100644
--- a/hw/core/loader.c
+++ b/hw/core/loader.c
@@ -51,6 +51,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"
@@ -1153,6 +1154,7 @@ ssize_t 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) {
@@ -1163,7 +1165,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 V8 21/39] cpr: restart HMP interfaces, (continued)
- [PATCH V8 21/39] cpr: restart HMP interfaces, Steve Sistare, 2022/06/15
- [PATCH V8 24/39] pci: export export msix_is_pending, Steve Sistare, 2022/06/15
- [PATCH V8 31/39] vhost: reset vhost devices for cpr, Steve Sistare, 2022/06/15
- [PATCH V8 26/39] vfio-pci: refactor for cpr, Steve Sistare, 2022/06/15
- [PATCH V8 36/39] chardev: cpr for sockets, Steve Sistare, 2022/06/15
- [PATCH V8 28/39] vfio-pci: cpr part 2 (msi), Steve Sistare, 2022/06/15
- [PATCH V8 33/39] chardev: cpr framework, Steve Sistare, 2022/06/15
- [PATCH V8 35/39] chardev: cpr for pty, Steve Sistare, 2022/06/15
- [PATCH V8 32/39] loader: suppress rom_reset during cpr,
Steve Sistare <=
- [PATCH V8 37/39] cpr: only-cpr-capable option, Steve Sistare, 2022/06/15
- [PATCH V8 27/39] vfio-pci: cpr part 1 (fd and dma), Steve Sistare, 2022/06/15
- [PATCH V8 34/39] chardev: cpr for simple devices, Steve Sistare, 2022/06/15
- [PATCH V8 39/39] tests/avocado: add cpr regression test, Steve Sistare, 2022/06/15
- [PATCH V8 30/39] vfio-pci: recover from unmap-all-vaddr failure, Steve Sistare, 2022/06/15
- [PATCH V8 38/39] python/machine: add QEMUMachine accessors, Steve Sistare, 2022/06/15
- [PATCH V8 01/39] migration: fix populate_vfio_info, Steve Sistare, 2022/06/15