Received: from eggs.gnu.org ([2001:4830:134:3::10]:37275) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aig0C-0004yL-Ku for qemu-devel@nongnu.org; Wed, 23 Mar 2016 06:27:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aig08-000094-G9 for qemu-devel@nongnu.org; Wed, 23 Mar 2016 06:27:00 -0400 Received: from mailhub.sw.ru ([195.214.232.25]:39151 helo=relay.sw.ru) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aig08-00006O-1v for qemu-devel@nongnu.org; Wed, 23 Mar 2016 06:26:56 -0400 From: "Denis V. Lunev" Date: Wed, 23 Mar 2016 13:26:29 +0300 Message-Id: <1458728792-15779-1-git-send-email-den@openvz.org> Subject: [Qemu-devel] [PATCH for 2.6 0/3] ide: fix loss of the dma/atapi state during migration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: den@openvz.org, John Snow , Pavel Butsykin This patch set fixes bugs in the IDE DMA and the IDE ATAPI on operations to save/restore the state. >From the user point of view this results in IDE timeouts in the guest when the user reads from the DVD like the following: [424332.169229] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen [424332.170423] sr 0:0:0:0: [sr0] CDB: [424332.171234] Read(10): 28 00 00 00 02 e4 00 00 01 00 [424332.172418] ata1.00: cmd a0/01:00:00:00:08/00:00:00:00:00/a0 tag 0 dma 2048 in res 40/00:02:00:0c:00/00:00:00:00:00/a0 Emask 0x4 (timeout) [424332.174877] ata1.00: status: { DRDY } [424337.212099] ata1: link is slow to respond, please be patient (ready=0) [424342.220084] ata1: device not ready (errno=-16), forcing hardreset [424342.222700] ata1: soft resetting link [424342.381059] ata1.00: configured for MWDMA2 [424342.383693] ata1: EH complete Another similar nasty effects are possible. Signed-off-by: Pavel Butsykin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: John Snow Pavel Butsykin (3): ide: don't loose pending dma state ide: restart atapi dma by re-evaluating command packet ide: really restart pending and in-flight atapi dma hw/ide/atapi.c | 33 +++++++++++++++++++-------------- hw/ide/core.c | 32 ++++++++++++++++++-------------- hw/ide/internal.h | 25 +++++++++++++++++++++++++ hw/ide/pci.c | 3 +++ 4 files changed, 65 insertions(+), 28 deletions(-)