qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] enabling bus-master IDE driver


From: James Boddington
Subject: Re: [Qemu-devel] enabling bus-master IDE driver
Date: Wed, 10 Nov 2004 11:41:38 +1000
User-agent: Mozilla Thunderbird 0.9 (X11/20041103)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]