qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH v2 07/49] kvmapic: fixing loading vmstate


From: Pavel Dovgaluk
Subject: Re: [Qemu-devel] [RFC PATCH v2 07/49] kvmapic: fixing loading vmstate
Date: Tue, 29 Jul 2014 16:03:50 +0400

> From: Paolo Bonzini [mailto:address@hidden On Behalf Of Paolo Bonzini
> Il 17/07/2014 13:02, Pavel Dovgalyuk ha scritto:
> > diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c
> > index ce3d903..9d75ee0 100644
> > --- a/hw/intc/apic_common.c
> > +++ b/hw/intc/apic_common.c
> > @@ -347,7 +347,7 @@ static int apic_dispatch_post_load(void *opaque, int 
> > version_id)
> >
> >  static const VMStateDescription vmstate_apic_common = {
> >      .name = "apic",
> > -    .version_id = 3,
> > +    .version_id = 4,
> >      .minimum_version_id = 3,
> >      .minimum_version_id_old = 1,
> >      .load_state_old = apic_load_old,
> > @@ -374,6 +374,9 @@ static const VMStateDescription vmstate_apic_common = {
> >          VMSTATE_INT64(next_time, APICCommonState),
> >          VMSTATE_INT64(timer_expiry,
> >                        APICCommonState), /* open-coded timer state */
> > +        VMSTATE_INT32_V(sipi_vector, APICCommonState, 4),
> > +        VMSTATE_INT32_V(wait_for_sipi, APICCommonState, 4),
> 
> This could be a subsection.  sipi_vector is only used (needed) if 
> wait_for_sipi != 0.

  Right, sipi_vector is used when wait_for_sipi != 0. But we can set 
sipi_vector to non-zero,
save the snapshot, and then set wait_for_sipi. If that snapshot will be loaded, 
sipi_vector become incorrect.
Isn't this scenario possible?

Pavel Dovgalyuk




reply via email to

[Prev in Thread] Current Thread [Next in Thread]