VirtualBox

Changeset 83941 in vbox for trunk/include/VBox/vmm


Ignore:
Timestamp:
Apr 23, 2020 10:22:56 AM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
137493
Message:

AMD IOMMU: bugref:9654 Hook into PCIPhys[Read|Write] for intercepting and translating device accesses through the IOMMU.

Location:
trunk/include/VBox/vmm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/gvm.h

    r83850 r83941  
    202202        struct PDMR0PERVM   s;
    203203#endif
    204         uint8_t             padding[1920];
     204        uint8_t             padding[2176];
    205205    } pdmr0;
    206206
     
    231231    /** Padding so aCpus starts on a page boundrary.  */
    232232#ifdef VBOX_WITH_NEM_R0
    233     uint8_t         abPadding2[4096*2 - 64 - 256 - 1024 - 256 - 64 - 1920 - 640 - 512 - 64 - sizeof(PGVMCPU) * VMM_MAX_CPU_COUNT];
    234 #else
    235     uint8_t         abPadding2[4096*2 - 64 - 256 - 1024       - 64 - 1920 - 640 - 512 - 64 - sizeof(PGVMCPU) * VMM_MAX_CPU_COUNT];
     233    uint8_t         abPadding2[4096*2 - 64 - 256 - 1024 - 256 - 64 - 2176 - 640 - 512 - 64 - sizeof(PGVMCPU) * VMM_MAX_CPU_COUNT];
     234#else
     235    uint8_t         abPadding2[4096*2 - 64 - 256 - 1024       - 64 - 2176 - 640 - 512 - 64 - sizeof(PGVMCPU) * VMM_MAX_CPU_COUNT];
    236236#endif
    237237
  • trunk/include/VBox/vmm/pdmdev.h

    r83850 r83941  
    12541254    /** Index into the PDM IOMMU array (PDM::aIommus) from ring-3. */
    12551255    uint32_t            idxIommu;
     1256
     1257    /**
     1258     * Performs a physical memory read transaction through the IOMMU.
     1259     *
     1260     * @returns VBox status code.
     1261     * @param   pDevIns     The IOMMU device instance.
     1262     * @param   uDeviceId   The device identifier (bus, device, function).
     1263     * @param   uDva        The device virtual address being read.
     1264     * @param   cbRead      The number of bytes being read.
     1265     * @param   pGCPhysOut  Where to store the translated physical address.
     1266     *
     1267     * @thread  Any.
     1268     */
     1269    DECLR0CALLBACKMEMBER(int, pfnMemRead,(PPDMDEVINS pDevIns, uint16_t uDeviceId, uint64_t uDva, size_t cbRead,
     1270                                          PRTGCPHYS pGCPhysOut));
     1271
     1272    /**
     1273     * Performs a physical memory write transaction through the IOMMU.
     1274     *
     1275     * @returns VBox status code.
     1276     * @param   pDevIns     The IOMMU device instance.
     1277     * @param   uDeviceId   The device identifier (bus, device, function).
     1278     * @param   uDva        The device virtual address being written.
     1279     * @param   cbRead      The number of bytes being written.
     1280     * @param   pGCPhysOut  Where to store the translated physical address.
     1281     *
     1282     * @thread  Any.
     1283     */
     1284    DECLR0CALLBACKMEMBER(int, pfnMemWrite,(PPDMDEVINS pDevIns, uint16_t uDeviceId, uint64_t uDva, size_t cbWrite,
     1285                                           PRTGCPHYS pGCPhysOut));
     1286
    12561287    /** Just a safety precaution. */
    12571288    uint32_t            u32TheEnd;
     
    12741305    /** Index into the PDM IOMMU array (PDM::aIommus) from ring-3. */
    12751306    uint32_t            idxIommu;
     1307
     1308    /**
     1309     * Performs a physical memory read transaction through the IOMMU.
     1310     *
     1311     * @returns VBox status code.
     1312     * @param   pDevIns     The IOMMU device instance.
     1313     * @param   uDeviceId   The device identifier (bus, device, function).
     1314     * @param   uDva        The device virtual address.
     1315     * @param   cbRead      The number of bytes being read.
     1316     * @param   pGCPhysOut  Where to store the translated physical address.
     1317     *
     1318     * @thread  Any.
     1319     */
     1320    DECLRCCALLBACKMEMBER(int, pfnMemRead,(PPDMDEVINS pDevIns, uint16_t uDeviceId, uint64_t uDva, size_t cbRead,
     1321                                          PRTGCPHYS pGCPhysOut));
     1322
     1323    /**
     1324     * Performs a physical memory write transaction through the IOMMU.
     1325     *
     1326     * @returns VBox status code.
     1327     * @param   pDevIns     The IOMMU device instance.
     1328     * @param   uDeviceId   The device identifier (bus, device, function).
     1329     * @param   uDva        The device virtual address being written.
     1330     * @param   cbRead      The number of bytes being written.
     1331     * @param   pGCPhysOut  Where to store the translated physical address.
     1332     *
     1333     * @thread  Any.
     1334     */
     1335    DECLRCCALLBACKMEMBER(int, pfnMemWrite,(PPDMDEVINS pDevIns, uint16_t uDeviceId, uint64_t uDva, size_t cbWrite,
     1336                                           PRTGCPHYS pGCPhysOut));
     1337
    12761338    /** Just a safety precaution. */
    12771339    uint32_t            u32TheEnd;
     
    12921354     *  version. */
    12931355    uint32_t            u32Version;
     1356    /** Padding. */
     1357    uint32_t            uPadding0;
     1358
     1359    /**
     1360     * Performs a physical memory read transaction through the IOMMU.
     1361     *
     1362     * @returns VBox status code.
     1363     * @param   pDevIns     The IOMMU device instance.
     1364     * @param   uDeviceId   The device identifier (bus, device, function).
     1365     * @param   uDva        The device virtual address being read.
     1366     * @param   cbRead      The number of bytes being read.
     1367     * @param   pGCPhysOut  Where to store the translated physical address.
     1368     *
     1369     * @thread  Any.
     1370     */
     1371    DECLR3CALLBACKMEMBER(int, pfnMemRead,(PPDMDEVINS pDevIns, uint16_t uDeviceId, uint64_t uDva, size_t cbRead,
     1372                                          PRTGCPHYS pGCPhysOut));
     1373
     1374    /**
     1375     * Performs a physical memory write transaction through the IOMMU.
     1376     *
     1377     * @returns VBox status code.
     1378     * @param   pDevIns     The IOMMU device instance.
     1379     * @param   uDeviceId   The device identifier (bus, device, function).
     1380     * @param   uDva        The device virtual address being written.
     1381     * @param   cbWrite     The number of bytes being written.
     1382     * @param   pGCPhysOut  Where to store the translated physical address.
     1383     *
     1384     * @thread  Any.
     1385     */
     1386    DECLR3CALLBACKMEMBER(int, pfnMemWrite,(PPDMDEVINS pDevIns, uint16_t uDeviceId, uint64_t uDva, size_t cbWrite,
     1387                                           PRTGCPHYS pGCPhysOut));
     1388
    12941389    /** Just a safety precaution. */
    12951390    uint32_t            u32TheEnd;
Note: See TracChangeset for help on using the changeset viewer.

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