Eric Lowe wrote:
>
> I just spent a bunch of time digging through the ATA driver to figure out why
> OpenSolaris as a QEMU guest wouldn't work without setting
> atapi-cd-dma-enabled=0 from GRUB.
>
> This code doesn't disable DMA because for ATAPI (the simulated device is
> ATA-4) it says the capability bit is defunct.
>
> 2184 /*
> 2185 * DMA mode is mandatory on ATA-3 (or newer) drives but is
> 2186 * optional on ATA-2 (or older) drives.
> 2187 *
> 2188 * On ATA-2 drives the ai_majorversion word will probably
> 2189 * be 0xffff or 0x0000, check the (now obsolete) DMA bit in
> 2190 * the capabilities word instead. The order of these tests
> 2191 * is important since an ATA-3 drive doesn't have to set
> 2192 * the DMA bit in the capabilities word.
> 2193 *
> 2194 */
> 2195
> 2196 if (!((ata_drvp->ad_id.ai_majorversion & 0x8000) == 0 &&
> 2197 ata_drvp->ad_id.ai_majorversion >= (1 << 2)) &&
> 2198 !(ata_drvp->ad_id.ai_cap & ATAC_DMA_SUPPORT)) {
> 2199 ata_dev_DMA_sel_msg = "device not DMA capable";
> 2200
> 2201 return (ATA_DMA_OFF);
> 2202 }
>
> Does anyone have any suggestions on how best to handle this? Should I just
> add another entry to the blacklist? Or, is there a better way of detecting if
> an ATAPI device is really DMA capable and falling back to PIO if it isn't?
My suggestion would be to probe whether the underlying machine is a QEMU
or VMware one and then set the matching flags based on that. However it
may be nice to get the author of the ATA driver code to look at that
problem more closely because both QEMU and VMware suffer from extensive
performace problems (contributing a lot to install times of more than 40
hours on QEMZ/AMD64 (the native machine is an Intel P4M 2GHz laptop with
2GB main memory)) when running Solaris while SuSE Linux 10.0 and 10.1
just work fine... ;-(
----
Bye,
Roland
--
__ . . __
(o.\ \/ /.o) [EMAIL PROTECTED]
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 7950090
(;O/ \/ \O;)
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code