VirtualBox

忽略:
時間撮記:
2008-9-18 上午11:54:34 (16 年 以前)
作者:
vboxsync
訊息:

IOM: Made some minor adjustments to the MMIO CPU registration context stuff and added some TODOs for what needs to be done.

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp

    r12545 r12561  
    8484#endif
    8585
    86     unsigned idCPU = (pRange->enmCtx == MMIO_REGCTX_GLOBAL) ? 0 : pVM->idCPU;
    87     Assert(pRange->u[idCPU].CTXALLSUFF(pDevIns));
     86    unsigned idCPU = (pRange->enmCtx == IOMMMIOCTX_GLOBAL) ? 0 : pVM->idCPU;
     87    Assert(pRange->a[idCPU].CTXALLSUFF(pDevIns)); /** @todo SMP */
    8888
    8989    int rc;
    9090    if (RT_LIKELY(pRange->CTXALLSUFF(pfnWriteCallback)))
    91         rc = pRange->CTXALLSUFF(pfnWriteCallback)(pRange->u[idCPU].CTXALLSUFF(pDevIns), pRange->u[idCPU].CTXALLSUFF(pvUser), GCPhysFault, (void *)pvData, cb); /* @todo fix const!! */
     91        rc = pRange->CTXALLSUFF(pfnWriteCallback)(pRange->a[idCPU].CTXALLSUFF(pDevIns), pRange->a[idCPU].CTXALLSUFF(pvUser), GCPhysFault, (void *)pvData, cb); /* @todo fix const!! */
    9292    else
    9393        rc = VINF_SUCCESS;
     
    107107#endif
    108108
    109     unsigned idCPU = (pRange->enmCtx == MMIO_REGCTX_GLOBAL) ? 0 : pVM->idCPU;
    110     Assert(pRange->u[idCPU].CTXALLSUFF(pDevIns));
     109    unsigned idCPU = (pRange->enmCtx == IOMMMIOCTX_GLOBAL) ? 0 : pVM->idCPU;
     110    Assert(pRange->a[idCPU].CTXALLSUFF(pDevIns)); /** @todo SMP */
    111111
    112112    int rc;
    113113    if (RT_LIKELY(pRange->CTXALLSUFF(pfnReadCallback)))
    114         rc = pRange->CTXALLSUFF(pfnReadCallback)(pRange->u[idCPU].CTXALLSUFF(pDevIns), pRange->u[idCPU].CTXALLSUFF(pvUser), GCPhysFault, pvData, cb);
     114        rc = pRange->CTXALLSUFF(pfnReadCallback)(pRange->a[idCPU].CTXALLSUFF(pDevIns), pRange->a[idCPU].CTXALLSUFF(pvUser), GCPhysFault, pvData, cb);
    115115    else
    116116    {
     
    589589    if (pRange->CTXALLSUFF(pfnFillCallback))
    590590    {
    591         unsigned idCPU = (pRange->enmCtx == MMIO_REGCTX_GLOBAL) ? 0 : pVM->idCPU;
    592         Assert(pRange->u[idCPU].CTXALLSUFF(pDevIns));
     591        unsigned idCPU = (pRange->enmCtx == IOMMMIOCTX_GLOBAL) ? 0 : pVM->idCPU;
     592        Assert(pRange->a[idCPU].CTXALLSUFF(pDevIns));  /** @todo SMP */
    593593
    594594        /*
     
    599599        {
    600600            /* addr++ variant. */
    601             rc = pRange->CTXALLSUFF(pfnFillCallback)(pRange->u[idCPU].CTXALLSUFF(pDevIns), pRange->u[idCPU].CTXALLSUFF(pvUser), Phys, u32Data, cb, cTransfers);
     601            rc = pRange->CTXALLSUFF(pfnFillCallback)(pRange->a[idCPU].CTXALLSUFF(pDevIns), pRange->a[idCPU].CTXALLSUFF(pvUser), Phys, u32Data, cb, cTransfers);
    602602            if (rc == VINF_SUCCESS)
    603603            {
     
    611611        {
    612612            /* addr-- variant. */
    613             rc = pRange->CTXALLSUFF(pfnFillCallback)(pRange->u[idCPU].CTXALLSUFF(pDevIns), pRange->u[idCPU].CTXALLSUFF(pvUser), (Phys - (cTransfers - 1)) << SIZE_2_SHIFT(cb), u32Data, cb, cTransfers);
     613            rc = pRange->CTXALLSUFF(pfnFillCallback)(pRange->a[idCPU].CTXALLSUFF(pDevIns), pRange->a[idCPU].CTXALLSUFF(pvUser), (Phys - (cTransfers - 1)) << SIZE_2_SHIFT(cb), u32Data, cb, cTransfers);
    614614            if (rc == VINF_SUCCESS)
    615615            {
     
    12771277         * Perform the read and deal with the result.
    12781278         */
    1279         unsigned idCPU = (pRange->enmCtx == MMIO_REGCTX_GLOBAL) ? 0 : pVM->idCPU;
    1280         Assert(pRange->u[idCPU].CTXALLSUFF(pDevIns));
     1279        unsigned idCPU = (pRange->enmCtx == IOMMMIOCTX_GLOBAL) ? 0 : pVM->idCPU;
     1280        Assert(pRange->a[idCPU].CTXALLSUFF(pDevIns)); /** @todo SMP */
    12811281
    12821282#ifdef VBOX_WITH_STATISTICS
     
    12841284            STAM_PROFILE_ADV_START(&pStats->CTXALLSUFF(ProfRead), a);
    12851285#endif
    1286         int rc = pRange->CTXALLSUFF(pfnReadCallback)(pRange->u[idCPU].CTXALLSUFF(pDevIns), pRange->u[idCPU].CTXALLSUFF(pvUser), GCPhys, pu32Value, cbValue);
     1286        int rc = pRange->CTXALLSUFF(pfnReadCallback)(pRange->a[idCPU].CTXALLSUFF(pDevIns), pRange->a[idCPU].CTXALLSUFF(pvUser), GCPhys, pu32Value, cbValue);
    12871287#ifdef VBOX_WITH_STATISTICS
    12881288        if (pStats)
     
    13871387    if (pRange->CTXALLSUFF(pfnWriteCallback))
    13881388    {
    1389         unsigned idCPU = (pRange->enmCtx == MMIO_REGCTX_GLOBAL) ? 0 : pVM->idCPU;
    1390         Assert(pRange->u[idCPU].CTXALLSUFF(pDevIns));
     1389        unsigned idCPU = (pRange->enmCtx == IOMMMIOCTX_GLOBAL) ? 0 : pVM->idCPU;
     1390        Assert(pRange->a[idCPU].CTXALLSUFF(pDevIns)); /** @todo SMP */
    13911391
    13921392#ifdef VBOX_WITH_STATISTICS
     
    13941394            STAM_PROFILE_ADV_START(&pStats->CTXALLSUFF(ProfWrite), a);
    13951395#endif
    1396         int rc = pRange->CTXALLSUFF(pfnWriteCallback)(pRange->u[idCPU].CTXALLSUFF(pDevIns), pRange->u[idCPU].CTXALLSUFF(pvUser), GCPhys, &u32Value, cbValue);
     1396        int rc = pRange->CTXALLSUFF(pfnWriteCallback)(pRange->a[idCPU].CTXALLSUFF(pDevIns), pRange->a[idCPU].CTXALLSUFF(pvUser), GCPhys, &u32Value, cbValue);
    13971397#ifdef VBOX_WITH_STATISTICS
    13981398        if (pStats)
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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