From: Alex Williamson <alex.williamson@redhat.com>
To: quintela@redhat.com
Cc: qemu-devel@nongnu.org, mst@redhat.com
Subject: [Qemu-devel] Re: [PATCH] rtl8139: IO memory is not part of vmstate
Date: Thu, 09 Dec 2010 15:14:17 -0700 [thread overview]
Message-ID: <1291932857.2926.20.camel@x201> (raw)
In-Reply-To: <m3k4jihb1u.fsf@trasno.mitica>
On Thu, 2010-12-09 at 22:49 +0100, Juan Quintela wrote:
> Alex Williamson <alex.williamson@redhat.com> wrote:
> > The cpu_register_io_memory() value is unique to the VM instance and
> > should not be restored after migration/save. Doing so means we
> > could be pointing at arbitrary device's io regions after migration/restore.
> >
> > In this case, if we start a VM with a single rtl8139, hot add a 2nd,
> > migrate the VM, then hot remove the added NIC, the 1st NIC stops
> > working and the VM segfaults on reboot.
> >
> > Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
> > ---
> >
> > hw/rtl8139.c | 4 ++--
> > 1 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/hw/rtl8139.c b/hw/rtl8139.c
> > index d92981d..9c5fc84 100644
> > --- a/hw/rtl8139.c
> > +++ b/hw/rtl8139.c
> > @@ -3186,7 +3186,7 @@ static void rtl8139_pre_save(void *opaque)
> >
> > static const VMStateDescription vmstate_rtl8139 = {
> > .name = "rtl8139",
> > - .version_id = 4,
> > + .version_id = 5,
>
> No need to change version, format is still the same.
>
> > .minimum_version_id = 3,
> > .minimum_version_id_old = 3,
> > .post_load = rtl8139_post_load,
> > @@ -3234,7 +3234,7 @@ static const VMStateDescription vmstate_rtl8139 = {
> >
> > VMSTATE_UNUSED(4),
> > VMSTATE_MACADDR(conf.macaddr, RTL8139State),
> > - VMSTATE_INT32(rtl8139_mmio_io_addr, RTL8139State),
> > + VMSTATE_UNUSED(4),
>
> If we migrate from an old guest: we just ignore the value.
> If we migrate to one old guest, we send garbage, but as you told that we
> were already sending garbage, it looks ok, no?
NAK, if we don't bump the version, we don't know if we're migration
to/from a version 4 that includes the io address or not. We have no
good way to debug different binaries on different systems. It seems to
work today if we don't involve hotplug, so I think we have to maintain
version 4 as including the io address, and let version 5 drop it. I
tested old to new migrations, and as you expect, it does work.
Alex
next prev parent reply other threads:[~2010-12-09 22:14 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-09 19:16 [Qemu-devel] [PATCH] rtl8139: IO memory is not part of vmstate Alex Williamson
2010-12-09 21:49 ` [Qemu-devel] " Juan Quintela
2010-12-09 22:14 ` Alex Williamson [this message]
2010-12-12 10:28 ` Michael S. Tsirkin
2010-12-12 11:53 ` Juan Quintela
2010-12-12 12:01 ` Michael S. Tsirkin
2010-12-12 14:37 ` Juan Quintela
2010-12-12 16:29 ` Alex Williamson
2010-12-12 16:41 ` Michael S. Tsirkin
2010-12-12 21:25 ` Juan Quintela
2010-12-13 17:43 ` Alex Williamson
2010-12-13 17:50 ` Michael S. Tsirkin
2010-12-13 18:00 ` Alex Williamson
2010-12-13 18:54 ` Michael S. Tsirkin
2010-12-13 18:59 ` Alex Williamson
2010-12-13 19:06 ` Michael S. Tsirkin
2010-12-13 19:15 ` Alex Williamson
2010-12-14 4:43 ` Michael S. Tsirkin
2010-12-14 5:00 ` Alex Williamson
2010-12-14 12:32 ` Michael S. Tsirkin
2010-12-14 15:41 ` Alex Williamson
2010-12-14 15:59 ` Paolo Bonzini
2010-12-15 10:00 ` Michael S. Tsirkin
2010-12-15 17:12 ` Paolo Bonzini
2010-12-15 19:04 ` Michael S. Tsirkin
2010-12-16 12:45 ` Paolo Bonzini
2010-12-15 10:07 ` Michael S. Tsirkin
2010-12-15 16:05 ` Alex Williamson
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=1291932857.2926.20.camel@x201 \
--to=alex.williamson@redhat.com \
--cc=mst@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).