VirtualBox

Changeset 86480 in vbox for trunk/src/VBox/Devices/Storage


Ignore:
Timestamp:
Oct 8, 2020 6:52:00 AM (4 years ago)
Author:
vboxsync
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/DevAHCI.cpp

    r85121 r86480  
    32783278
    32793279        AssertPtr(pvSeg);
    3280         PDMDevHlpPhysRead(pDevIns, GCPhys, pvSeg, cbSeg);
     3280        PDMDevHlpPCIPhysRead(pDevIns, GCPhys, pvSeg, cbSeg);
    32813281        GCPhys += cbSeg;
    32823282        cbCopy -= cbSeg;
     
    33433343                                   : RT_ELEMENTS(aPrdtlEntries);
    33443344
    3345         PDMDevHlpPhysReadMeta(pDevIns, GCPhysPrdtl, &aPrdtlEntries[0],
    3346                               cPrdtlEntriesRead * sizeof(SGLEntry));
     3345        PDMDevHlpPCIPhysReadMeta(pDevIns, GCPhysPrdtl, &aPrdtlEntries[0],
     3346                                 cPrdtlEntriesRead * sizeof(SGLEntry));
    33473347
    33483348        for (uint32_t i = 0; (i < cPrdtlEntriesRead) && cbCopy; i++)
     
    34393439        uint32_t const cPrdtlEntriesRead = RT_MIN(cPrdtlEntries,  RT_ELEMENTS(aPrdtlEntries));
    34403440
    3441         PDMDevHlpPhysReadMeta(pDevIns, GCPhysPrdtl, &aPrdtlEntries[0], cPrdtlEntriesRead * sizeof(SGLEntry));
     3441        PDMDevHlpPCIPhysReadMeta(pDevIns, GCPhysPrdtl, &aPrdtlEntries[0], cPrdtlEntriesRead * sizeof(SGLEntry));
    34423442
    34433443        for (uint32_t i = 0; i < cPrdtlEntriesRead; i++)
     
    35043504
    35053505        rc = VINF_SUCCESS;
    3506         PDMDevHlpPhysReadMeta(pDevIns, GCPhysPrdtl, &aPrdtlEntries[0], cPrdtlEntriesRead * sizeof(SGLEntry));
     3506        PDMDevHlpPCIPhysReadMeta(pDevIns, GCPhysPrdtl, &aPrdtlEntries[0], cPrdtlEntriesRead * sizeof(SGLEntry));
    35073507
    35083508        for (uint32_t i = 0; i < cPrdtlEntriesRead && idxRange < cRanges; i++)
     
    35143514
    35153515            /* Copy into buffer. */
    3516             PDMDevHlpPhysReadMeta(pDevIns, GCPhysAddrDataBase, aRanges, cbThisCopy);
     3516            PDMDevHlpPCIPhysReadMeta(pDevIns, GCPhysAddrDataBase, aRanges, cbThisCopy);
    35173517
    35183518            for (unsigned idxRangeSrc = 0; idxRangeSrc < RT_ELEMENTS(aRanges) && idxRange < cRanges; idxRangeSrc++)
     
    38513851        SGLEntry PrdtEntry;
    38523852
    3853         PDMDevHlpPhysReadMeta(pDevIns, GCPhysPrdt, &PrdtEntry, sizeof(SGLEntry));
     3853        PDMDevHlpPCIPhysReadMeta(pDevIns, GCPhysPrdt, &PrdtEntry, sizeof(SGLEntry));
    38543854
    38553855        RTGCPHYS GCPhysAddrDataBase = AHCI_RTGCPHYS_FROM_U32(PrdtEntry.u32DBAUp, PrdtEntry.u32DBA);
     
    42684268    CmdHdr cmdHdr;
    42694269    pAhciReq->GCPhysCmdHdrAddr = pAhciPort->GCPhysAddrClb + pAhciReq->uTag * sizeof(CmdHdr);
    4270     LogFlow(("%s: PDMDevHlpPhysRead GCPhysAddrCmdLst=%RGp cbCmdHdr=%u\n", __FUNCTION__,
     4270    LogFlow(("%s: PDMDevHlpPCIPhysReadMeta GCPhysAddrCmdLst=%RGp cbCmdHdr=%u\n", __FUNCTION__,
    42714271             pAhciReq->GCPhysCmdHdrAddr, sizeof(CmdHdr)));
    4272     PDMDevHlpPhysReadMeta(pDevIns, pAhciReq->GCPhysCmdHdrAddr, &cmdHdr, sizeof(CmdHdr));
     4272    PDMDevHlpPCIPhysReadMeta(pDevIns, pAhciReq->GCPhysCmdHdrAddr, &cmdHdr, sizeof(CmdHdr));
    42734273
    42744274#ifdef LOG_ENABLED
     
    42844284
    42854285    /* Read the command Fis. */
    4286     LogFlow(("%s: PDMDevHlpPhysRead GCPhysAddrCmdTbl=%RGp cbCmdFis=%u\n", __FUNCTION__, GCPhysAddrCmdTbl, AHCI_CMDFIS_TYPE_H2D_SIZE));
    4287     PDMDevHlpPhysReadMeta(pDevIns, GCPhysAddrCmdTbl, &pAhciReq->cmdFis[0], AHCI_CMDFIS_TYPE_H2D_SIZE);
     4286    LogFlow(("%s: PDMDevHlpPCIPhysReadMeta GCPhysAddrCmdTbl=%RGp cbCmdFis=%u\n", __FUNCTION__, GCPhysAddrCmdTbl, AHCI_CMDFIS_TYPE_H2D_SIZE));
     4287    PDMDevHlpPCIPhysReadMeta(pDevIns, GCPhysAddrCmdTbl, &pAhciReq->cmdFis[0], AHCI_CMDFIS_TYPE_H2D_SIZE);
    42884288
    42894289    AssertMsgReturn(pAhciReq->cmdFis[AHCI_CMDFIS_TYPE] == AHCI_CMDFIS_TYPE_H2D,
     
    42984298    {
    42994299        GCPhysAddrCmdTbl += AHCI_CMDHDR_ACMD_OFFSET;
    4300         PDMDevHlpPhysReadMeta(pDevIns, GCPhysAddrCmdTbl, &pAhciReq->aATAPICmd[0], ATAPI_PACKET_SIZE);
     4300        PDMDevHlpPCIPhysReadMeta(pDevIns, GCPhysAddrCmdTbl, &pAhciReq->aATAPICmd[0], ATAPI_PACKET_SIZE);
    43014301    }
    43024302
     
    43284328
    43294329        ahciLog(("Entry %u at address %RGp\n", i, GCPhysPrdtl));
    4330         PDMDevHlpPhysReadMeta(pDevIns, GCPhysPrdtl, &SGEntry, sizeof(SGLEntry));
     4330        PDMDevHlpPCIPhysReadMeta(pDevIns, GCPhysPrdtl, &SGEntry, sizeof(SGLEntry));
    43314331
    43324332        RTGCPHYS GCPhysDataAddr = AHCI_RTGCPHYS_FROM_U32(SGEntry.u32DBAUp, SGEntry.u32DBA);
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