VirtualBox

Changeset 108878 in vbox


Ignore:
Timestamp:
Apr 8, 2025 8:00:56 AM (12 days ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
168329
Message:

VMM/GIC: bugref:10877 Command-queue, read from start to CREADR offset (not CWRITER offset) when commands have wrapped around, work-in-progress.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/GITSAll.cpp

    r108877 r108878  
    538538                /* The write offset has wrapped around, read till end of buffer followed by wrapped-around data. */
    539539                uint32_t const cbForward = cbCmdQueue - offRead;
    540                 uint32_t const cbWrapped = offWrite;
     540                uint32_t const cbWrapped = offRead;
    541541                Assert(cbForward + cbWrapped <= cbBuf);
    542542                rc  = PDMDevHlpPhysReadMeta(pDevIns, GCPhysCmds, pvBuf, cbForward);
     
    571571                        case GITS_CMD_ID_MAPC:
    572572                        {
    573                             Assert(!RT_BF_GET(pGitsDev->uTypeReg.u, GITS_BF_CTRL_REG_TYPER_PTA)); /* GITS_TYPER is read-only */
    574573                            uint64_t const uDw2 = pCmd->au64[2].u;
    575574                            bool const     fValid            = RT_BF_GET(uDw2, GITS_BF_CMD_MAPC_DW2_VALID);
    576575                            uint32_t const uTargetCpuId      = RT_BF_GET(uDw2, GITS_BF_CMD_MAPC_DW2_RDBASE);
    577576                            uint16_t const uIntrCollectionId = RT_BF_GET(uDw2, GITS_BF_CMD_MAPC_DW2_IC_ID);
    578 
    579                             AssertRelease(uIntrCollectionId < RT_ELEMENTS(pGitsDev->auCt));
     577                            AssertRelease(uIntrCollectionId < RT_ELEMENTS(pGitsDev->auCt)); /** @todo later figure ideal/correct CT size. */
     578
     579                            GITS_CRIT_SECT_ENTER(pDevIns);
     580                            Assert(!RT_BF_GET(pGitsDev->uTypeReg.u, GITS_BF_CTRL_REG_TYPER_PTA));
    580581                            pGitsDev->auCt[uIntrCollectionId].fValid      = fValid;
    581582                            pGitsDev->auCt[uIntrCollectionId].idTargetCpu = uTargetCpuId;
     583                            GITS_CRIT_SECT_LEAVE(pDevIns);
    582584                            break;
    583585                        }
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