From patchwork Thu Dec 9 11:24:28 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Wang X-Patchwork-Id: 74968 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 9A86CB70A5 for ; Fri, 10 Dec 2010 06:58:17 +1100 (EST) Received: from localhost ([127.0.0.1]:37553 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQmd5-0000n3-7d for incoming@patchwork.ozlabs.org; Thu, 09 Dec 2010 14:58:15 -0500 Received: from [140.186.70.92] (port=45851 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQehi-0002dJ-I2 for qemu-devel@nongnu.org; Thu, 09 Dec 2010 06:30:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PQeao-0003I5-1R for qemu-devel@nongnu.org; Thu, 09 Dec 2010 06:23:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44442) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PQean-0003E8-I1 for qemu-devel@nongnu.org; Thu, 09 Dec 2010 06:23:21 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oB9BNKFN008648 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 9 Dec 2010 06:23:20 -0500 Received: from dhcp-91-7.nay.redhat.com.englab.nay.redhat.com (dhcp-91-7.nay.redhat.com [10.66.91.7]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id oB9BNIlQ012222; Thu, 9 Dec 2010 06:23:18 -0500 To: kwolf@redhat.com, qemu-devel@nongnu.org, quintela@redhat.com From: Jason Wang Date: Thu, 09 Dec 2010 19:24:28 +0800 Message-ID: <20101209112428.5497.45417.stgit@dhcp-91-7.nay.redhat.com.englab.nay.redhat.com> User-Agent: StGit/0.15 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: kraxel@redhat.com, mst@redhat.com Subject: [Qemu-devel] [PATCH] migration: ide: drop ide_pci_post_load() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org When the bmdma transfering ended, the unit were set to -1(0xFF), but after migration ide_pci_post_load() would change it to 1. This is not intended and it also would break the migration stability that we could not get exactly the same exec file before and after migration. So this patch drop the ide_pci_post_load() and it would also make possible to debugging of migration through comparing the exec files. Signed-off-by: Jason Wang I'm not sure whether this is the best way to handle this issue. Should we still care about the migration from old guest? Acked-by: Juan Quintela --- hw/ide/pci.c | 14 -------------- 1 files changed, 0 insertions(+), 14 deletions(-) diff --git a/hw/ide/pci.c b/hw/ide/pci.c index ec90f26..b9ef122 100644 --- a/hw/ide/pci.c +++ b/hw/ide/pci.c @@ -186,25 +186,11 @@ static const VMStateDescription vmstate_bmdma = { } }; -static int ide_pci_post_load(void *opaque, int version_id) -{ - PCIIDEState *d = opaque; - int i; - - for(i = 0; i < 2; i++) { - /* current versions always store 0/1, but older version - stored bigger values. We only need last bit */ - d->bmdma[i].unit &= 1; - } - return 0; -} - const VMStateDescription vmstate_ide_pci = { .name = "ide", .version_id = 3, .minimum_version_id = 0, .minimum_version_id_old = 0, - .post_load = ide_pci_post_load, .fields = (VMStateField []) { VMSTATE_PCI_DEVICE(dev, PCIIDEState), VMSTATE_STRUCT_ARRAY(bmdma, PCIIDEState, 2, 0,