On 04/07/16 21:36, Laszlo Ersek wrote:
> On 04/07/16 20:24, Jordan Justen wrote:

>> Someone was reporting slowness with the Windows 7 ISO on irc a few
>> days back. Maybe this is the cause?

> I think you are referring to the following discussion on April 4th:

>> <Naruni> if i use a VM in bios mode it operates at full performance

> The domain XML clarifies another thing: the CD-ROM is IDE, not
> virtio-scsi. Also, there is no other disk drive (of any kind).

Sigh, this doesn't look good. If you look at the SeaBIOS source, it has 
ata_pio_transfer() in "src/hw/ata.c", doing:

    for (;;) {
        if (iswrite) {
            // Write data to controller
            dprintf(16, "Write sector id=%p dest=%p\n", op->drive_gf, buf_fl);
            if (CONFIG_ATA_PIO32)
                outsl_fl(iobase1, buf_fl, blocksize / 4);
            else
                outsw_fl(iobase1, buf_fl, blocksize / 2);
        } else {
            // Read data from controller
            dprintf(16, "Read sector id=%p dest=%p\n", op->drive_gf, buf_fl);
            if (CONFIG_ATA_PIO32)
                insl_fl(iobase1, buf_fl, blocksize / 4);
            else
                insw_fl(iobase1, buf_fl, blocksize / 2);
        }
        buf_fl += blocksize;

The outsl_fl / outsw_fl / insl_fl / insw_fl functions are forwarded by 
"src/farptr.h" to primitives in "src/x86.h" (without the _fl suffix). Those 
primitives *do* use inline assembly with the REP prefix.

... Right, I can reproduce the issue. Booting a Fedora LiveCD from an IDE 
CD-ROM takes ages, and the host CPU is pegged, in system load. :( :( :(

Let me see if I can come up with a patch for this. Good catch, Jordan!

Laszlo
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to