From: Steve Sistare <steven.sistare@oracle.com>
To: qemu-devel@nongnu.org
Cc: Philippe Mathieu-Daude <philmd@linaro.org>,
Richard Henderson <richard.henderson@linaro.org>,
Gerd Hoffmann <kraxel@redhat.com>, Kevin Wolf <kwolf@redhat.com>,
Hanna Reitz <hreitz@redhat.com>, Peter Xu <peterx@redhat.com>,
Fabiano Rosas <farosas@suse.de>,
Steve Sistare <steven.sistare@oracle.com>
Subject: [PATCH V1 1/4] migration: cpr_is_incoming
Date: Fri, 7 Mar 2025 12:55:51 -0800 [thread overview]
Message-ID: <1741380954-341079-2-git-send-email-steven.sistare@oracle.com> (raw)
In-Reply-To: <1741380954-341079-1-git-send-email-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>
---
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 3a6deb7..7561fc7 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 584b0b9..0e935ab 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;
--
1.8.3.1
next prev parent reply other threads:[~2025-03-07 20:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-07 20:55 [PATCH V1 0/4] skip memory init during CPR Steve Sistare
2025-03-07 20:55 ` Steve Sistare [this message]
2025-03-07 23:08 ` [PATCH V1 1/4] migration: cpr_is_incoming Peter Xu
2025-03-07 20:55 ` [PATCH V1 2/4] pflash: fix cpr Steve Sistare
2025-03-07 20:55 ` [PATCH V1 3/4] hw/loader: fix roms during cpr Steve Sistare
2025-03-07 20:55 ` [PATCH V1 4/4] hw/qxl: fix cpr Steve Sistare
2025-03-11 14:39 ` [PATCH V1 0/4] skip memory init during CPR Fabiano Rosas
2025-03-13 17:24 ` Fabiano Rosas
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=1741380954-341079-2-git-send-email-steven.sistare@oracle.com \
--to=steven.sistare@oracle.com \
--cc=farosas@suse.de \
--cc=hreitz@redhat.com \
--cc=kraxel@redhat.com \
--cc=kwolf@redhat.com \
--cc=peterx@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/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).