From: Fabiano Rosas <farosas@suse.de>
To: qemu-devel@nongnu.org
Cc: Peter Xu <peterx@redhat.com>, Steve Sistare <steven.sistare@oracle.com>
Subject: [PULL 1/4] migration: cpr_is_incoming
Date: Fri, 14 Mar 2025 11:48:21 -0300 [thread overview]
Message-ID: <20250314144824.1707-2-farosas@suse.de> (raw)
In-Reply-To: <20250314144824.1707-1-farosas@suse.de>
From: Steve Sistare <steven.sistare@oracle.com>
Define the cpr_is_incoming helper, to be used in several cpr fix patches.
Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Message-ID: <1741380954-341079-2-git-send-email-steven.sistare@oracle.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
---
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 3a6deb7933..7561fc75ad 100644
--- a/include/migration/cpr.h
+++ b/include/migration/cpr.h
@@ -21,6 +21,7 @@ int cpr_find_fd(const char *name, int id);
MigMode cpr_get_incoming_mode(void);
void cpr_set_incoming_mode(MigMode mode);
+bool cpr_is_incoming(void);
int cpr_state_save(MigrationChannel *channel, Error **errp);
int cpr_state_load(MigrationChannel *channel, Error **errp);
diff --git a/migration/cpr.c b/migration/cpr.c
index 180faab247..42c46563e5 100644
--- a/migration/cpr.c
+++ b/migration/cpr.c
@@ -128,6 +128,11 @@ void cpr_set_incoming_mode(MigMode mode)
incoming_mode = mode;
}
+bool cpr_is_incoming(void)
+{
+ return incoming_mode != MIG_MODE_NONE;
+}
+
int cpr_state_save(MigrationChannel *channel, Error **errp)
{
int ret;
--
2.35.3
next prev parent reply other threads:[~2025-03-14 14:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-14 14:48 [PULL 0/4] Migration patches for 2025-03-14 Fabiano Rosas
2025-03-14 14:48 ` Fabiano Rosas [this message]
2025-03-14 14:48 ` [PULL 2/4] pflash: fix cpr Fabiano Rosas
2025-03-14 14:48 ` [PULL 3/4] hw/loader: fix roms during cpr Fabiano Rosas
2025-03-14 14:48 ` [PULL 4/4] hw/qxl: fix cpr Fabiano Rosas
2025-03-16 10:10 ` [PULL 0/4] Migration patches for 2025-03-14 Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250314144824.1707-2-farosas@suse.de \
--to=farosas@suse.de \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=steven.sistare@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).