From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:34271) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QBrHO-0002cv-6h for qemu-devel@nongnu.org; Mon, 18 Apr 2011 12:26:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QBrHM-0007Fo-SL for qemu-devel@nongnu.org; Mon, 18 Apr 2011 12:26:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22353) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QBrHM-0007Fj-Gf for qemu-devel@nongnu.org; Mon, 18 Apr 2011 12:26:24 -0400 From: Juan Quintela In-Reply-To: <7e892c9654f16e4c163607222e1554394235ecf4.1303135172.git.yamahata@valinux.co.jp> (Isaku Yamahata's message of "Mon, 18 Apr 2011 23:01:08 +0900") References: <7e892c9654f16e4c163607222e1554394235ecf4.1303135172.git.yamahata@valinux.co.jp> Date: Mon, 18 Apr 2011 18:26:08 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [PATCH] acpi_piix4: fix save/load of PIIX4PMState Reply-To: quintela@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Isaku Yamahata Cc: mtosatti@redhat.com, qemu-devel@nongnu.org, kvm@vger.kernel.org, avi@redhat.com Isaku Yamahata wrote: > It's vmstate parameter was wrong. This patch fixes it. > > Reported-by: Avi Kivity > Signed-off-by: Isaku Yamahata > --- > hw/acpi_piix4.c | 3 +-- > 1 files changed, 1 insertions(+), 2 deletions(-) > > diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c > index 96f5222..3a8fece 100644 > --- a/hw/acpi_piix4.c > +++ b/hw/acpi_piix4.c > @@ -214,10 +214,9 @@ static int vmstate_acpi_post_load(void *opaque, int version_id) > { \ > .name = (stringify(_field)), \ > .version_id = 0, \ > - .num = GPE_LEN, \ > .info = &vmstate_info_uint16, \ > .size = sizeof(uint16_t), \ > - .flags = VMS_ARRAY | VMS_POINTER, \ > + .flags = VMS_SINGLE | VMS_POINTER, \ > .offset = vmstate_offset_pointer(_state, _field, uint8_t), > \ shouldn't last one still be uint16_t? I guess that on ich9, GPE becomes one array, do you have that code handy somewhere, just to see what you want to do? I think that best thing to do at this point is just to revert this whole patch. We are creating a new type for uint8_t, that becomes a pointer. We are not sending the length of that array, so we need to add a new version/subsection when we add ICH9 anyways. Seeing what you want to do would help me trying to figure out the best vmstate aproach. Thanks, Juan.