qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Benoît Canet" <benoit@irqsave.net>
Cc: quintela@redhat.com, qemu-devel@nongnu.org,
	aneesh.kumar@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH 1/4] migration: Create the pre migration flush hook infrastructure.
Date: Thu, 11 Apr 2013 14:34:42 +0200	[thread overview]
Message-ID: <5166ADE2.6070004@redhat.com> (raw)
In-Reply-To: <1365682468-12301-2-git-send-email-benoit@irqsave.net>

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 <benoit@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

  parent reply	other threads:[~2013-04-11 12:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-11 12:14 [Qemu-devel] [PATCH 0/4] Virtio-9p live migration patchset Benoît Canet
2013-04-11 12:14 ` [Qemu-devel] [PATCH 1/4] migration: Create the pre migration flush hook infrastructure Benoît Canet
2013-04-11 12:16   ` Peter Maydell
2013-04-11 12:34   ` Paolo Bonzini [this message]
2013-04-11 12:14 ` [Qemu-devel] [PATCH 2/4] virtio-9p: Add support for 9p migration Benoît Canet
2013-04-11 12:14 ` [Qemu-devel] [PATCH 3/4] virtio-9p: Wait for 9p operations to complete before migration Benoît Canet
2013-04-11 12:38   ` Paolo Bonzini
2013-04-11 12:41     ` Peter Maydell
2013-04-11 12:14 ` [Qemu-devel] [PATCH 4/4] virtio-9p: Remove migration blockers Benoît Canet
2013-04-11 12:18   ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5166ADE2.6070004@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=benoit@irqsave.net \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).