VirtualBox

Changeset 91856 in vbox for trunk


Ignore:
Timestamp:
Oct 20, 2021 1:02:23 AM (3 years ago)
Author:
vboxsync
Message:

VMM/MM: Build fix. bugref:10122

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/MMHyper.cpp

    r91854 r91856  
    652652
    653653/**
    654  * Lookus up a ring-3 pointer to HMA.
    655  *
    656  * @returns The lookup record on success, NULL on failure.
    657  * @param   pVM                 The cross context VM structure.
    658  * @param   pvR3                The ring-3 address to look up.
    659  */
    660 DECLINLINE(PMMLOOKUPHYPER) mmR3HyperLookupR3(PVM pVM, void *pvR3)
    661 {
    662     PMMLOOKUPHYPER  pLookup = (PMMLOOKUPHYPER)((uint8_t *)pVM->mm.s.pHyperHeapR3 + pVM->mm.s.offLookupHyper);
    663     for (;;)
    664     {
    665         switch (pLookup->enmType)
    666         {
    667             case MMLOOKUPHYPERTYPE_LOCKED:
    668             {
    669                 unsigned off = (uint8_t *)pvR3 - (uint8_t *)pLookup->u.Locked.pvR3;
    670                 if (off < pLookup->cb)
    671                     return pLookup;
    672                 break;
    673             }
    674 
    675             case MMLOOKUPHYPERTYPE_HCPHYS:
    676             {
    677                 unsigned off = (uint8_t *)pvR3 - (uint8_t *)pLookup->u.HCPhys.pvR3;
    678                 if (off < pLookup->cb)
    679                     return pLookup;
    680                 break;
    681             }
    682 
    683             case MMLOOKUPHYPERTYPE_GCPHYS:
    684             case MMLOOKUPHYPERTYPE_MMIO2:
    685             case MMLOOKUPHYPERTYPE_DYNAMIC:
    686                 /** @todo ?    */
    687                 break;
    688 
    689             default:
    690                 AssertMsgFailed(("enmType=%d\n", pLookup->enmType));
    691                 return NULL;
    692         }
    693 
    694         /* next */
    695         if ((unsigned)pLookup->offNext == NIL_OFFSET)
    696             return NULL;
    697         pLookup = (PMMLOOKUPHYPER)((uint8_t *)pLookup + pLookup->offNext);
    698     }
    699 }
    700 
    701 
    702 /**
    703654 * Convert hypervisor HC virtual address to HC physical address.
    704655 *
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