diff options
author | Kevin Wolf <kwolf@redhat.com> | 2023-09-05 16:50:01 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2023-09-08 17:03:09 +0200 |
commit | 8686a689e5bc205bdba0e647c269b86756cbc504 (patch) | |
tree | 08f94b74dedb65a9c60b13316b857f8823b4e8c0 /include/migration | |
parent | 9ea473fb7bd01d350a860044b3d8e46f8747e865 (diff) | |
download | qemu-8686a689e5bc205bdba0e647c269b86756cbc504.zip qemu-8686a689e5bc205bdba0e647c269b86756cbc504.tar.gz qemu-8686a689e5bc205bdba0e647c269b86756cbc504.tar.bz2 |
vmstate: Mark VMStateInfo.get/put() coroutine_mixed_fn
Migration code can run both in coroutine context (the usual case) and
non-coroutine context (at least savevm/loadvm for snapshots). This also
affects the VMState callbacks, and devices must consider this. Change
the callback definition in VMStateInfo to be explicit about it.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-ID: <20230905145002.46391-2-kwolf@redhat.com>
Acked-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/migration')
-rw-r--r-- | include/migration/vmstate.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index d1b8abe..e4db910 100644 --- a/include/migration/vmstate.h +++ b/include/migration/vmstate.h @@ -41,9 +41,11 @@ typedef struct VMStateField VMStateField; */ struct VMStateInfo { const char *name; - int (*get)(QEMUFile *f, void *pv, size_t size, const VMStateField *field); - int (*put)(QEMUFile *f, void *pv, size_t size, const VMStateField *field, - JSONWriter *vmdesc); + int coroutine_mixed_fn (*get)(QEMUFile *f, void *pv, size_t size, + const VMStateField *field); + int coroutine_mixed_fn (*put)(QEMUFile *f, void *pv, size_t size, + const VMStateField *field, + JSONWriter *vmdesc); }; enum VMStateFlags { |