[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH v2 10/49] rtl8139: adding new fields to vmst
From: |
Pavel Dovgaluk |
Subject: |
Re: [Qemu-devel] [RFC PATCH v2 10/49] rtl8139: adding new fields to vmstate |
Date: |
Mon, 28 Jul 2014 13:54:23 +0400 |
> From: Paolo Bonzini [mailto:address@hidden On Behalf Of Paolo Bonzini
> Il 17/07/2014 13:02, Pavel Dovgalyuk ha scritto:
> > This patch adds virtual clock-dependent timers to VMState to allow correct
> > saving and restoring the state of RTL8139 network controller.
> >
> > Signed-off-by: Pavel Dovgalyuk <address@hidden>
> > ---
> > hw/net/rtl8139.c | 5 ++++-
> > 1 files changed, 4 insertions(+), 1 deletions(-)
> >
> > diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c
> > index 90bc5ec..992caf0 100644
> > --- a/hw/net/rtl8139.c
> > +++ b/hw/net/rtl8139.c
> > @@ -3289,7 +3289,7 @@ static void rtl8139_pre_save(void *opaque)
> >
> > static const VMStateDescription vmstate_rtl8139 = {
> > .name = "rtl8139",
> > - .version_id = 4,
> > + .version_id = 5,
> > .minimum_version_id = 3,
> > .post_load = rtl8139_post_load,
> > .pre_save = rtl8139_pre_save,
> > @@ -3363,6 +3363,9 @@ static const VMStateDescription vmstate_rtl8139 = {
> > VMSTATE_STRUCT(tally_counters, RTL8139State, 0,
> > vmstate_tally_counters, RTL8139TallyCounters),
> >
> > + VMSTATE_TIMER_V(timer, RTL8139State, 5),
>
> timer need not be migrated, because it is reinstated by rtl8139_post_load.
>
That's true for normal execution.
In replay execution mode post_load can be called before cached virtual clock
values are loaded. This may cause invalid setting of the timer and raising
an IRQ which didn't happen in record mode.
I will update this patch to fix post_load function and avoid this
non-deterministic behavior.
Pavel Dovgalyuk
- Re: [Qemu-devel] [RFC PATCH v2 07/49] kvmapic: fixing loading vmstate, (continued)
[Qemu-devel] [RFC PATCH v2 06/49] serial: fixing vmstate for save/restore, Pavel Dovgalyuk, 2014/07/17
[Qemu-devel] [RFC PATCH v2 08/49] hpet: fixing saving and loading process, Pavel Dovgalyuk, 2014/07/17
[Qemu-devel] [RFC PATCH v2 10/49] rtl8139: adding new fields to vmstate, Pavel Dovgalyuk, 2014/07/17
[Qemu-devel] [RFC PATCH v2 09/49] pckbd: adding new fields to vmstate, Pavel Dovgalyuk, 2014/07/17
[Qemu-devel] [RFC PATCH v2 42/49] replay: network packets record/replay, Pavel Dovgalyuk, 2014/07/17
[Qemu-devel] [RFC PATCH v2 44/49] replay: serial port, Pavel Dovgalyuk, 2014/07/17
[Qemu-devel] [RFC PATCH v2 43/49] replay: audio data record/replay, Pavel Dovgalyuk, 2014/07/17
[Qemu-devel] [RFC PATCH v2 45/49] replay: USB passthrough, Pavel Dovgalyuk, 2014/07/17
[Qemu-devel] [RFC PATCH v2 46/49] replay: replay_info command, Pavel Dovgalyuk, 2014/07/17