VirtualBox

Changeset 86486 in vbox for trunk/src


Ignore:
Timestamp:
Oct 8, 2020 7:35:08 AM (4 years ago)
Author:
vboxsync
Message:

AMD IOMMU: bugref:9654 E1000: Use PCI interfaces while reading/writing guest physical memory.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/DevE1000.cpp

    r85146 r86486  
    19131913        return 0;
    19141914    E1KRXDESC* pFirstEmptyDesc = &pThis->aRxDescriptors[pThis->nRxDFetched];
    1915     PDMDevHlpPhysRead(pDevIns,
    1916                       ((uint64_t)RDBAH << 32) + RDBAL + nFirstNotLoaded * sizeof(E1KRXDESC),
    1917                       pFirstEmptyDesc, nDescsInSingleRead * sizeof(E1KRXDESC));
     1915    PDMDevHlpPCIPhysRead(pDevIns,
     1916                         ((uint64_t)RDBAH << 32) + RDBAL + nFirstNotLoaded * sizeof(E1KRXDESC),
     1917                         pFirstEmptyDesc, nDescsInSingleRead * sizeof(E1KRXDESC));
    19181918    // uint64_t addrBase = ((uint64_t)RDBAH << 32) + RDBAL;
    19191919    // unsigned i, j;
     
    19291929    if (nDescsToFetch > nDescsInSingleRead)
    19301930    {
    1931         PDMDevHlpPhysRead(pDevIns,
    1932                           ((uint64_t)RDBAH << 32) + RDBAL,
    1933                           pFirstEmptyDesc + nDescsInSingleRead,
    1934                           (nDescsToFetch - nDescsInSingleRead) * sizeof(E1KRXDESC));
     1931        PDMDevHlpPCIPhysRead(pDevIns,
     1932                             ((uint64_t)RDBAH << 32) + RDBAL,
     1933                             pFirstEmptyDesc + nDescsInSingleRead,
     1934                             (nDescsToFetch - nDescsInSingleRead) * sizeof(E1KRXDESC));
    19351935        // Assert(i == pThis->nRxDFetched  + nDescsInSingleRead);
    19361936        // for (j = 0; i < pThis->nRxDFetched + nDescsToFetch; ++i, ++j)
     
    25532553        /* Load the descriptor pointed by head */
    25542554        E1KRXDESC desc, *pDesc = &desc;
    2555         PDMDevHlpPhysRead(pDevIns, e1kDescAddr(RDBAH, RDBAL, RDH), &desc, sizeof(desc));
     2555        PDMDevHlpPCIPhysRead(pDevIns, e1kDescAddr(RDBAH, RDBAL, RDH), &desc, sizeof(desc));
    25562556# endif /* !E1K_WITH_RXD_CACHE */
    25572557        if (pDesc->u64BufAddr)
     
    39253925DECLINLINE(void) e1kLoadDesc(PPDMDEVINS pDevIns, E1KTXDESC *pDesc, RTGCPHYS addr)
    39263926{
    3927     PDMDevHlpPhysRead(pDevIns, addr, pDesc, sizeof(E1KTXDESC));
     3927    PDMDevHlpPCIPhysRead(pDevIns, addr, pDesc, sizeof(E1KTXDESC));
    39283928}
    39293929#else /* E1K_WITH_TXD_CACHE */
     
    39563956        return 0;
    39573957    E1KTXDESC* pFirstEmptyDesc = &pThis->aTxDescriptors[pThis->nTxDFetched];
    3958     PDMDevHlpPhysRead(pDevIns,
    3959                       ((uint64_t)TDBAH << 32) + TDBAL + nFirstNotLoaded * sizeof(E1KTXDESC),
    3960                       pFirstEmptyDesc, nDescsInSingleRead * sizeof(E1KTXDESC));
     3958    PDMDevHlpPCIPhysRead(pDevIns,
     3959                         ((uint64_t)TDBAH << 32) + TDBAL + nFirstNotLoaded * sizeof(E1KTXDESC),
     3960                         pFirstEmptyDesc, nDescsInSingleRead * sizeof(E1KTXDESC));
    39613961    E1kLog3(("%s Fetched %u TX descriptors at %08x%08x(0x%x), TDLEN=%08x, TDH=%08x, TDT=%08x\n",
    39623962             pThis->szPrf, nDescsInSingleRead,
     
    39653965    if (nDescsToFetch > nDescsInSingleRead)
    39663966    {
    3967         PDMDevHlpPhysRead(pDevIns,
    3968                           ((uint64_t)TDBAH << 32) + TDBAL,
    3969                           pFirstEmptyDesc + nDescsInSingleRead,
    3970                           (nDescsToFetch - nDescsInSingleRead) * sizeof(E1KTXDESC));
     3967        PDMDevHlpPCIPhysRead(pDevIns,
     3968                             ((uint64_t)TDBAH << 32) + TDBAL,
     3969                             pFirstEmptyDesc + nDescsInSingleRead,
     3970                             (nDescsToFetch - nDescsInSingleRead) * sizeof(E1KTXDESC));
    39713971        E1kLog3(("%s Fetched %u TX descriptors at %08x%08x\n",
    39723972                 pThis->szPrf, nDescsToFetch - nDescsInSingleRead,
     
    42174217    Assert(pThis->u32PayRemain + pThis->u16HdrRemain > 0);
    42184218
    4219     PDMDevHlpPhysRead(pDevIns, PhysAddr, pThis->aTxPacketFallback + pThis->u16TxPktLen, u16Len);
     4219    PDMDevHlpPCIPhysRead(pDevIns, PhysAddr, pThis->aTxPacketFallback + pThis->u16TxPktLen, u16Len);
    42204220    E1kLog3(("%s Dump of the segment:\n"
    42214221             "%.*Rhxd\n"
     
    43274327
    43284328    if (pThis->u16TxPktLen + u16Len <= sizeof(pThis->aTxPacketFallback))
    4329         PDMDevHlpPhysRead(pDevIns, PhysAddr, pThis->aTxPacketFallback + pThis->u16TxPktLen, u16Len);
     4329        PDMDevHlpPCIPhysRead(pDevIns, PhysAddr, pThis->aTxPacketFallback + pThis->u16TxPktLen, u16Len);
    43304330    else
    43314331        E1kLog(("%s e1kFallbackAddSegment: writing beyond aTxPacketFallback, u16TxPktLen=%d(0x%x) + u16Len=%d(0x%x) > %d\n",
     
    46394639                    pThis->szPrf, pTxSg->cbUsed, pTxSg->cbUsed, pThis->u16TxPktLen, pThis->u16TxPktLen));
    46404640
    4641         PDMDevHlpPhysRead(pDevIns, PhysAddr, (uint8_t *)pTxSg->aSegs[0].pvSeg + pThis->u16TxPktLen, cbFragment);
     4641        PDMDevHlpPCIPhysRead(pDevIns, PhysAddr, (uint8_t *)pTxSg->aSegs[0].pvSeg + pThis->u16TxPktLen, cbFragment);
    46424642
    46434643        pTxSg->cbUsed = cbNewPkt;
     
    54485448    {
    54495449        E1KTXDESC desc;
    5450         PDMDevHlpPhysRead(pDevIns , e1kDescAddr(TDBAH, TDBAL, i), &desc, sizeof(desc));
     5450        PDMDevHlpPCIPhysRead(pDevIns , e1kDescAddr(TDBAH, TDBAL, i), &desc, sizeof(desc));
    54515451        if (i == tdh)
    54525452            LogRel(("E1000: >>> "));
     
    64076407    {
    64086408        E1KRXDESC desc;
    6409         PDMDevHlpPhysRead(pDevIns, e1kDescAddr(RDBAH, RDBAL, RDH), &desc, sizeof(desc));
     6409        PDMDevHlpPCIPhysRead(pDevIns, e1kDescAddr(RDBAH, RDBAL, RDH), &desc, sizeof(desc));
    64106410        if (desc.status.fDD)
    64116411            cb = 0;
     
    64366436    {
    64376437        E1KRXDESC desc;
    6438         PDMDevHlpPhysRead(pDevIns, e1kDescAddr(RDBAH, RDBAL, RDH), &desc, sizeof(desc));
     6438        PDMDevHlpPCIPhysRead(pDevIns, e1kDescAddr(RDBAH, RDBAL, RDH), &desc, sizeof(desc));
    64396439        if (desc.status.fDD)
    64406440            rc = VERR_NET_NO_BUFFER_SPACE;
     
    73287328    {
    73297329        E1KRXDESC desc;
    7330         PDMDevHlpPhysRead(pDevIns, e1kDescAddr(RDBAH, RDBAL, i),
    7331                           &desc, sizeof(desc));
     7330        PDMDevHlpPCIPhysRead(pDevIns, e1kDescAddr(RDBAH, RDBAL, i),
     7331                             &desc, sizeof(desc));
    73327332        if (i == rdh)
    73337333            pHlp->pfnPrintf(pHlp, ">>> ");
     
    73577357    {
    73587358        E1KTXDESC desc;
    7359         PDMDevHlpPhysRead(pDevIns, e1kDescAddr(TDBAH, TDBAL, i),
    7360                           &desc, sizeof(desc));
     7359        PDMDevHlpPCIPhysRead(pDevIns, e1kDescAddr(TDBAH, TDBAL, i),
     7360                             &desc, sizeof(desc));
    73617361        if (i == tdh)
    73627362            pHlp->pfnPrintf(pHlp, ">>> ");
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