Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CQj6C-0001rU-O8 for qemu-devel@nongnu.org; Sun, 07 Nov 2004 04:12:37 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CQj6B-0001rI-Vr for qemu-devel@nongnu.org; Sun, 07 Nov 2004 04:12:36 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CQj6B-0001rF-QS for qemu-devel@nongnu.org; Sun, 07 Nov 2004 04:12:35 -0500 Received: from [195.184.98.160] (helo=virtualhost.dk) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CQixq-0002Pe-2h for qemu-devel@nongnu.org; Sun, 07 Nov 2004 04:03:58 -0500 Received: from [62.242.22.158] (helo=zx2000.home.kernel.dk) by virtualhost.dk with esmtp (Exim 3.36 #1) id 1CQixp-0005N1-00 for qemu-devel@nongnu.org; Sun, 07 Nov 2004 10:03:57 +0100 Received: from axboe by zx2000.home.kernel.dk with local (Exim 4.30) id 1CQixM-0007cW-IR for qemu-devel@nongnu.org; Sun, 07 Nov 2004 10:03:28 +0100 Date: Sun, 7 Nov 2004 10:03:28 +0100 From: Jens Axboe Subject: Re: [Qemu-devel] enabling bus-master IDE driver Message-ID: <20041107090328.GB29120@suse.de> References: <1099661520.418b80d07e377@imp5-q.free.fr> <1099666965.418b9615bb36d@imp5-q.free.fr> <418C2E7D.2040609@brittainweb.org> <418D478B.9090007@brittainweb.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <418D478B.9090007@brittainweb.org> Sender: Jens Axboe 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 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 */ -- Jens Axboe