VirtualBox

忽略:
時間撮記:
2008-5-29 上午09:38:38 (16 年 以前)
作者:
vboxsync
訊息:

Major changes for sizeof(RTGCPTR) == uint64_t.
Introduced RCPTRTYPE for pointers valid in raw mode only (RTGCPTR32).

Disabled by default. Enable by adding VBOX_WITH_64_BITS_GUESTS to your LocalConfig.kmk.

檔案:
修改 1 筆資料

圖例:

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

    r8155 r9212  
    174174{
    175175#ifdef IN_GC
    176     return mmHyperLookupGC(pVM, pv, poff);
     176    return mmHyperLookupGC(pVM, (RTGCPTR)pv, poff);
    177177#elif defined(IN_RING0)
    178178    return mmHyperLookupR0(pVM, pv, poff);
     
    254254{
    255255#ifdef IN_GC
    256     return mmHyperLookupCalcGC(pVM, pLookup, off);
     256    return (void *)mmHyperLookupCalcGC(pVM, pLookup, off);
    257257#elif defined(IN_RING0)
    258258    return mmHyperLookupCalcR0(pLookup, off);
     
    494494 */
    495495#ifndef IN_GC
    496 MMDECL(RTGCPTR) MMHyperCCToGC(PVM pVM, void *pv)
     496MMDECL(RCPTRTYPE(void *)) MMHyperCCToGC(PVM pVM, void *pv)
    497497{
    498498    uint32_t off;
     
    516516 * @deprecated
    517517 */
    518 MMDECL(RTGCPTR) MMHyperHC2GC(PVM pVM, RTHCPTR HCPtr)
     518MMDECL(RCPTRTYPE(void *)) MMHyperHC2GC(PVM pVM, RTHCPTR HCPtr)
    519519{
    520520    PMMLOOKUPHYPER  pLookup = (PMMLOOKUPHYPER)((char*)CTXSUFF(pVM->mm.s.pHyperHeap) + pVM->mm.s.offLookupHyper);
     
    527527                unsigned    off = (RTHCUINTPTR)HCPtr - (RTHCUINTPTR)pLookup->u.Locked.pvHC;
    528528                if (off < pLookup->cb)
    529                     return (RTGCPTR)((RTGCUINTPTR)pVM->mm.s.pvHyperAreaGC + pLookup->off + off);
     529                    return (RCPTRTYPE(void *))((RTGCUINTPTR)pVM->mm.s.pvHyperAreaGC + pLookup->off + off);
    530530                break;
    531531            }
     
    535535                unsigned    off = (RTHCUINTPTR)HCPtr - (RTHCUINTPTR)pLookup->u.HCPhys.pvHC;
    536536                if (off < pLookup->cb)
    537                     return (RTGCPTR)((RTGCUINTPTR)pVM->mm.s.pvHyperAreaGC + pLookup->off + off);
     537                    return (RCPTRTYPE(void *))((RTGCUINTPTR)pVM->mm.s.pvHyperAreaGC + pLookup->off + off);
    538538                break;
    539539            }
     
    556556
    557557    AssertMsgFailed(("HCPtr=%p is not inside the hypervisor memory area!\n", HCPtr));
    558     return (RTGCPTR)0;
     558    return (RCPTRTYPE(void *))0;
    559559}
    560560
     
    570570 * @deprecated
    571571 */
    572 MMDECL(RTHCPTR) MMHyperGC2HC(PVM pVM, RTGCPTR GCPtr)
     572MMDECL(RTHCPTR) MMHyperGC2HC(PVM pVM, RCPTRTYPE(void *) GCPtr)
    573573{
    574574    unsigned        offGC = (RTGCUINTPTR)GCPtr - (RTGCUINTPTR)pVM->mm.s.pvHyperAreaGC;
     
    615615MMDECL(RTHCPTR) MMHyper2HC(PVM pVM, uintptr_t Ptr)
    616616{
    617     return MMHyperGC2HC(pVM, (RTGCPTR)Ptr);
     617    return MMHyperGC2HC(pVM, (RCPTRTYPE(void *))Ptr);
    618618}
    619619
     
    630630 * @deprecated
    631631 */
    632 MMDECL(RTGCPTR) MMHyper2GC(PVM pVM, uintptr_t Ptr)
     632MMDECL(RCPTRTYPE(void *)) MMHyper2GC(PVM pVM, uintptr_t Ptr)
    633633{
    634634    return MMHyperHC2GC(pVM, (RTHCPTR)Ptr);
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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