VirtualBox

Changeset 88414 in vbox


Ignore:
Timestamp:
Apr 8, 2021 12:04:06 PM (4 years ago)
Author:
vboxsync
Message:

Intel IOMMU: bugref:9967 WIP.

File:
1 edited

Legend:

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

    r88407 r88414  
    792792                            | RT_BF_MAKE(VTD_BF_CAP_REG_CM,     1)  /** @todo Figure out if required when we impl. caching. */
    793793                            | RT_BF_MAKE(VTD_BF_CAP_REG_SAGAW,  0)  /* 0 as Second-level Translation not supported. */
    794                             | RT_BF_MAKE(VTD_BF_CAP_REG_MGAW,   cGstPhysAddrBits)
     794                            | RT_BF_MAKE(VTD_BF_CAP_REG_MGAW,   cGstPhysAddrBits - 1)
    795795                            | RT_BF_MAKE(VTD_BF_CAP_REG_ZLR,    1)  /** @todo Zero-length read? */
    796796                            | RT_BF_MAKE(VTD_BF_CAP_REG_FRO,    DMAR_MMIO_OFF_FRCD_LO_REG >> 4)
     
    856856    /* FECTL_REG */
    857857    {
    858         uint32_t const uReg = RT_BF_MAKE(VTD_BF_FECTL_REG_IM, 1);
    859         dmarRegWriteRaw32(pThis, VTD_MMIO_OFF_FECTL_REG, uReg);
     858        uint32_t const uCtl = RT_BF_MAKE(VTD_BF_FECTL_REG_IM, 1);
     859        dmarRegWriteRaw32(pThis, VTD_MMIO_OFF_FECTL_REG, uCtl);
    860860    }
    861861    /* ICETL_REG */
    862862    {
    863         uint32_t const uReg = RT_BF_MAKE(VTD_BF_IECTL_REG_IM, 1);
    864         dmarRegWriteRaw32(pThis, VTD_MMIO_OFF_IECTL_REG, uReg);
     863        uint32_t const uCtl = RT_BF_MAKE(VTD_BF_IECTL_REG_IM, 1);
     864        dmarRegWriteRaw32(pThis, VTD_MMIO_OFF_IECTL_REG, uCtl);
    865865    }
    866866
     
    10111011    dmarR3RegsInit(pDevIns);
    10121012
    1013     LogRel(("%s: Capabilities=%#RX64 Extended-Capabilities=%#RX64\n", DMAR_LOG_PFX, dmarRegRead64(pThis, VTD_MMIO_OFF_CAP_REG),
    1014             dmarRegRead64(pThis, VTD_MMIO_OFF_ECAP_REG)));
     1013    uint64_t const fCap     = dmarRegRead64(pThis, VTD_MMIO_OFF_CAP_REG);
     1014    uint64_t const fExtCap  = dmarRegRead64(pThis, VTD_MMIO_OFF_ECAP_REG);
     1015    uint8_t const  uMaxGstAddrWidth = RT_BF_GET(fCap, VTD_BF_CAP_REG_MGAW) + 1;
     1016    LogRel(("%s: CAP=%#RX64 ECAP=%#RX64 (MGAW=%u)\n", DMAR_LOG_PFX, fCap, fExtCap, uMaxGstAddrWidth));
    10151017    return VINF_SUCCESS;
    10161018}
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