mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-09-09 16:28:02 -06:00
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
1 changed files with 5 additions and 3 deletions
|
@ -41,8 +41,10 @@ typedef struct VMStateField VMStateField;
|
||||||
*/
|
*/
|
||||||
struct VMStateInfo {
|
struct VMStateInfo {
|
||||||
const char *name;
|
const char *name;
|
||||||
int (*get)(QEMUFile *f, void *pv, size_t size, const VMStateField *field);
|
int coroutine_mixed_fn (*get)(QEMUFile *f, void *pv, size_t size,
|
||||||
int (*put)(QEMUFile *f, void *pv, size_t size, const VMStateField *field,
|
const VMStateField *field);
|
||||||
|
int coroutine_mixed_fn (*put)(QEMUFile *f, void *pv, size_t size,
|
||||||
|
const VMStateField *field,
|
||||||
JSONWriter *vmdesc);
|
JSONWriter *vmdesc);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue