qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 05/11] vga-isa: fix migration by breaking it


From: Anthony Liguori
Subject: [Qemu-devel] [PATCH 05/11] vga-isa: fix migration by breaking it
Date: Tue, 22 Mar 2011 19:16:10 -0500

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 <address@hidden>
---
 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);
-- 
1.7.0.4




reply via email to

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