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>
This commit is contained in:
parent
9ea473fb7b
commit
8686a689e5
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user