[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC V1 1/7] migration: cpr_needed_for_reuse
From: |
Steve Sistare |
Subject: |
[RFC V1 1/7] migration: cpr_needed_for_reuse |
Date: |
Fri, 12 Jul 2024 07:02:05 -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 c6c60f87bc..8d20d3ec49 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 f756c1552d..843241c073 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;
+}
--
2.39.3
- [RFC V1 0/7] Live update: vdpa, Steve Sistare, 2024/07/12
- [RFC V1 5/7] vdpa/cpr: use VHOST_NEW_OWNER, Steve Sistare, 2024/07/12
- [RFC V1 1/7] migration: cpr_needed_for_reuse,
Steve Sistare <=
- [RFC V1 6/7] vdpa/cpr: pass shadow parameter to dma functions, Steve Sistare, 2024/07/12
- [RFC V1 7/7] vdpa/cpr: preserve dma mappings, Steve Sistare, 2024/07/12
- [RFC V1 4/7] vdpa/cpr: kernel interfaces, Steve Sistare, 2024/07/12
- [RFC V1 2/7] migration: skip dirty memory tracking for cpr, Steve Sistare, 2024/07/12
- [RFC V1 3/7] vdpa/cpr: preserve device fd, Steve Sistare, 2024/07/12