Received: from eggs.gnu.org ([2001:4830:134:3::10]:33900) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XC68Q-0005ym-1K for qemu-devel@nongnu.org; Tue, 29 Jul 2014 08:04:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XC68H-0007Vc-JW for qemu-devel@nongnu.org; Tue, 29 Jul 2014 08:04:01 -0400 Received: from mail.ispras.ru ([83.149.199.45]:36717) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XC68H-0007VX-Bz for qemu-devel@nongnu.org; Tue, 29 Jul 2014 08:03:53 -0400 From: "Pavel Dovgaluk" References: <20140717110153.8352.80175.stgit@PASHA-ISP> <20140717110238.8352.38648.stgit@PASHA-ISP> <53D60E9D.2040000@redhat.com> In-Reply-To: <53D60E9D.2040000@redhat.com> Date: Tue, 29 Jul 2014 16:03:50 +0400 Message-ID: <002501cfab25$2a4ca740$7ee5f5c0$@Dovgaluk@ispras.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Language: ru Subject: Re: [Qemu-devel] [RFC PATCH v2 07/49] kvmapic: fixing loading vmstate List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: 'Paolo Bonzini' , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, peter.crosthwaite@xilinx.com, mark.burton@greensocs.com, real@ispras.ru, batuzovk@ispras.ru, fred.konrad@greensocs.com > From: Paolo Bonzini [mailto:paolo.bonzini@gmail.com] 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 =3D { > > .name =3D "apic", > > - .version_id =3D 3, > > + .version_id =3D 4, > > .minimum_version_id =3D 3, > > .minimum_version_id_old =3D 1, > > .load_state_old =3D apic_load_old, > > @@ -374,6 +374,9 @@ static const VMStateDescription = vmstate_apic_common =3D { > > 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), >=20 > This could be a subsection. sipi_vector is only used (needed) if = wait_for_sipi !=3D 0. Right, sipi_vector is used when wait_for_sipi !=3D 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