VirtualBox

Changeset 93622 in vbox


Ignore:
Timestamp:
Feb 6, 2022 3:55:04 PM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
149767
Message:

VMM/MMHyper: Removed unused code. [build fix] bugref:10093

File:
1 edited

Legend:

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

    r93621 r93622  
    156156
    157157
    158 /**
    159  * Lookup a raw-mode context address.
    160  *
    161  * @returns Pointer to the corresponding lookup record.
    162  * @returns NULL on failure.
    163  * @param   pVM     The cross context VM structure.
    164  * @param   RCPtr   The raw-mode context address to lookup.
    165  * @param   poff    Where to store the offset into the HMA memory chunk.
    166  */
    167 DECLINLINE(PMMLOOKUPHYPER) mmHyperLookupRC(PVM pVM, RTRCPTR RCPtr, uint32_t *poff)
    168 {
    169     /** @todo cache last lookup this stuff ain't cheap! */
    170     unsigned        offRC = (RTRCUINTPTR)RCPtr - (RTGCUINTPTR)pVM->mm.s.pvHyperAreaGC;
    171     PMMLOOKUPHYPER  pLookup = (PMMLOOKUPHYPER)((uint8_t *)pVM->mm.s.CTX_SUFF(pHyperHeap) + pVM->mm.s.offLookupHyper);
    172     for (;;)
    173     {
    174         const uint32_t off = offRC - pLookup->off;
    175         if (off < pLookup->cb)
    176         {
    177             switch (pLookup->enmType)
    178             {
    179                 case MMLOOKUPHYPERTYPE_LOCKED:
    180                 case MMLOOKUPHYPERTYPE_HCPHYS:
    181                     *poff = off;
    182                     return pLookup;
    183                 default:
    184                     break;
    185             }
    186             AssertMsgFailed(("enmType=%d\n", pLookup->enmType));
    187             *poff = 0; /* shut up gcc */
    188             return NULL;
    189         }
    190 
    191         /* next */
    192         if (pLookup->offNext == (int32_t)NIL_OFFSET)
    193             break;
    194         pLookup = (PMMLOOKUPHYPER)((uint8_t *)pLookup + pLookup->offNext);
    195     }
    196 
    197     AssertMsgFailed(("RCPtr=%RRv is not inside the hypervisor memory area!\n", RCPtr));
    198     *poff = 0; /* shut up gcc */
    199     return NULL;
    200 }
    201 
    202 
     158#ifdef IN_RING3
    203159/**
    204160 * Lookup a current context address.
     
    212168DECLINLINE(PMMLOOKUPHYPER) mmHyperLookupCC(PVM pVM, void *pv, uint32_t *poff)
    213169{
    214 #ifdef IN_RING0
     170# ifdef IN_RING0
    215171    return mmHyperLookupR0(pVM, pv, poff);
    216 #elif defined(IN_RING3)
     172# elif defined(IN_RING3)
    217173    return mmHyperLookupR3(pVM, pv, poff);
    218 #else
    219 # error "Neither IN_RING0 nor IN_RING3!"
    220 #endif
    221 }
    222 
    223 
     174# else
     175#  error "Neither IN_RING0 nor IN_RING3!"
     176# endif
     177}
     178#endif
     179
     180
     181#ifdef IN_RING3
    224182/**
    225183 * Calculate the host context ring-3 address of an offset into the HMA memory chunk.
     
    242200    }
    243201}
     202#endif
    244203
    245204
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