[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/4] migration: Create the pre migration flush h
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 1/4] migration: Create the pre migration flush hook infrastructure. |
Date: |
Thu, 11 Apr 2013 14:34:42 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 |
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 <address@hidden>
> + *
> + * 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