mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-31 14:23:53 -06:00
Rework ram_control_load_hook to hook during block load
We need the names of RAMBlocks as they're loaded for RDMA, reuse a slightly modified ram_control_load_hook: a) Pass a 'data' parameter to use for the name in the block-reg case b) Only some hook types now require the presence of a hook function. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
b12f777798
commit
632e3a5cd8
6 changed files with 47 additions and 19 deletions
|
@ -63,16 +63,20 @@ typedef ssize_t (QEMUFileWritevBufferFunc)(void *opaque, struct iovec *iov,
|
|||
/*
|
||||
* This function provides hooks around different
|
||||
* stages of RAM migration.
|
||||
* 'opaque' is the backend specific data in QEMUFile
|
||||
* 'data' is call specific data associated with the 'flags' value
|
||||
*/
|
||||
typedef int (QEMURamHookFunc)(QEMUFile *f, void *opaque, uint64_t flags);
|
||||
typedef int (QEMURamHookFunc)(QEMUFile *f, void *opaque, uint64_t flags,
|
||||
void *data);
|
||||
|
||||
/*
|
||||
* Constants used by ram_control_* hooks
|
||||
*/
|
||||
#define RAM_CONTROL_SETUP 0
|
||||
#define RAM_CONTROL_ROUND 1
|
||||
#define RAM_CONTROL_HOOK 2
|
||||
#define RAM_CONTROL_FINISH 3
|
||||
#define RAM_CONTROL_SETUP 0
|
||||
#define RAM_CONTROL_ROUND 1
|
||||
#define RAM_CONTROL_HOOK 2
|
||||
#define RAM_CONTROL_FINISH 3
|
||||
#define RAM_CONTROL_BLOCK_REG 4
|
||||
|
||||
/*
|
||||
* This function allows override of where the RAM page
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue