From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=34979 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q2KnF-0003JV-6S for qemu-devel@nongnu.org; Wed, 23 Mar 2011 05:55:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q2KnD-0006M5-Gm for qemu-devel@nongnu.org; Wed, 23 Mar 2011 05:55:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:19473) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q2KnD-0006Lz-4D for qemu-devel@nongnu.org; Wed, 23 Mar 2011 05:55:55 -0400 From: Juan Quintela In-Reply-To: <1300839376-22520-6-git-send-email-aliguori@us.ibm.com> (Anthony Liguori's message of "Tue, 22 Mar 2011 19:16:10 -0500") References: <1300839376-22520-1-git-send-email-aliguori@us.ibm.com> <1300839376-22520-6-git-send-email-aliguori@us.ibm.com> Date: Wed, 23 Mar 2011 10:54:13 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Qemu-devel] Re: [PATCH 05/11] vga-isa: fix migration by breaking it Reply-To: quintela@redhat.com List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Jan Kiszka , qemu-devel@nongnu.org Anthony Liguori wrote: > This is pretty sad. We use the same section name for vga-isa as we do for > vga-pci even though we use separate formats. This breaks the live migration > protocol because we may misinterpret the vga-isa as a vga-pci device. > > vga-isa should use it's own wrapper just like vga-pci does. That's what we do > in this patch. > > Signed-by-off: Anthony Liguori > --- > hw/vga-isa.c | 13 +++++++++++-- > 1 files changed, 11 insertions(+), 2 deletions(-) > > diff --git a/hw/vga-isa.c b/hw/vga-isa.c > index 5f1ef76..eaae2e0 100644 > --- a/hw/vga-isa.c > +++ b/hw/vga-isa.c > @@ -72,10 +72,19 @@ static int vga_initfn(ISADevice *dev) > return 0; > } > > +static const VMStateDescription vmstate_vga_isa = { > + .name = "isa-vga", > + .version_id = 1, > + .fields = (VMStateField []) { > + VMSTATE_STRUCT(state, ISAVGAState, 0, vmstate_vga_common, VGACommonState), > + VMSTATE_END_OF_LIST(), > + }, > +}; > + > static ISADeviceInfo vga_info = { > .qdev.name = "isa-vga", > .qdev.size = sizeof(ISAVGAState), > - .qdev.vmsd = &vmstate_vga_common, > + .qdev.vmsd = &vmstate_vga_isa, > .qdev.reset = vga_reset_isa, > .qdev.no_user = 1, > .init = vga_initfn, > @@ -84,7 +93,7 @@ static ISADeviceInfo vga_info = { > /* Register the VMState Description to support VMState introspection */ > static void init_vmstate_description_0(void) > { > - register_vmstate_description(&vmstate_vga_common); > + register_vmstate_description(&vmstate_vga_isa); > } > > vmstate_init(init_vmstate_description_0); This was done that way when I ported this device. This define is also always setup CONFIG_BOCHS_VBE, and at some point it didn't worked without it. But this is a different problem that doing the tests. Later, JUan.