qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Juan Quintela <quintela@redhat.com>
To: qemu-devel@nongnu.org
Cc: aliguori@us.ibm.com
Subject: [Qemu-devel] [PATCH 1/2] ram: remove support for loading v1
Date: Wed,  9 Sep 2009 12:47:40 +0200	[thread overview]
Message-ID: <eef0cff8c1adb8f290a2d0a06b9e354809104482.1252493145.git.quintela@redhat.com> (raw)
In-Reply-To: <cover.1252493145.git.quintela@redhat.com>
In-Reply-To: <cover.1252493145.git.quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 vl.c |   42 ------------------------------------------
 1 files changed, 0 insertions(+), 42 deletions(-)

diff --git a/vl.c b/vl.c
index 098daaa..4f8a91a 100644
--- a/vl.c
+++ b/vl.c
@@ -2874,45 +2874,6 @@ void qemu_del_wait_object(HANDLE handle, WaitObjectFunc *func, void *opaque)
 /***********************************************************/
 /* ram save/restore */

-static int ram_get_page(QEMUFile *f, uint8_t *buf, int len)
-{
-    int v;
-
-    v = qemu_get_byte(f);
-    switch(v) {
-    case 0:
-        if (qemu_get_buffer(f, buf, len) != len)
-            return -EIO;
-        break;
-    case 1:
-        v = qemu_get_byte(f);
-        memset(buf, v, len);
-        break;
-    default:
-        return -EINVAL;
-    }
-
-    if (qemu_file_has_error(f))
-        return -EIO;
-
-    return 0;
-}
-
-static int ram_load_v1(QEMUFile *f, void *opaque)
-{
-    int ret;
-    ram_addr_t i;
-
-    if (qemu_get_be32(f) != last_ram_offset)
-        return -EINVAL;
-    for(i = 0; i < last_ram_offset; i+= TARGET_PAGE_SIZE) {
-        ret = ram_get_page(f, qemu_get_ram_ptr(i), TARGET_PAGE_SIZE);
-        if (ret)
-            return ret;
-    }
-    return 0;
-}
-
 #define BDRV_HASH_BLOCK_SIZE 1024
 #define IOBUF_SIZE 4096
 #define RAM_CBLOCK_MAGIC 0xfabe
@@ -3147,9 +3108,6 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id)
     ram_addr_t addr;
     int flags;

-    if (version_id == 1)
-        return ram_load_v1(f, opaque);
-
     if (version_id == 2) {
         if (qemu_get_be32(f) != last_ram_offset)
             return -EINVAL;
-- 
1.6.2.5

  reply	other threads:[~2009-09-09 10:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-09 10:47 [Qemu-devel] [PATCH 0/2] SaveVM: Remove ram support for v1 and v2 Juan Quintela
2009-09-09 10:47 ` Juan Quintela [this message]
2009-09-09 10:47 ` [Qemu-devel] [PATCH 2/2] ram: Remove SaveVM Version 2 support Juan Quintela

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=eef0cff8c1adb8f290a2d0a06b9e354809104482.1252493145.git.quintela@redhat.com \
    --to=quintela@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /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).