VirtualBox

Changeset 2220 in vbox for trunk


Ignore:
Timestamp:
Apr 19, 2007 12:27:00 PM (18 years ago)
Author:
vboxsync
Message:

Don't call the outs/ins string handler if we're only supposed to transfer a single unit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp

    r2217 r2220  
    16471647
    16481648    Log(("IOM: rep ins%d port %#x count %d\n", cbTransfer * 8, uPort, cTransfers));
     1649    if (cTransfers > 1)
     1650    {
     1651        /* If the device supports string transfers, ask it to do as
     1652         * much as it wants. The rest is done with single-word transfers. */
     1653        const RTGCUINTREG cTransfersOrg = cTransfers;
     1654        rc = IOMIOPortReadString(pVM, uPort, &GCPtrDst, &cTransfers, cbTransfer);
     1655        AssertRC(rc); Assert(cTransfers <= cTransfersOrg);
     1656        pRegFrame->edi += (cTransfersOrg - cTransfers) * cbTransfer;
     1657    }
     1658
    16491659#ifdef IN_GC
    16501660    MMGCRamRegisterTrapHandler(pVM);
    16511661#endif
    1652 
    1653     /* If the device supports string transfers, ask it to do as
    1654      * much as it wants. The rest is done with single-word transfers. */
    1655     const RTGCUINTREG cTransfersOrg = cTransfers;
    1656     rc = IOMIOPortReadString(pVM, uPort, &GCPtrDst, &cTransfers, cbTransfer);
    1657     AssertRC(rc); Assert(cTransfers <= cTransfersOrg);
    1658     pRegFrame->edi += (cTransfersOrg - cTransfers) * cbTransfer;
    16591662
    16601663    while (cTransfers && rc == VINF_SUCCESS)
     
    17751778
    17761779    Log(("IOM: rep outs%d port %#x count %d\n", cbTransfer * 8, uPort, cTransfers));
     1780    if (cTransfers > 1)
     1781    {
     1782        /*
     1783        * If the device supports string transfers, ask it to do as
     1784        * much as it wants. The rest is done with single-word transfers.
     1785        */
     1786        const RTGCUINTREG cTransfersOrg = cTransfers;
     1787        rc = IOMIOPortWriteString(pVM, uPort, &GCPtrSrc, &cTransfers, cbTransfer);
     1788        AssertRC(rc); Assert(cTransfers <= cTransfersOrg);
     1789        pRegFrame->esi += (cTransfersOrg - cTransfers) * cbTransfer;
     1790    }
     1791
    17771792#ifdef IN_GC
    17781793    MMGCRamRegisterTrapHandler(pVM);
    17791794#endif
    1780     /*
    1781      * If the device supports string transfers, ask it to do as
    1782      * much as it wants. The rest is done with single-word transfers.
    1783      */
    1784     const RTGCUINTREG cTransfersOrg = cTransfers;
    1785     rc = IOMIOPortWriteString(pVM, uPort, &GCPtrSrc, &cTransfers, cbTransfer);
    1786     AssertRC(rc); Assert(cTransfers <= cTransfersOrg);
    1787     pRegFrame->esi += (cTransfersOrg - cTransfers) * cbTransfer;
    17881795
    17891796    while (cTransfers && rc == VINF_SUCCESS)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette