qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Chris Lalancette <clalance@redhat.com>
To: qemu-devel@nongnu.org
Cc: kvm@vger.kernel.org
Subject: [Qemu-devel] [PATCH]: Fix i2c_bus_save, which fixes KVM live migration
Date: Tue, 29 Jul 2008 08:55:56 +0200	[thread overview]
Message-ID: <488EBEFC.5040603@redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 523 bytes --]

Attached is a simple patch to make i2c_bus_save() put a 32-bit quantity in the
save file, which matches what i2c_bus_load() expects to pull out of the save
file later.  Without this fix in place, KVM live migration fails since the
sender is only sending 1 byte while the receiver is waiting to receive 4 bytes.

Avi, I don't know when you plan to next rebase KVM to upstream QEMU, but it's
probably a good idea to carry this patch so that live migration works at all.

Signed-off-by: Chris Lalancette <clalance@redhat.com>

[-- Attachment #2: qemu-i2c-migrate-fix.patch --]
[-- Type: text/x-patch, Size: 448 bytes --]

diff --git a/qemu/hw/i2c.c b/qemu/hw/i2c.c
index 5d283fb..f711db7 100644
--- a/qemu/hw/i2c.c
+++ b/qemu/hw/i2c.c
@@ -21,7 +21,7 @@ static void i2c_bus_save(QEMUFile *f, void *opaque)
 {
     i2c_bus *bus = (i2c_bus *)opaque;
 
-    qemu_put_byte(f, bus->current_dev ? bus->current_dev->address : -1);
+    qemu_put_be32(f, bus->current_dev ? bus->current_dev->address : -1);
 }
 
 static int i2c_bus_load(QEMUFile *f, void *opaque, int version_id)

             reply	other threads:[~2008-07-29  6:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-29  6:55 Chris Lalancette [this message]
2008-07-29 13:06 ` [Qemu-devel] Re: [PATCH]: Fix i2c_bus_save, which fixes KVM live migration Avi Kivity
2008-07-29 13:43 ` [Qemu-devel] " Anthony Liguori
2008-07-29 13:59 ` andrzej zaborowski
2008-07-29 18:18   ` Paul Brook
2008-07-29 18:35     ` andrzej zaborowski
2008-07-29 18:38       ` 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=488EBEFC.5040603@redhat.com \
    --to=clalance@redhat.com \
    --cc=kvm@vger.kernel.org \
    --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).