qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Avi Kivity <avi@redhat.com>
Cc: qemu-devel@nongnu.org, quintela@redhat.com
Subject: Re: [Qemu-devel] [PATCH 4/8] Remove support for version 3 ram_load
Date: Wed, 21 Dec 2011 07:57:18 -0600	[thread overview]
Message-ID: <4EF1E5BE.80108@codemonkey.ws> (raw)
In-Reply-To: <1324474477-22267-5-git-send-email-avi@redhat.com>

On 12/21/2011 07:34 AM, Avi Kivity wrote:
> Version 3 ram_load depends on ram_addrs, which are not stable.  Version 4
> was introduced in 0.13 (and RHEL 6), so this means live migration from 0.12
> and earlier to 1.1 or later will not work.

Can you please make a note on http://wiki.qemu.org/ChangeLog/Next

Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>

Regards,

Anthony Liguori

>
> Signed-off-by: Avi Kivity<avi@redhat.com>
> ---
>   arch_init.c |   18 ++++--------------
>   1 files changed, 4 insertions(+), 14 deletions(-)
>
> diff --git a/arch_init.c b/arch_init.c
> index 8a3f052..9b8a1f3 100644
> --- a/arch_init.c
> +++ b/arch_init.c
> @@ -366,7 +366,7 @@ int ram_load(QEMUFile *f, void *opaque, int version_id)
>       int flags;
>       int error;
>
> -    if (version_id<  3 || version_id>  4) {
> +    if (version_id<  4 || version_id>  4) {
>           return -EINVAL;
>       }
>
> @@ -377,11 +377,7 @@ int ram_load(QEMUFile *f, void *opaque, int version_id)
>           addr&= TARGET_PAGE_MASK;
>
>           if (flags&  RAM_SAVE_FLAG_MEM_SIZE) {
> -            if (version_id == 3) {
> -                if (addr != ram_bytes_total()) {
> -                    return -EINVAL;
> -                }
> -            } else {
> +            if (version_id == 4) {
>                   /* Synchronize RAM block list */
>                   char id[256];
>                   ram_addr_t length;
> @@ -419,10 +415,7 @@ int ram_load(QEMUFile *f, void *opaque, int version_id)
>               void *host;
>               uint8_t ch;
>
> -            if (version_id == 3)
> -                host = qemu_get_ram_ptr(addr);
> -            else
> -                host = host_from_stream_offset(f, addr, flags);
> +            host = host_from_stream_offset(f, addr, flags);
>               if (!host) {
>                   return -EINVAL;
>               }
> @@ -438,10 +431,7 @@ int ram_load(QEMUFile *f, void *opaque, int version_id)
>           } else if (flags&  RAM_SAVE_FLAG_PAGE) {
>               void *host;
>
> -            if (version_id == 3)
> -                host = qemu_get_ram_ptr(addr);
> -            else
> -                host = host_from_stream_offset(f, addr, flags);
> +            host = host_from_stream_offset(f, addr, flags);
>
>               qemu_get_buffer(f, host, TARGET_PAGE_SIZE);
>           }

  reply	other threads:[~2011-12-21 13:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-21 13:34 [Qemu-devel] [PATCH 0/8] Convert live migration to memory API Avi Kivity
2011-12-21 13:34 ` [Qemu-devel] [PATCH 1/8] Store MemoryRegion in RAMBlock Avi Kivity
2011-12-21 13:34 ` [Qemu-devel] [PATCH 2/8] Switch ram_save to the memory API Avi Kivity
2011-12-21 13:34 ` [Qemu-devel] [PATCH 3/8] Sort RAMBlocks by ID for migration, not by ram_addr Avi Kivity
2011-12-21 13:55   ` Anthony Liguori
2011-12-21 15:15     ` Avi Kivity
2011-12-21 13:34 ` [Qemu-devel] [PATCH 4/8] Remove support for version 3 ram_load Avi Kivity
2011-12-21 13:57   ` Anthony Liguori [this message]
2011-12-21 15:18     ` Avi Kivity
2011-12-21 13:34 ` [Qemu-devel] [PATCH 5/8] Convert ram_load() to the memory API Avi Kivity
2011-12-21 13:34 ` [Qemu-devel] [PATCH 6/8] memory: obsolete cpu_physical_memory_[gs]et_dirty_tracking() Avi Kivity
2011-12-21 13:34 ` [Qemu-devel] [PATCH 7/8] xen: convert framebuffer dirty tracking to memory API Avi Kivity
2011-12-21 13:34 ` [Qemu-devel] [PATCH 8/8] memory: obsolete more dirty memory related functions Avi Kivity
2011-12-21 13:59 ` [Qemu-devel] [PATCH 0/8] Convert live migration to memory API Anthony Liguori

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=4EF1E5BE.80108@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=avi@redhat.com \
    --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).