From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CQkyP-0002iR-Vm for qemu-devel@nongnu.org; Sun, 07 Nov 2004 06:12:42 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CQkyM-0002gQ-It for qemu-devel@nongnu.org; Sun, 07 Nov 2004 06:12:39 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CQkyL-0002ew-Lg for qemu-devel@nongnu.org; Sun, 07 Nov 2004 06:12:37 -0500 Received: from [211.29.132.197] (helo=mail16.syd.optusnet.com.au) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CQkpd-0007PY-BC for qemu-devel@nongnu.org; Sun, 07 Nov 2004 06:03:38 -0500 Received: from barney.bedrock (tooax8-055.dialup.optusnet.com.au [211.29.69.55]) by mail16.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id iA7B3VM5016680 for ; Sun, 7 Nov 2004 22:03:32 +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 VAA31737 for ; Sun, 7 Nov 2004 21:02:41 +1000 Message-ID: <418E00CF.9030506@optusnet.com.au> Date: Sun, 07 Nov 2004 21:02:39 +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: > On Sat, Nov 06 2004, Jason Brittain wrote: > >>Johannes Schindelin wrote: >> >>>Hi, >>> >>>On Fri, 5 Nov 2004, Jason Brittain wrote: >>> >>> >>> >>>>/dev/hda: >>>>setting using_dma to 1 (on) >>>>HDIO_SET_DMA failed: Operation not permitted >>>>using_dma = 0 (off) >>> >>>Are you sure you did as guest root? This error could happen if you try to >>>use hdparm as a plain user. >> >>I was most certainly logged in as root in the guest Linux >>when I did that. > > > I has nothing to do with user privilege, you are most likely getting > EPERM because the drive doesn't flag dma capability. > > put_le16(p + 49, 1 << 9); /* LBA supported, no DMA */ > > mask that with 1 << 8 and it'll most likely work. > > 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 */ > Just had it work, hdparm -t /dev/hda is now reporting nearly double the speed. -- James