From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56262) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCv2t-0005kD-Pq for qemu-devel@nongnu.org; Wed, 28 Mar 2012 11:44:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SCv2s-00022P-1B for qemu-devel@nongnu.org; Wed, 28 Mar 2012 11:44:23 -0400 Received: from e06smtp13.uk.ibm.com ([195.75.94.109]:39757) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCv2r-0001yl-JP for qemu-devel@nongnu.org; Wed, 28 Mar 2012 11:44:21 -0400 Received: from /spool/local by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 28 Mar 2012 16:44:10 +0100 Received: from d06av09.portsmouth.uk.ibm.com (d06av09.portsmouth.uk.ibm.com [9.149.37.250]) by d06nrmr1307.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q2SFi8Yj2375688 for ; Wed, 28 Mar 2012 16:44:08 +0100 Received: from d06av09.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q2SFi7Tu002371 for ; Wed, 28 Mar 2012 09:44:08 -0600 From: Stefan Hajnoczi Date: Wed, 28 Mar 2012 16:43:57 +0100 Message-Id: <1332949439-6781-1-git-send-email-stefanha@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 0/2] ide: convert pio code path to asynchronous I/O List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Richard Davies , Chris Webb , Stefan Hajnoczi , Zhi Yong Wu , Paolo Bonzini IDE PIO mode is currently implemented using synchronous I/O functions. There's no need to do this because the IDE interface is actually designed with polling and interrupts in mind - we can do asynchronous I/O and let the guest know when the operation has completed. The benefit of asynchronous I/O is that the guest can continue executing code and is more responsive. The second aim of this conversion is to avoid calling bdrv_read()/bdrv_write() since they do not work with I/O throttling. This means guests should now boot IDE drives successfully when I/O throttling is enabled. Note that ATAPI is not converted yet and still uses bdrv_read() in two locations. A future patch will have to convert ATAPI so CD-ROMs also do asynchronous I/O. I have tested both Windows 7 Home Premium and Red Hat Enterprise Linux 6.0 guests with these patches. In Windows, use the device manager to disable DMA on the IDE channels. Under recent Linux kernels, use the libata.dma=0 kernel parameter. Chris and Richard: Please test this to confirm that it fixes the hang you reported. Stefan Hajnoczi (2): ide: convert ide_sector_read() to asynchronous I/O ide: convert ide_sector_write() to asynchronous I/O hw/ide/core.c | 129 ++++++++++++++++++++++++++++++++++++---------------- hw/ide/internal.h | 2 + 2 files changed, 91 insertions(+), 40 deletions(-) -- 1.7.9.1