[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH V1 1/8] migration: cpr_needed_for_reuse
From: |
Steve Sistare |
Subject: |
[PATCH V1 1/8] migration: cpr_needed_for_reuse |
Date: |
Tue, 9 Jul 2024 13:58:50 -0700 |
Define a vmstate "needed" helper. This will be moved to the preceding patch
series "Live update: cpr-exec" because it is needed by multiple devices.
Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
---
include/migration/cpr.h | 1 +
migration/cpr.c | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/include/migration/cpr.h b/include/migration/cpr.h
index c6c60f8..8d20d3e 100644
--- a/include/migration/cpr.h
+++ b/include/migration/cpr.h
@@ -24,6 +24,7 @@ void cpr_resave_fd(const char *name, int id, int fd);
int cpr_state_save(Error **errp);
int cpr_state_load(Error **errp);
+bool cpr_needed_for_reuse(void *opaque);
QEMUFile *cpr_exec_output(Error **errp);
QEMUFile *cpr_exec_input(Error **errp);
diff --git a/migration/cpr.c b/migration/cpr.c
index f756c15..843241c 100644
--- a/migration/cpr.c
+++ b/migration/cpr.c
@@ -236,3 +236,8 @@ int cpr_state_load(Error **errp)
return ret;
}
+bool cpr_needed_for_reuse(void *opaque)
+{
+ MigMode mode = migrate_mode();
+ return mode == MIG_MODE_CPR_EXEC;
+}
--
1.8.3.1
- [PATCH V1 0/8] Live update: vfio, Steve Sistare, 2024/07/09
- [PATCH V1 2/8] pci: export msix_is_pending, Steve Sistare, 2024/07/09
- [PATCH V1 3/8] vfio-pci: refactor for cpr, Steve Sistare, 2024/07/09
- [PATCH V1 8/8] vfio-pci: recover from unmap-all-vaddr failure, Steve Sistare, 2024/07/09
- [PATCH V1 7/8] vfio: vfio_find_ram_discard_listener, Steve Sistare, 2024/07/09
- [PATCH V1 6/8] vfio-pci: cpr part 3 (intx), Steve Sistare, 2024/07/09
- [PATCH V1 1/8] migration: cpr_needed_for_reuse,
Steve Sistare <=
- [PATCH V1 4/8] vfio-pci: cpr part 1 (fd and dma), Steve Sistare, 2024/07/09
- [PATCH V1 5/8] vfio-pci: cpr part 2 (msi), Steve Sistare, 2024/07/09