Il 11/04/2013 14:14, Benoît Canet ha scritto: > diff --git a/include/migration/migration-flush-hooks.h > b/include/migration/migration-flush-hooks.h > new file mode 100644 > index 0000000..be9e597 > --- /dev/null > +++ b/include/migration/migration-flush-hooks.h > @@ -0,0 +1,30 @@ > +/* > + * QEMU live pre migration flush hooks > + * > + * Copyright Nodalink, SARL. 2013 > + * > + * Authors: > + * Benoît Canet <ben...@irqsave.net> > + * > + * This work is licensed under the terms of the GNU GPL, version 2 or later. > + * See the COPYING file in the top-level directory. > + * > + */ > + > +#ifndef QEMU_MIGRATION_FLUSH_HOOKS_H > +#define QEMU_MIGRATION_FLUSH_HOOKS_H > + > +#include "qemu/queue.h" > + > +typedef struct MigrationFlushHookEntry { > + void (*flush_hook)(void); > + QTAILQ_ENTRY(MigrationFlushHookEntry) node; > +} MigrationFlushHookEntry; > + > +void init_migration_flush_hooks(void); > + > +void register_migration_flush_hook(void (*fn)(void)); > + > +void exec_migration_flush_hooks(void);
Note that the point where you execute this (do_vm_stop) is not just for migration. So, can you just use a VMState change notifier? If not, please make this a Notifier instead of using your own data structure. Paolo > +#endif