From patchwork Sun Mar 6 15:09:49 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: i8254: Fix migration from older versions Date: Sun, 06 Mar 2011 05:09:49 -0000 From: Jan Kiszka X-Patchwork-Id: 85580 Message-Id: <4D73A3BD.2000405@web.de> To: qemu-devel , Blue Swirl Cc: From: Jan Kiszka qdev conversion broke migration as the previous version used vmstate instance IDs derived from the iobase. Fix it by registering a legacy alias. Signed-off-by: Jan Kiszka --- hw/i8254.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/i8254.c b/hw/i8254.c index eaf5d3e..47c9d73 100644 --- a/hw/i8254.c +++ b/hw/i8254.c @@ -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; }