Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NXdKd-0001wP-CV for qemu-devel@nongnu.org; Wed, 20 Jan 2010 11:22:59 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NXdKY-0001rH-Fh for qemu-devel@nongnu.org; Wed, 20 Jan 2010 11:22:58 -0500 Received: from [199.232.76.173] (port=39733 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NXdKY-0001r0-8I for qemu-devel@nongnu.org; Wed, 20 Jan 2010 11:22:54 -0500 Received: from mx1.redhat.com ([209.132.183.28]:27440) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NXdKX-0005k1-SE for qemu-devel@nongnu.org; Wed, 20 Jan 2010 11:22:54 -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 o0KGMmNI017893 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 20 Jan 2010 11:22:48 -0500 Date: Wed, 20 Jan 2010 14:22:28 -0200 From: Marcelo Tosatti Message-ID: <20100120162228.GB14374@amt.cnet> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH] ide save/restore current transfer fields List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Avi Kivity , Juan Quintela If migration takes place between write of the bmdma address register and write of the command register (to initiate DMA), the destination will not properly start the DMA op, hanging the guest: ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen ata1.00: cmd c8/00:16:41:00:00/00:00:00:00:00/e0 tag 0 dma 11264 in res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout) ata1.00: status: { DRDY } Fix by sending current transfer information in the migration data. Signed-off-by: Marcelo Tosatti diff --git a/hw/ide/pci.c b/hw/ide/pci.c index 780fc5f..9f245ed 100644 --- a/hw/ide/pci.c +++ b/hw/ide/pci.c @@ -133,6 +135,10 @@ static const VMStateDescription vmstate_bmdma = { VMSTATE_INT64(sector_num, BMDMAState), VMSTATE_UINT32(nsector, BMDMAState), VMSTATE_UINT8(unit, BMDMAState), + VMSTATE_UINT32(cur_addr, BMDMAState), + VMSTATE_UINT32(cur_prd_last, BMDMAState), + VMSTATE_UINT32(cur_prd_addr, BMDMAState), + VMSTATE_UINT32(cur_prd_len, BMDMAState), VMSTATE_END_OF_LIST() } };