VirtualBox

Changeset 88367 in vbox


Ignore:
Timestamp:
Apr 5, 2021 7:58:44 AM (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

    r88342 r88367  
    4646#define DMAR_ASSERT_MMIO_ACCESS_RET(a_off, a_cb) \
    4747    do { \
    48          AssertReturn(!(off & 3), VINF_IOM_MMIO_UNUSED_FF); \
    49          AssertReturn(cb == 4 || cb == 8, VINF_IOM_MMIO_UNUSED_FF); \
     48         AssertReturn((a_cb) == 4 || (a_cb) == 8, VINF_IOM_MMIO_UNUSED_FF); \
     49         AssertReturn(!((a_off) & ((a_cb) - 1)), VINF_IOM_MMIO_UNUSED_FF); \
    5050    } while (0);
    5151
     
    682682            }
    683683        }
     684
     685        LogFlowFunc(("offReg=%#x\n", offReg));
    684686        return VINF_SUCCESS;
    685687    }
     688
    686689    return VINF_IOM_MMIO_UNUSED_FF;
    687690}
     
    705708        else
    706709            *(uint32_t *)pv = dmarRegRead32(pThis, offReg);
     710
     711        LogFlowFunc(("offReg=%#x\n", offReg));
    707712        return VINF_SUCCESS;
    708713    }
     
    719724{
    720725    RT_NOREF1(pDevIns);
     726    LogFlowFunc(("\n"));
    721727}
    722728
     
    728734{
    729735    RT_NOREF(pDevIns);
    730     return VERR_NOT_IMPLEMENTED;
     736    LogFlowFunc(("\n"));
     737    return VINF_SUCCESS;
    731738}
    732739
     
    827834    AssertRCReturn(rc, rc);
    828835
    829     return VERR_NOT_IMPLEMENTED;
     836    LogRel(("%s: Cap=%#RX64 Ext. Cap=%#RX64\n", DMAR_LOG_PFX, dmarRegRead64(pThis, VTD_MMIO_OFF_CAP_REG),
     837            dmarRegRead64(pThis, VTD_MMIO_OFF_ECAP_REG)));
     838    return VINF_SUCCESS;
    830839}
    831840
     
    859868    IommuReg.pfnMsiRemap      = iommuIntelMsiRemap;
    860869    IommuReg.u32TheEnd        = PDM_IOMMUREGCC_VERSION;
     870
    861871    rc = PDMDevHlpIommuSetUpContext(pDevIns, &IommuReg, &pThisCC->CTX_SUFF(pIommuHlp));
    862872    AssertRCReturn(rc, rc);
     
    866876    AssertPtrReturn(pThisCC->CTX_SUFF(pIommuHlp)->pfnLock,   VERR_INVALID_POINTER);
    867877    AssertPtrReturn(pThisCC->CTX_SUFF(pIommuHlp)->pfnUnlock, VERR_INVALID_POINTER);
     878
    868879    return VINF_SUCCESS;
    869880}
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