From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CRhdF-000573-Qk for qemu-devel@nongnu.org; Tue, 09 Nov 2004 20:50:45 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CRhdE-00056V-Eu for qemu-devel@nongnu.org; Tue, 09 Nov 2004 20:50:45 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CRhdE-00056K-BS for qemu-devel@nongnu.org; Tue, 09 Nov 2004 20:50:44 -0500 Received: from [211.29.132.189] (helo=mail08.syd.optusnet.com.au) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CRhUc-0004L3-Fh for qemu-devel@nongnu.org; Tue, 09 Nov 2004 20:41:52 -0500 Received: from barney.bedrock (tooax8-113.dialup.optusnet.com.au [211.29.69.113]) by mail08.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id iAA1fi01016389 for ; Wed, 10 Nov 2004 12:41:45 +1100 Received: from [172.16.31.2] (fred.bedrock [172.16.31.2]) by barney.bedrock (8.9.3/8.8.7) with ESMTP id LAA26454 for ; Wed, 10 Nov 2004 11:41:39 +1000 Message-ID: <419171D2.80208@optusnet.com.au> Date: Wed, 10 Nov 2004 11:41:38 +1000 From: James Boddington MIME-Version: 1.0 Subject: Re: [Qemu-devel] enabling bus-master IDE driver References: <1099661520.418b80d07e377@imp5-q.free.fr> <1099666965.418b9615bb36d@imp5-q.free.fr> <418C2E7D.2040609@brittainweb.org> <418D478B.9090007@brittainweb.org> <20041107090328.GB29120@suse.de> In-Reply-To: <20041107090328.GB29120@suse.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Jens Axboe wrote: > Index: hw/ide.c > =================================================================== > RCS file: /cvsroot/qemu/qemu/hw/ide.c,v > retrieving revision 1.28 > diff -u -r1.28 ide.c > --- hw/ide.c 9 Oct 2004 20:27:55 -0000 1.28 > +++ hw/ide.c 7 Nov 2004 09:06:33 -0000 > @@ -416,7 +416,7 @@ > put_le16(p + 47, 0x8000 | MAX_MULT_SECTORS); > #endif > put_le16(p + 48, 1); /* dword I/O */ > - put_le16(p + 49, 1 << 9); /* LBA supported, no DMA */ > + put_le16(p + 49, 1 << 9 | 1 << 8); /* DMA and LBA supported */ > put_le16(p + 51, 0x200); /* PIO transfer cycle */ > put_le16(p + 52, 0x200); /* DMA transfer cycle */ > put_le16(p + 53, 1); /* words 54-58 are valid */ > I tried the same thing in ide_atapi_identify(). With this dma is now being set on the cdrom. Using an iso image in the host hard drive as a cd in qemu, hdparm -t is reporting a speed improvement. Index: hw/ide.c =================================================================== RCS file: /cvsroot/qemu/qemu/hw/ide.c,v retrieving revision 1.29 diff -u -r1.29 ide.c --- hw/ide.c 9 Nov 2004 22:04:05 -0000 1.29 +++ hw/ide.c 10 Nov 2004 01:19:32 -0000 @@ -458,7 +458,7 @@ padstr((uint8_t *)(p + 23), QEMU_VERSION, 8); /* firmware version */ padstr((uint8_t *)(p + 27), "QEMU CD-ROM", 40); /* model */ put_le16(p + 48, 1); /* dword I/O (XXX: should not be set on CDROM) */ - put_le16(p + 49, 1 << 9); /* LBA supported, no DMA */ + put_le16(p + 49, 1 << 9 | 1 << 8); /* DMA and LBA supported */ put_le16(p + 53, 3); /* words 64-70, 54-58 valid */ put_le16(p + 63, 0x103); /* DMA modes XXX: may be incorrect */ put_le16(p + 64, 1); /* PIO modes */ -- James