VirtualBox

Changeset 83461 in vbox for trunk/src


Ignore:
Timestamp:
Mar 27, 2020 5:48:54 AM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
136695
Message:

AMD IOMMU: bugref:9654 Bits.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Bus/DevIommuAmd.cpp

    r83449 r83461  
    886886    /** The 64-bit unsigned integer view. */
    887887    uint64_t    u64;
    888 } EVT_LOG_BUF_BAR_T;
    889 AssertCompileSize(EVT_LOG_BUF_BAR_T, 8);
     888} EVT_LOG_BAR_T;
     889AssertCompileSize(EVT_LOG_BAR_T, 8);
    890890
    891891/**
     
    10701070    uint64_t    u64;
    10711071} IOMMU_HW_EVT_HI_T;
    1072 AssertCompileSize(PPR_LOG_BAR_T, 8);
     1072AssertCompileSize(IOMMU_HW_EVT_HI_T, 8);
    10731073
    10741074/**
     
    10951095} IOMMU_HW_EVT_STATUS_T;
    10961096AssertCompileSize(IOMMU_HW_EVT_STATUS_T, 8);
     1097
     1098/**
     1099 * Guest Virtual-APIC Log Base Address Register (MMIO).
     1100 * In accordance with the AMD spec.
     1101 */
     1102typedef union
     1103{
     1104    struct
     1105    {
     1106        RT_GCC_EXTENSION uint64_t   u12Rsvd0 : 12;      /**< Bit 11:0   - Reserved. */
     1107        RT_GCC_EXTENSION uint64_t   u40GALogBase : 40;  /**< Bits 51:12 - GALogBase: Guest Virtual-APIC Log Base Address. */
     1108        RT_GCC_EXTENSION uint64_t   u4Rsvd0 : 4;        /**< Bits 55:52 - Reserved. */
     1109        RT_GCC_EXTENSION uint64_t   u4GALogLen : 4;     /**< Bits 59:56 - GALogLen: Guest Virtual-APIC Log Length. */
     1110        RT_GCC_EXTENSION uint64_t   u4Rsvd1 : 4;        /**< Bits 63:60 - Reserved. */
     1111    } n;
     1112    /** The 64-bit unsigned integer view. */
     1113    uint64_t    u64;
     1114} GALOG_BAR_T;
     1115AssertCompileSize(GALOG_BAR_T, 8);
     1116
     1117/**
     1118 * Guest Virtual-APIC Log Tail Address Register (MMIO).
     1119 * In accordance with the AMD spec.
     1120 */
     1121typedef union
     1122{
     1123    struct
     1124    {
     1125        RT_GCC_EXTENSION uint64_t   u3Rsvd0 : 3;            /**< Bits 2:0   - Reserved. */
     1126        RT_GCC_EXTENSION uint64_t   u40GALogTailAddr : 48;  /**< Bits 51:3  - GATAddr: Guest Virtual-APIC Tail Log Address. */
     1127        RT_GCC_EXTENSION uint64_t   u11Rsvd1 : 11;          /**< Bits 63:52 - Reserved. */
     1128    } n;
     1129    /** The 64-bit unsigned integer view. */
     1130    uint64_t    u64;
     1131} GALOG_TAIL_ADDR_T;
     1132AssertCompileSize(GALOG_TAIL_ADDR_T, 8);
     1133
     1134/**
     1135 * PPR Log B Base Address Register (MMIO).
     1136 * In accordance with the AMD spec.
     1137 * Currently identical to PPR_LOG_BAR_T.
     1138 */
     1139typedef PPR_LOG_BAR_T       PPR_LOG_B_BAR_T;
     1140
     1141/**
     1142 * Event Log B Base Address Register (MMIO).
     1143 * In accordance with the AMD spec.
     1144 * Currently identical to EVT_LOG_BAR_T.
     1145 */
     1146typedef EVT_LOG_BAR_T       EVT_LOG_B_BAR_T;
    10971147
    10981148/**
     
    13621412    {
    13631413        uint32_t    u4Rsvd0 : 4;    /**< Bits 3:0   - Reserved. */
    1364         uint32_t    u15Ptr : 15;    /**< Bits 18:14 - Buffer pointer. */
     1414        uint32_t    u15Ptr : 15;    /**< Bits 18:4 - Buffer pointer. */
    13651415        uint32_t    u13Rsvd0 : 13;  /**< Bits 31:19 - Reserved. */
    13661416        uint32_t    u32Rsvd0;       /**< Bits 63:32 - Reserved. */
     
    14351485 * Currently identical to CMD_BUF_HEAD_PTR_T.
    14361486 */
    1437 typedef CMD_BUF_HEAD_PTR_T    PPR_LOG_HEAD_PTR_T;
     1487typedef CMD_BUF_HEAD_PTR_T      PPR_LOG_HEAD_PTR_T;
    14381488
    14391489/**
     
    14421492 * Currently identical to CMD_BUF_HEAD_PTR_T.
    14431493 */
    1444 typedef CMD_BUF_HEAD_PTR_T    PPR_LOG_TAIL_PTR_T;
     1494typedef CMD_BUF_HEAD_PTR_T      PPR_LOG_TAIL_PTR_T;
     1495
     1496/**
     1497 * Guest Virtual-APIC Log Head Pointer Register (MMIO).
     1498 * In accordance with the AMD spec.
     1499 */
     1500typedef union
     1501{
     1502    struct
     1503    {
     1504        uint32_t    u2Rsvd0 : 2;            /**< Bits  2:0  - Reserved. */
     1505        uint32_t    u12GALogPtr : 12;       /**< Bits 15:3  - Guest Virtual-APIC Log Head or Tail Pointer. */
     1506        uint32_t    u16Rsvd0 : 16;          /**< Bits 31:16 - Reserved. */
     1507        uint32_t    u32Rsvd0;               /**< Bits 63:32 - Reserved. */
     1508    } n;
     1509    /** The 32-bit unsigned integer view. */
     1510    uint32_t    au32[2];
     1511    /** The 64-bit unsigned integer view. */
     1512    uint64_t    u64;
     1513} GALOG_HEAD_PTR_T;
     1514AssertCompileSize(GALOG_HEAD_PTR_T, 8);
     1515
     1516/**
     1517 * Guest Virtual-APIC Log Tail Pointer Register (MMIO).
     1518 * In accordance with the AMD spec.
     1519 * Currently identical to GALOG_HEAD_PTR_T.
     1520 */
     1521typedef GALOG_HEAD_PTR_T        GALOG_TAIL_PTR_T;
     1522
     1523/**
     1524 * PPR Log B Head Pointer Register (MMIO).
     1525 * In accordance with the AMD spec.
     1526 * Currently identical to CMD_BUF_HEAD_PTR_T.
     1527 */
     1528typedef CMD_BUF_HEAD_PTR_T      PPR_LOG_B_HEAD_PTR_T;
     1529
     1530/**
     1531 * PPR Log B Tail Pointer Register (MMIO).
     1532 * In accordance with the AMD spec.
     1533 * Currently identical to CMD_BUF_HEAD_PTR_T.
     1534 */
     1535typedef CMD_BUF_HEAD_PTR_T      PPR_LOG_B_TAIL_PTR_T;
     1536
     1537/**
     1538 * Event Log B Head Pointer Register (MMIO).
     1539 * In accordance with the AMD spec.
     1540 * Currently identical to CMD_BUF_HEAD_PTR_T.
     1541 */
     1542typedef CMD_BUF_HEAD_PTR_T      EVT_LOG_B_HEAD_PTR_T;
     1543
     1544/**
     1545 * Event Log B Tail Pointer Register (MMIO).
     1546 * In accordance with the AMD spec.
     1547 * Currently identical to CMD_BUF_HEAD_PTR_T.
     1548 */
     1549typedef CMD_BUF_HEAD_PTR_T      EVT_LOG_B_TAIL_PTR_T;
    14451550
    14461551
     
    14591564    DEV_TAB_BAR_T               DevTabBaseAddr;     /**< Device table base address register. */
    14601565    CMD_BUF_BAR_T               CmdBufBaseAddr;     /**< Command buffer base address register. */
    1461     EVT_LOG_BUF_BAR_T           EvtLogBaseAddr;     /**< Event log base address register. */
     1566    EVT_LOG_BAR_T               EvtLogBaseAddr;     /**< Event log base address register. */
    14621567    IOMMU_CTRL_T                IommuCtrl;          /**< IOMMU control register. */
    14631568    IOMMU_EXCL_BASE_T           ExclBase;           /**< IOMMU exclusion base register. */
     
    14721577    IOMMU_HW_EVT_LO_T           IommuHwEvtLo;       /**< IOMMU hardware event register (Lo). */
    14731578    IOMMU_HW_EVT_STATUS_T       IommuHwEvtStatus;   /**< IOMMU hardware event status. */
     1579    /** @} */
     1580
     1581    /** @name MMIO: Guest Virtual-APIC Log registers.
     1582     * @{ */
     1583    GALOG_BAR_T                 GALogBaseAddr;      /**< Guest Virtual-APIC Log base address register. */
     1584    GALOG_TAIL_ADDR_T           GALogTailAddr;      /**< Guest Virtual-APIC Log Tail address register. */
     1585    /** @} */
     1586
     1587    /** @name MMIO: Alternate PPR and Event Log registers.
     1588     *  @{ */
     1589    PPR_LOG_B_BAR_T             PprLogBBaseAddr;    /**< PPR Log B base address register. */
     1590    EVT_LOG_B_BAR_T             EvtLogBBaseAddr;    /**< Event Log B base address register. */
    14741591    /** @} */
    14751592
     
    15301647    PPR_LOG_TAIL_PTR_T          PprLogTailPtr;      /**< IOMMU PPR log tail pointer register. */
    15311648    /** @} */
     1649
     1650    /** @name MMIO: Guest Virtual-APIC Log Head and Tail Pointer registers.
     1651     * @{ */
     1652    GALOG_HEAD_PTR_T            GALogHeadPtr;       /**< Guest Virtual-APIC log head pointer register. */
     1653    GALOG_TAIL_PTR_T            GALogTailPtr;       /**< Guest Virtual-APIC log tail pointer register. */
     1654    /** @} */
     1655
     1656    /** @name MMIO: PPR Log B Head and Tail Pointer registers.
     1657     *  @{ */
     1658    PPR_LOG_B_HEAD_PTR_T        PprLogBHeadPtr;     /**< PPR log B head pointer register. */
     1659    PPR_LOG_B_TAIL_PTR_T        PprLogBTailPtr;     /**< PPR log B tail pointer register. */
     1660    /** @} */
     1661
     1662    /** @name MMIO: Event Log B Head and Tail Pointer registers.
     1663     * @{ */
     1664    EVT_LOG_B_HEAD_PTR_T        EvtLogBHeadPtr;     /**< Event log B head pointer register. */
     1665    EVT_LOG_B_TAIL_PTR_T        EvtLogBTailPtr;     /**< Event log B tail pointer register. */
     1666    /** @} */
     1667
    15321668} IOMMU;
    15331669/** Pointer to the IOMMU device state. */
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