mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
migration/ram.c: add a notifier chain for precopy
This patch adds a notifier chain for the memory precopy. This enables various precopy optimizations to be invoked at specific places. Signed-off-by: Wei Wang <wei.w.wang@intel.com> CC: Dr. David Alan Gilbert <dgilbert@redhat.com> CC: Juan Quintela <quintela@redhat.com> CC: Michael S. Tsirkin <mst@redhat.com> CC: Peter Xu <peterx@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Message-Id: <1544516693-5395-6-git-send-email-wei.w.wang@intel.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
parent
6bcb05fc42
commit
bd2270608f
4 changed files with 83 additions and 3 deletions
|
@ -20,6 +20,25 @@
|
|||
|
||||
/* migration/ram.c */
|
||||
|
||||
typedef enum PrecopyNotifyReason {
|
||||
PRECOPY_NOTIFY_SETUP = 0,
|
||||
PRECOPY_NOTIFY_BEFORE_BITMAP_SYNC = 1,
|
||||
PRECOPY_NOTIFY_AFTER_BITMAP_SYNC = 2,
|
||||
PRECOPY_NOTIFY_COMPLETE = 3,
|
||||
PRECOPY_NOTIFY_CLEANUP = 4,
|
||||
PRECOPY_NOTIFY_MAX = 5,
|
||||
} PrecopyNotifyReason;
|
||||
|
||||
typedef struct PrecopyNotifyData {
|
||||
enum PrecopyNotifyReason reason;
|
||||
Error **errp;
|
||||
} PrecopyNotifyData;
|
||||
|
||||
void precopy_infrastructure_init(void);
|
||||
void precopy_add_notifier(NotifierWithReturn *n);
|
||||
void precopy_remove_notifier(NotifierWithReturn *n);
|
||||
int precopy_notify(PrecopyNotifyReason reason, Error **errp);
|
||||
|
||||
void ram_mig_init(void);
|
||||
void qemu_guest_free_page_hint(void *addr, size_t len);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue