VirtualBox

Changeset 9659 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jun 12, 2008 12:37:02 PM (17 years ago)
Author:
vboxsync
Message:

SELMGetCpuModeFromSelector is a better name.

Location:
trunk/src/VBox/VMM
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/EM.cpp

    r9658 r9659  
    15081508            {
    15091509                rc = PATMR3InstallPatch(pVM, SELMToFlat(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid, pCtx->eip),
    1510                                         (SELMGetSelectorType(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid) == CPUMODE_32BIT) ? PATMFL_CODE32 : 0);
     1510                                        (SELMGetCpuModeFromSelector(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid) == CPUMODE_32BIT) ? PATMFL_CODE32 : 0);
    15111511                if (VBOX_SUCCESS(rc))
    15121512                {
     
    17591759        {
    17601760            int rc = PATMR3InstallPatch(pVM, SELMToFlat(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid, pCtx->eip),
    1761                                         (SELMGetSelectorType(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid) == CPUMODE_32BIT) ? PATMFL_CODE32 : 0);
     1761                                        (SELMGetCpuModeFromSelector(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid) == CPUMODE_32BIT) ? PATMFL_CODE32 : 0);
    17621762            if (VBOX_SUCCESS(rc))
    17631763            {
     
    18661866        if (    (pCtx->ss & X86_SEL_RPL) == 0
    18671867            &&  !pCtx->eflags.Bits.u1VM
    1868             &&  SELMGetSelectorType(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid) == CPUMODE_32BIT)
     1868            &&  SELMGetCpuModeFromSelector(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid) == CPUMODE_32BIT)
    18691869        {
    18701870            uint32_t size;
     
    21092109        case VINF_PATM_HC_MMIO_PATCH_READ:
    21102110            rc = PATMR3InstallPatch(pVM, SELMToFlat(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid, pCtx->eip),
    2111                                     PATMFL_MMIO_ACCESS | ((SELMGetSelectorType(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid) == CPUMODE_32BIT) ? PATMFL_CODE32 : 0));
     2111                                    PATMFL_MMIO_ACCESS | ((SELMGetCpuModeFromSelector(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid) == CPUMODE_32BIT) ? PATMFL_CODE32 : 0));
    21122112            if (VBOX_FAILURE(rc))
    21132113                rc = emR3RawExecuteInstruction(pVM, "MMIO");
  • trunk/src/VBox/VMM/PATM/CSAM.cpp

    r9658 r9659  
    21192119
    21202120        /* Assuming 32 bits code for now. */
    2121         Assert(SELMGetSelectorType(pVM, fakeflags, Sel, pHiddenSel) == CPUMODE_32BIT);
     2121        Assert(SELMGetCpuModeFromSelector(pVM, fakeflags, Sel, pHiddenSel) == CPUMODE_32BIT);
    21222122
    21232123        pInstrGC = SELMToFlat(pVM, fakeflags, Sel, pHiddenSel, pInstrGC);
  • trunk/src/VBox/VMM/PATM/VMMGC/PATMGC.cpp

    r9658 r9659  
    510510            }
    511511
    512             cpu.mode = SELMGetSelectorType(pVM, pRegFrame->eflags, pRegFrame->cs, 0);
     512            cpu.mode = SELMGetCpuModeFromSelector(pVM, pRegFrame->eflags, pRegFrame->cs, 0);
    513513            if(cpu.mode != CPUMODE_32BIT)
    514514            {
  • trunk/src/VBox/VMM/VMMAll/EMAll.cpp

    r9658 r9659  
    167167EMDECL(int) EMInterpretDisasOneEx(PVM pVM, RTGCUINTPTR GCPtrInstr, PCCPUMCTXCORE pCtxCore, PDISCPUSTATE pCpu, unsigned *pcbInstr)
    168168{
    169     int rc = DISCoreOneEx(GCPtrInstr, SELMGetSelectorType(pVM, pCtxCore->eflags, pCtxCore->cs, (PCPUMSELREGHID)&pCtxCore->csHid),
     169    int rc = DISCoreOneEx(GCPtrInstr, SELMGetCpuModeFromSelector(pVM, pCtxCore->eflags, pCtxCore->cs, (PCPUMSELREGHID)&pCtxCore->csHid),
    170170#ifdef IN_GC
    171171                          NULL, NULL,
     
    209209        uint32_t    cbOp;
    210210        DISCPUSTATE Cpu;
    211         Cpu.mode = SELMGetSelectorType(pVM, pRegFrame->eflags, pRegFrame->cs, &pRegFrame->csHid);
     211        Cpu.mode = SELMGetCpuModeFromSelector(pVM, pRegFrame->eflags, pRegFrame->cs, &pRegFrame->csHid);
    212212        rc = emDisCoreOne(pVM, &Cpu, (RTGCUINTPTR)pbCode, &cbOp);
    213213        if (VBOX_SUCCESS(rc))
     
    631631
    632632            /* Read stack value first */
    633             if (SELMGetSelectorType(pVM, pRegFrame->eflags, pRegFrame->ss, &pRegFrame->ssHid) == CPUMODE_16BIT)
     633            if (SELMGetCpuModeFromSelector(pVM, pRegFrame->eflags, pRegFrame->ss, &pRegFrame->ssHid) == CPUMODE_16BIT)
    634634                return VERR_EM_INTERPRETER; /* No legacy 16 bits stuff here, please. */
    635635
  • trunk/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp

    r9658 r9659  
    302302    {
    303303        cTransfers = pRegFrame->ecx;
    304         if (SELMGetSelectorType(pVM, pRegFrame->eflags, pRegFrame->cs, &pRegFrame->csHid) == CPUMODE_16BIT)
     304        if (SELMGetCpuModeFromSelector(pVM, pRegFrame->eflags, pRegFrame->cs, &pRegFrame->csHid) == CPUMODE_16BIT)
    305305            cTransfers &= 0xffff;
    306306
     
    543543    {
    544544        cTransfers = pRegFrame->ecx;
    545         if (SELMGetSelectorType(pVM, pRegFrame->eflags, pRegFrame->cs, &pRegFrame->csHid) == CPUMODE_16BIT)
     545        if (SELMGetCpuModeFromSelector(pVM, pRegFrame->eflags, pRegFrame->cs, &pRegFrame->csHid) == CPUMODE_16BIT)
    546546            cTransfers &= 0xffff;
    547547
     
    13101310        cTransfers = pRegFrame->ecx;
    13111311
    1312         if (SELMGetSelectorType(pVM, pRegFrame->eflags, pRegFrame->cs, &pRegFrame->csHid) == CPUMODE_16BIT)
     1312        if (SELMGetCpuModeFromSelector(pVM, pRegFrame->eflags, pRegFrame->cs, &pRegFrame->csHid) == CPUMODE_16BIT)
    13131313            cTransfers &= 0xffff;
    13141314
     
    14651465    {
    14661466        cTransfers = pRegFrame->ecx;
    1467         if (SELMGetSelectorType(pVM, pRegFrame->eflags, pRegFrame->cs, &pRegFrame->csHid) == CPUMODE_16BIT)
     1467        if (SELMGetCpuModeFromSelector(pVM, pRegFrame->eflags, pRegFrame->cs, &pRegFrame->csHid) == CPUMODE_16BIT)
    14681468            cTransfers &= 0xffff;
    14691469
  • trunk/src/VBox/VMM/VMMAll/SELMAll.cpp

    r9658 r9659  
    536536
    537537/**
    538  * Return the selector type
     538 * Return the cpu mode corresponding to the (CS) selector
    539539 *
    540540 * @returns DISCPUMODE according to the selector type (16, 32 or 64 bits)
     
    542542 * @param   Sel     The selector.
    543543 */
    544 static DISCPUMODE selmGetSelectorType(PVM pVM, RTSEL Sel)
     544static DISCPUMODE selmGetCpuModeFromSelector(PVM pVM, RTSEL Sel)
    545545{
    546546    Assert(!CPUMAreHiddenSelRegsValid(pVM));
     
    561561
    562562/**
    563  * Return the selector type
     563 * Return the cpu mode corresponding to the (CS) selector
    564564 *
    565565 * @returns DISCPUMODE according to the selector type (16, 32 or 64 bits)
     
    569569 * @param   pHiddenSel The hidden selector register.
    570570 */
    571 SELMDECL(DISCPUMODE) SELMGetSelectorType(PVM pVM, X86EFLAGS eflags, RTSEL Sel, CPUMSELREGHID *pHiddenSel)
     571SELMDECL(DISCPUMODE) SELMGetCpuModeFromSelector(PVM pVM, X86EFLAGS eflags, RTSEL Sel, CPUMSELREGHID *pHiddenSel)
    572572{
    573573    if (!CPUMAreHiddenSelRegsValid(pVM))
     
    580580            return CPUMODE_16BIT;
    581581
    582         return selmGetSelectorType(pVM, Sel);
     582        return selmGetCpuModeFromSelector(pVM, Sel);
    583583    }
    584584    if (    CPUMIsGuestInLongMode(pVM)
  • trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp

    r9658 r9659  
    18801880     * Only allow 32-bit code.
    18811881     */
    1882     if (SELMGetSelectorType(pVM, pRegFrame->eflags, pRegFrame->cs, &pRegFrame->csHid) == CPUMODE_16BIT)
     1882    if (SELMGetCpuModeFromSelector(pVM, pRegFrame->eflags, pRegFrame->cs, &pRegFrame->csHid) == CPUMODE_16BIT)
    18831883    {
    18841884        RTGCPTR pbCode;
     
    19751975        * Only allow 32-bit code.
    19761976        */
    1977         if (SELMGetSelectorType(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid))
     1977        if (SELMGetCpuModeFromSelector(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid))
    19781978        {
    19791979            RTGCPTR pbCode;
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