Skip to contentSkip to conversation

i8254: Fix migration from older versions

PATCH Applied Jan Kiszka 2 participants 3 messages Mar 6, 2011 – Mar 19, 2011

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 i8254: Fix migration from older versions

From: Jan Kiszka <[email protected]>

qdev conversion broke migration as the previous version used vmstate instance IDs derived from the iobase. Fix it by registering a legacy alias.

---
 hw/i8254.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
hw/i8254.c +2 -0
index eaf5d3e..47c9d73 100644
@@ -520,6 +520,8 @@ static int pit_initfn(ISADevice *dev)
     register_ioport_read(pit->iobase, 3, 1, pit_ioport_read, pit);
     isa_init_ioport(dev, pit->iobase);
 
+    qdev_set_legacy_instance_id(&dev->qdev, pit->iobase, 2);
+
     return 0;
 }
 
Signature · 1 line
1.7.1
author
#1 lore raw
Quoted 16 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

qdev conversion broke migration as the previous version used vmstate instance IDs derived from the iobase. Fix it by registering a legacy alias.

---
 hw/i8254.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
hw/i8254.c +0 -0
index eaf5d3e..47c9d73 100644

hw/i8254.c static int pit_initfn(ISADevice *dev) · line 527

Quoted 8 lines
hw/i8254.c +2 -0
@@ -520,6 +520,8 @@ static int pit_initfn(ISADevice *dev)
     register_ioport_read(pit->iobase, 3, 1, pit_ioport_read, pit);
     isa_init_ioport(dev, pit->iobase);
 
+    qdev_set_legacy_instance_id(&dev->qdev, pit->iobase, 2);
+
     return 0;
 }
 

This bug is still open.

Jan

Applied
#2 lore raw

Thanks, applied.

Quoted 31 lines · Jan Kiszka
Quoted 16 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

qdev conversion broke migration as the previous version used vmstate instance IDs derived from the iobase. Fix it by registering a legacy alias.

---
 hw/i8254.c |    2 ++

 1 files changed, 2 insertions(+), 0 deletions(-)
hw/i8254.c +0 -0
index eaf5d3e..47c9d73 100644

hw/i8254.c static int pit_initfn(ISADevice *dev) · line 527

Quoted 8 lines
hw/i8254.c +2 -0
@@ -520,6 +520,8 @@ static int pit_initfn(ISADevice *dev)
      register_ioport_read(pit->iobase, 3, 1, pit_ioport_read, pit);
      isa_init_ioport(dev, pit->iobase);
 
+    qdev_set_legacy_instance_id(&dev->qdev, pit->iobase, 2);
+
      return 0;
  }
 

This bug is still open.

Jan