VirtualBox

Changeset 20864 in vbox


Ignore:
Timestamp:
Jun 23, 2009 7:19:42 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
49009
Message:

SUP,*: API cleanup.

Location:
trunk
Files:
39 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/pdmdrv.h

    r20706 r20864  
    621621
    622622    /**
    623      * Calls the HC R0 VMM entry point, in a safer but slower manner than SUPCallVMMR0.
     623     * Calls the HC R0 VMM entry point, in a safer but slower manner than
     624     * SUPR3CallVMMR0.
    624625     *
    625626     * When entering using this call the R0 components can call into the host kernel
  • trunk/include/VBox/sup.h

    r20862 r20864  
    6868{
    6969    /** The usual invalid entry.
    70      * This is returned by SUPGetPagingMode()  */
     70     * This is returned by SUPR3GetPagingMode()  */
    7171    SUPPAGINGMODE_INVALID = 0,
    7272    /** Normal 32-bit paging, no global pages */
     
    453453 * @returns VBox status code.
    454454 */
    455 SUPR3DECL(int) SUPInstall(void);
     455SUPR3DECL(int) SUPR3Install(void);
    456456
    457457/**
     
    460460 * @returns VBox status code.
    461461 */
    462 SUPR3DECL(int) SUPUninstall(void);
     462SUPR3DECL(int) SUPR3Uninstall(void);
    463463
    464464/**
     
    543543 * Initializes the support library.
    544544 * Each succesful call to SUPR3Init() must be countered by a
    545  * call to SUPTerm(false).
     545 * call to SUPR3Term(false).
    546546 *
    547547 * @returns VBox status code.
     
    558558 */
    559559#ifdef __cplusplus
    560 SUPR3DECL(int) SUPTerm(bool fForced = false);
     560SUPR3DECL(int) SUPR3Term(bool fForced = false);
    561561#else
    562 SUPR3DECL(int) SUPTerm(int fForced);
     562SUPR3DECL(int) SUPR3Term(int fForced);
    563563#endif
    564564
     
    571571 *                      VM is about to be destroyed.
    572572 */
    573 SUPR3DECL(int) SUPSetVMForFastIOCtl(PVMR0 pVMR0);
     573SUPR3DECL(int) SUPR3SetVMForFastIOCtl(PVMR0 pVMR0);
    574574
    575575/**
     
    583583 * @param   pvArg       Argument.
    584584 */
    585 SUPR3DECL(int) SUPCallVMMR0(PVMR0 pVMR0, VMCPUID idCpu, unsigned uOperation, void *pvArg);
    586 
    587 /**
    588  * Variant of SUPCallVMMR0, except that this takes the fast ioclt path
     585SUPR3DECL(int) SUPR3CallVMMR0(PVMR0 pVMR0, VMCPUID idCpu, unsigned uOperation, void *pvArg);
     586
     587/**
     588 * Variant of SUPR3CallVMMR0, except that this takes the fast ioclt path
    589589 * regardsless of compile-time defaults.
    590590 *
     
    594594 * @param   idCpu       The virtual CPU ID.
    595595 */
    596 SUPR3DECL(int) SUPCallVMMR0Fast(PVMR0 pVMR0, unsigned uOperation, VMCPUID idCpu);
    597 
    598 /**
    599  * Calls the HC R0 VMM entry point, in a safer but slower manner than SUPCallVMMR0.
    600  * When entering using this call the R0 components can call into the host kernel
    601  * (i.e. use the SUPR0 and RT APIs).
     596SUPR3DECL(int) SUPR3CallVMMR0Fast(PVMR0 pVMR0, unsigned uOperation, VMCPUID idCpu);
     597
     598/**
     599 * Calls the HC R0 VMM entry point, in a safer but slower manner than
     600 * SUPR3CallVMMR0. When entering using this call the R0 components can call
     601 * into the host kernel (i.e. use the SUPR0 and RT APIs).
    602602 *
    603603 * See VMMR0Entry() for more details.
     
    612612 *                      limit on this, just below 4KB.
    613613 */
    614 SUPR3DECL(int) SUPCallVMMR0Ex(PVMR0 pVMR0, VMCPUID idCpu, unsigned uOperation, uint64_t u64Arg, PSUPVMMR0REQHDR pReqHdr);
     614SUPR3DECL(int) SUPR3CallVMMR0Ex(PVMR0 pVMR0, VMCPUID idCpu, unsigned uOperation, uint64_t u64Arg, PSUPVMMR0REQHDR pReqHdr);
    615615
    616616/**
     
    672672 * @returns The paging mode.
    673673 */
    674 SUPR3DECL(SUPPAGINGMODE) SUPGetPagingMode(void);
     674SUPR3DECL(SUPPAGINGMODE) SUPR3GetPagingMode(void);
    675675
    676676/**
    677677 * Allocate zero-filled pages.
    678678 *
    679  * Use this to allocate a number of pages rather than using RTMem*() and mess with
    680  * alignment. The returned address is of course page aligned. Call SUPPageFree()
    681  * to free the pages once done with them.
     679 * Use this to allocate a number of pages suitable for seeding / locking.
     680 * Call SUPR3PageFree() to free the pages once done with them.
    682681 *
    683682 * @returns VBox status.
     
    685684 * @param   ppvPages        Where to store the base pointer to the allocated pages.
    686685 */
    687 SUPR3DECL(int) SUPPageAlloc(size_t cPages, void **ppvPages);
    688 
    689 /**
    690  * Frees pages allocated with SUPPageAlloc().
     686SUPR3DECL(int) SUPR3PageAlloc(size_t cPages, void **ppvPages);
     687
     688/**
     689 * Frees pages allocated with SUPR3PageAlloc().
    691690 *
    692691 * @returns VBox status.
    693  * @param   pvPages         Pointer returned by SUPPageAlloc().
     692 * @param   pvPages         Pointer returned by SUPR3PageAlloc().
    694693 * @param   cPages          Number of pages that was allocated.
    695694 */
    696 SUPR3DECL(int) SUPPageFree(void *pvPages, size_t cPages);
     695SUPR3DECL(int) SUPR3PageFree(void *pvPages, size_t cPages);
    697696
    698697/**
     
    702701 * Use SUPR3PageFreeEx() to free memory allocated with this function.
    703702 *
    704  * This SUPR3PageAllocEx and SUPR3PageFreeEx replaces SUPPageAllocLocked,
    705  * SUPPageAllocLockedEx, SUPPageFreeLocked, SUPPageAlloc, SUPPageLock,
    706  * SUPPageUnlock and SUPPageFree.
     703 * This SUPR3PageAllocEx and SUPR3PageFreeEx replaces SUPR3PageAllocLockedEx,
     704 * SUPR3PageFreeLocked, SUPR3PageAlloc, and SUPR3PageFree.
    707705 *
    708706 * @returns VBox status code.
     
    765763 * Allocate non-zeroed locked pages.
    766764 *
    767  * Use this to allocate a number of pages rather than using RTMem*() and mess with
    768  * alignment. The returned address is of course page aligned. Call SUPPageFreeLocked()
    769  * to free the pages once done with them.
    770  *
    771765 * @returns VBox status code.
    772766 * @param   cPages          Number of pages to allocate.
     
    775769 *                          On entry this will point to an array of with cbMemory >> PAGE_SHIFT entries.
    776770 *                          NULL is allowed.
    777  */
    778 SUPR3DECL(int) SUPPageAllocLockedEx(size_t cPages, void **ppvPages, PSUPPAGE paPages);
    779 
    780 /**
    781  * Frees locked pages allocated with SUPPageAllocLocked().
     771 * @todo remove this.
     772 */
     773SUPR3DECL(int) SUPR3PageAllocLockedEx(size_t cPages, void **ppvPages, PSUPPAGE paPages);
     774
     775/**
     776 * Frees locked pages allocated with SUPPageAllocLockedEx().
    782777 *
    783778 * @returns VBox status.
    784  * @param   pvPages         Pointer returned by SUPPageAlloc().
     779 * @param   pvPages         Pointer returned by SUPR3PageAllocLockedEx().
    785780 * @param   cPages          Number of pages that was allocated.
    786  */
    787 SUPR3DECL(int) SUPPageFreeLocked(void *pvPages, size_t cPages);
    788 
    789 /**
    790  * Allocated memory with page aligned memory with a contiguous and locked physical
    791  * memory backing below 4GB.
    792  *
    793  * @returns Pointer to the allocated memory (virtual address).
    794  *          *pHCPhys is set to the physical address of the memory.
    795  *          The returned memory must be freed using SUPContFree().
    796  * @returns NULL on failure.
    797  * @param   cPages      Number of pages to allocate.
    798  * @param   pHCPhys     Where to store the physical address of the memory block.
    799  */
    800 SUPR3DECL(void *) SUPContAlloc(size_t cPages, PRTHCPHYS pHCPhys);
     781 * @todo remove this.
     782 */
     783SUPR3DECL(int) SUPR3PageFreeLocked(void *pvPages, size_t cPages);
    801784
    802785/**
     
    807790 *          *pHCPhys is set to the physical address of the memory.
    808791 *          If ppvR0 isn't NULL, *ppvR0 is set to the ring-0 mapping.
    809  *          The returned memory must be freed using SUPContFree().
     792 *          The returned memory must be freed using SUPR3ContFree().
    810793 * @returns NULL on failure.
    811794 * @param   cPages      Number of pages to allocate.
     
    817800 *          the world switchers.
    818801 */
    819 SUPR3DECL(void *) SUPContAlloc2(size_t cPages, PRTR0PTR pR0Ptr, PRTHCPHYS pHCPhys);
    820 
    821 /**
    822  * Frees memory allocated with SUPContAlloc().
     802SUPR3DECL(void *) SUPR3ContAlloc(size_t cPages, PRTR0PTR pR0Ptr, PRTHCPHYS pHCPhys);
     803
     804/**
     805 * Frees memory allocated with SUPR3ContAlloc().
    823806 *
    824807 * @returns VBox status code.
     
    826809 * @param   cPages      Number of pages to be freed.
    827810 */
    828 SUPR3DECL(int) SUPContFree(void *pv, size_t cPages);
     811SUPR3DECL(int) SUPR3ContFree(void *pv, size_t cPages);
    829812
    830813/**
     
    837820 * @param   cPages      Number of pages to allocate.
    838821 * @param   ppvPages    Where to store the pointer to the allocated memory.
    839  *                      The pointer stored here on success must be passed to SUPLowFree when
    840  *                      the memory should be released.
     822 *                      The pointer stored here on success must be passed to
     823 *                      SUPR3LowFree when the memory should be released.
    841824 * @param   ppvPagesR0  Where to store the ring-0 pointer to the allocated memory. optional.
    842825 * @param   paPages     Where to store the physical addresses of the individual pages.
    843826 */
    844 SUPR3DECL(int) SUPLowAlloc(size_t cPages, void **ppvPages, PRTR0PTR ppvPagesR0, PSUPPAGE paPages);
    845 
    846 /**
    847  * Frees memory allocated with SUPLowAlloc().
     827SUPR3DECL(int) SUPR3LowAlloc(size_t cPages, void **ppvPages, PRTR0PTR ppvPagesR0, PSUPPAGE paPages);
     828
     829/**
     830 * Frees memory allocated with SUPR3LowAlloc().
    848831 *
    849832 * @returns VBox status code.
     
    851834 * @param   cPages      Number of pages that was allocated.
    852835 */
    853 SUPR3DECL(int) SUPLowFree(void *pv, size_t cPages);
     836SUPR3DECL(int) SUPR3LowFree(void *pv, size_t cPages);
    854837
    855838/**
     
    864847 * @param   ppvImageBase        Where to store the image address.
    865848 */
    866 SUPR3DECL(int) SUPLoadModule(const char *pszFilename, const char *pszModule, void **ppvImageBase);
     849SUPR3DECL(int) SUPR3LoadModule(const char *pszFilename, const char *pszModule, void **ppvImageBase);
    867850
    868851/**
     
    889872 * @remark  This will not actually 'free' the module, there are of course usage counting.
    890873 */
    891 SUPR3DECL(int) SUPFreeModule(void *pvImageBase);
     874SUPR3DECL(int) SUPR3FreeModule(void *pvImageBase);
    892875
    893876/**
     
    900883 * @param   ppvValue        Where to store the symbol value.
    901884 */
    902 SUPR3DECL(int) SUPGetSymbolR0(void *pvImageBase, const char *pszSymbol, void **ppvValue);
     885SUPR3DECL(int) SUPR3GetSymbolR0(void *pvImageBase, const char *pszSymbol, void **ppvValue);
    903886
    904887/**
     
    906889 *
    907890 * @returns VBox status code.
    908  * @deprecated  Use SUPLoadModule(pszFilename, "VMMR0.r0", &pvImageBase)
    909  */
    910 SUPR3DECL(int) SUPLoadVMM(const char *pszFilename);
     891 * @deprecated  Use SUPR3LoadModule(pszFilename, "VMMR0.r0", &pvImageBase)
     892 */
     893SUPR3DECL(int) SUPR3LoadVMM(const char *pszFilename);
    911894
    912895/**
     
    914897 *
    915898 * @returns VBox status code.
    916  * @deprecated  Use SUPFreeModule().
    917  */
    918 SUPR3DECL(int) SUPUnloadVMM(void);
     899 * @deprecated  Use SUPR3FreeModule().
     900 */
     901SUPR3DECL(int) SUPR3UnloadVMM(void);
    919902
    920903/**
     
    924907 * @param   pHCPhys     Where to store the physical address of the GIP.
    925908 */
    926 SUPR3DECL(int) SUPGipGetPhys(PRTHCPHYS pHCPhys);
     909SUPR3DECL(int) SUPR3GipGetPhys(PRTHCPHYS pHCPhys);
    927910
    928911/**
  • trunk/src/VBox/Devices/Network/testcase/tstIntNet-1.cpp

    r19924 r20864  
    312312    SendReq.pSession = pSession;
    313313    SendReq.hIf = hIf;
    314     rc = SUPCallVMMR0Ex(NIL_RTR0PTR, NIL_VMCPUID, VMMR0_DO_INTNET_IF_SEND, 0, &SendReq.Hdr);
     314    rc = SUPR3CallVMMR0Ex(NIL_RTR0PTR, NIL_VMCPUID, VMMR0_DO_INTNET_IF_SEND, 0, &SendReq.Hdr);
    315315    if (RT_FAILURE(rc))
    316316    {
    317         RTPrintf("tstIntNet-1: SUPCallVMMR0Ex(,VMMR0_DO_INTNET_IF_SEND,) failed, rc=%Rrc\n", rc);
     317        RTPrintf("tstIntNet-1: SUPR3CallVMMR0Ex(,VMMR0_DO_INTNET_IF_SEND,) failed, rc=%Rrc\n", rc);
    318318        g_cErrors++;
    319319    }
     
    542542        WaitReq.hIf = hIf;
    543543        WaitReq.cMillies = cMillies - (uint32_t)cElapsedMillies;
    544         int rc = SUPCallVMMR0Ex(NIL_RTR0PTR, NIL_VMCPUID, VMMR0_DO_INTNET_IF_WAIT, 0, &WaitReq.Hdr);
     544        int rc = SUPR3CallVMMR0Ex(NIL_RTR0PTR, NIL_VMCPUID, VMMR0_DO_INTNET_IF_WAIT, 0, &WaitReq.Hdr);
    545545        if (rc == VERR_TIMEOUT)
    546546            break;
     
    853853    }
    854854
    855     rc = SUPLoadVMM(strcat(szPath, "/../VMMR0.r0"));
     855    rc = SUPR3LoadVMM(strcat(szPath, "/../VMMR0.r0"));
    856856    if (RT_FAILURE(rc))
    857857    {
    858         RTPrintf("tstIntNet-1: SUPLoadVMM(\"%s\") -> %Rrc\n", szPath, rc);
     858        RTPrintf("tstIntNet-1: SUPR3LoadVMM(\"%s\") -> %Rrc\n", szPath, rc);
    859859        return 1;
    860860    }
     
    882882             OpenReq.szNetwork, OpenReq.szTrunk);
    883883    RTStrmFlush(g_pStdOut);
    884     rc = SUPCallVMMR0Ex(NIL_RTR0PTR, NIL_VMCPUID, VMMR0_DO_INTNET_OPEN, 0, &OpenReq.Hdr);
     884    rc = SUPR3CallVMMR0Ex(NIL_RTR0PTR, NIL_VMCPUID, VMMR0_DO_INTNET_OPEN, 0, &OpenReq.Hdr);
    885885    if (RT_SUCCESS(rc))
    886886    {
     
    898898        GetRing3BufferReq.hIf = OpenReq.hIf;
    899899        GetRing3BufferReq.pRing3Buf = NULL;
    900         rc = SUPCallVMMR0Ex(NIL_RTR0PTR, NIL_VMCPUID, VMMR0_DO_INTNET_IF_GET_RING3_BUFFER, 0, &GetRing3BufferReq.Hdr);
     900        rc = SUPR3CallVMMR0Ex(NIL_RTR0PTR, NIL_VMCPUID, VMMR0_DO_INTNET_IF_GET_RING3_BUFFER, 0, &GetRing3BufferReq.Hdr);
    901901        if (RT_SUCCESS(rc))
    902902        {
     
    913913                PromiscReq.hIf          = OpenReq.hIf;
    914914                PromiscReq.fPromiscuous = true;
    915                 rc = SUPCallVMMR0Ex(NIL_RTR0PTR, NIL_VMCPUID, VMMR0_DO_INTNET_IF_SET_PROMISCUOUS_MODE, 0, &PromiscReq.Hdr);
     915                rc = SUPR3CallVMMR0Ex(NIL_RTR0PTR, NIL_VMCPUID, VMMR0_DO_INTNET_IF_SET_PROMISCUOUS_MODE, 0, &PromiscReq.Hdr);
    916916                if (RT_SUCCESS(rc))
    917917                    RTPrintf("tstIntNet-1: interface in promiscuous mode\n");
     
    928928                ActiveReq.hIf = OpenReq.hIf;
    929929                ActiveReq.fActive = true;
    930                 rc = SUPCallVMMR0Ex(NIL_RTR0PTR, NIL_VMCPUID, VMMR0_DO_INTNET_IF_SET_ACTIVE, 0, &ActiveReq.Hdr);
     930                rc = SUPR3CallVMMR0Ex(NIL_RTR0PTR, NIL_VMCPUID, VMMR0_DO_INTNET_IF_SET_ACTIVE, 0, &ActiveReq.Hdr);
    931931                if (RT_SUCCESS(rc))
    932932                {
     
    972972                else
    973973                {
    974                     RTPrintf("tstIntNet-1: SUPCallVMMR0Ex(,VMMR0_DO_INTNET_IF_SET_PROMISCUOUS_MODE,) failed, rc=%Rrc\n", rc);
     974                    RTPrintf("tstIntNet-1: SUPR3CallVMMR0Ex(,VMMR0_DO_INTNET_IF_SET_PROMISCUOUS_MODE,) failed, rc=%Rrc\n", rc);
    975975                    g_cErrors++;
    976976                }
     
    978978            else
    979979            {
    980                 RTPrintf("tstIntNet-1: SUPCallVMMR0Ex(,VMMR0_DO_INTNET_IF_SET_PROMISCUOUS_MODE,) failed, rc=%Rrc\n", rc);
     980                RTPrintf("tstIntNet-1: SUPR3CallVMMR0Ex(,VMMR0_DO_INTNET_IF_SET_PROMISCUOUS_MODE,) failed, rc=%Rrc\n", rc);
    981981                g_cErrors++;
    982982            }
     
    984984        else
    985985        {
    986             RTPrintf("tstIntNet-1: SUPCallVMMR0Ex(,VMMR0_DO_INTNET_IF_GET_RING3_BUFFER,) failed, rc=%Rrc\n", rc);
     986            RTPrintf("tstIntNet-1: SUPR3CallVMMR0Ex(,VMMR0_DO_INTNET_IF_GET_RING3_BUFFER,) failed, rc=%Rrc\n", rc);
    987987            g_cErrors++;
    988988        }
     
    990990    else
    991991    {
    992         RTPrintf("tstIntNet-1: SUPCallVMMR0Ex(,VMMR0_DO_INTNET_OPEN,) failed, rc=%Rrc\n", rc);
     992        RTPrintf("tstIntNet-1: SUPR3CallVMMR0Ex(,VMMR0_DO_INTNET_OPEN,) failed, rc=%Rrc\n", rc);
    993993        g_cErrors++;
    994994    }
    995995
    996     SUPTerm(false /* not forced */);
     996    SUPR3Term(false /*fForced*/);
    997997
    998998    /* close open files  */
  • trunk/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp

    r20842 r20864  
    16411641    int rc;
    16421642
    1643     rc = SUPUninstall();
     1643    rc = SUPR3Uninstall();
    16441644    if (RT_SUCCESS(rc))
    16451645        return 0;
     
    16581658    int rc;
    16591659
    1660     rc = SUPInstall();
     1660    rc = SUPR3Install();
    16611661    if (RT_SUCCESS(rc))
    16621662        return 0;
  • trunk/src/VBox/HostDrivers/Support/SUPLib.cpp

    r20862 r20864  
    149149
    150150
    151 SUPR3DECL(int) SUPInstall(void)
     151SUPR3DECL(int) SUPR3Install(void)
    152152{
    153153    return suplibOsInstall();
     
    155155
    156156
    157 SUPR3DECL(int) SUPUninstall(void)
     157SUPR3DECL(int) SUPR3Uninstall(void)
    158158{
    159159    return suplibOsUninstall();
     
    486486
    487487
    488 SUPR3DECL(int) SUPTerm(bool fForced)
     488SUPR3DECL(int) SUPR3Term(bool fForced)
    489489{
    490490    /*
    491491     * Verify state.
    492492     */
    493     AssertMsg(g_cInits > 0, ("SUPTerm() is called before SUPR3Init()!\n"));
     493    AssertMsg(g_cInits > 0, ("SUPR3Term() is called before SUPR3Init()!\n"));
    494494    if (g_cInits == 0)
    495495        return VERR_WRONG_ORDER;
     
    526526
    527527
    528 SUPR3DECL(SUPPAGINGMODE) SUPGetPagingMode(void)
     528SUPR3DECL(SUPPAGINGMODE) SUPR3GetPagingMode(void)
    529529{
    530530    /* fake */
     
    550550        ||  RT_FAILURE(Req.Hdr.rc))
    551551    {
    552         LogRel(("SUPGetPagingMode: %Rrc %Rrc\n", rc, Req.Hdr.rc));
     552        LogRel(("SUPR3GetPagingMode: %Rrc %Rrc\n", rc, Req.Hdr.rc));
    553553        Req.u.Out.enmMode = SUPPAGINGMODE_INVALID;
    554554    }
     
    568568
    569569
    570 SUPR3DECL(int) SUPCallVMMR0Fast(PVMR0 pVMR0, unsigned uOperation, VMCPUID idCpu)
     570SUPR3DECL(int) SUPR3CallVMMR0Fast(PVMR0 pVMR0, unsigned uOperation, VMCPUID idCpu)
    571571{
    572572    if (RT_LIKELY(uOperation == SUP_VMMR0_DO_RAW_RUN))
     
    582582
    583583
    584 SUPR3DECL(int) SUPCallVMMR0Ex(PVMR0 pVMR0, VMCPUID idCpu, unsigned uOperation, uint64_t u64Arg, PSUPVMMR0REQHDR pReqHdr)
     584SUPR3DECL(int) SUPR3CallVMMR0Ex(PVMR0 pVMR0, VMCPUID idCpu, unsigned uOperation, uint64_t u64Arg, PSUPVMMR0REQHDR pReqHdr)
    585585{
    586586    /*
     
    645645
    646646
    647 SUPR3DECL(int) SUPCallVMMR0(PVMR0 pVMR0, VMCPUID idCpu, unsigned uOperation, void *pvArg)
     647SUPR3DECL(int) SUPR3CallVMMR0(PVMR0 pVMR0, VMCPUID idCpu, unsigned uOperation, void *pvArg)
    648648{
    649649    /*
     
    655655                    ("%#x\n", uOperation),
    656656                    VERR_INTERNAL_ERROR);
    657     return SUPCallVMMR0Ex(pVMR0, idCpu, uOperation, (uintptr_t)pvArg, NULL);
    658 }
    659 
    660 
    661 SUPR3DECL(int) SUPSetVMForFastIOCtl(PVMR0 pVMR0)
     657    return SUPR3CallVMMR0Ex(pVMR0, idCpu, uOperation, (uintptr_t)pvArg, NULL);
     658}
     659
     660
     661SUPR3DECL(int) SUPR3SetVMForFastIOCtl(PVMR0 pVMR0)
    662662{
    663663    if (RT_UNLIKELY(g_u32FakeMode))
     
    834834
    835835
    836 SUPR3DECL(int) SUPPageAlloc(size_t cPages, void **ppvPages)
     836SUPR3DECL(int) SUPR3PageAlloc(size_t cPages, void **ppvPages)
    837837{
    838838    /*
     
    850850
    851851
    852 SUPR3DECL(int) SUPPageFree(void *pvPages, size_t cPages)
     852SUPR3DECL(int) SUPR3PageFree(void *pvPages, size_t cPages)
    853853{
    854854    /*
     
    876876 *                          On entry this will point to an array of with cbMemory >> PAGE_SHIFT entries.
    877877 */
    878 int supR3PageLock(void *pvStart, size_t cPages, PSUPPAGE paPages)
     878SUPR3DECL(int) supR3PageLock(void *pvStart, size_t cPages, PSUPPAGE paPages)
    879879{
    880880    /*
     
    938938 *                          down by SUPPageLock().
    939939 */
    940 int supR3PageUnlock(void *pvStart)
     940SUPR3DECL(int) supR3PageUnlock(void *pvStart)
    941941{
    942942    /*
     
    968968
    969969
    970 SUPR3DECL(int) SUPPageAllocLockedEx(size_t cPages, void **ppvPages, PSUPPAGE paPages)
     970SUPR3DECL(int) SUPR3PageAllocLockedEx(size_t cPages, void **ppvPages, PSUPPAGE paPages)
    971971{
    972972    return SUPR3PageAllocEx(cPages, 0 /*fFlags*/, ppvPages, NULL /*pR0Ptr*/, paPages);
     
    974974
    975975
    976 SUPR3DECL(int) SUPPageFreeLocked(void *pvPages, size_t cPages)
     976SUPR3DECL(int) SUPR3PageFreeLocked(void *pvPages, size_t cPages)
    977977{
    978978    /*
     
    10011001
    10021002/**
    1003  * Fallback for SUPPageAllocLockedEx on systems where RTR0MemObjPhysAllocNC isn't supported.
     1003 * Fallback for SUPR3PageAllocLockedEx on systems where RTR0MemObjPhysAllocNC
     1004 * isn't supported.
    10041005 */
    10051006static int supPagePageAllocNoKernelFallback(size_t cPages, void **ppvPages, PSUPPAGE paPages)
     
    12341235
    12351236
    1236 SUPR3DECL(void *) SUPContAlloc(size_t cPages, PRTHCPHYS pHCPhys)
    1237 {
    1238     return SUPContAlloc2(cPages, NIL_RTR0PTR, pHCPhys);
    1239 }
    1240 
    1241 
    1242 SUPR3DECL(void *) SUPContAlloc2(size_t cPages, PRTR0PTR pR0Ptr, PRTHCPHYS pHCPhys)
     1237SUPR3DECL(void *) SUPR3ContAlloc(size_t cPages, PRTR0PTR pR0Ptr, PRTHCPHYS pHCPhys)
    12431238{
    12441239    /*
     
    12891284
    12901285
    1291 SUPR3DECL(int) SUPContFree(void *pv, size_t cPages)
     1286SUPR3DECL(int) SUPR3ContFree(void *pv, size_t cPages)
    12921287{
    12931288    /*
     
    13241319
    13251320
    1326 SUPR3DECL(int) SUPLowAlloc(size_t cPages, void **ppvPages, PRTR0PTR ppvPagesR0, PSUPPAGE paPages)
     1321SUPR3DECL(int) SUPR3LowAlloc(size_t cPages, void **ppvPages, PRTR0PTR ppvPagesR0, PSUPPAGE paPages)
    13271322{
    13281323    /*
     
    13891384
    13901385
    1391 SUPR3DECL(int) SUPLowFree(void *pv, size_t cPages)
     1386SUPR3DECL(int) SUPR3LowFree(void *pv, size_t cPages)
    13921387{
    13931388    /*
     
    14481443
    14491444
    1450 SUPR3DECL(int) SUPLoadModule(const char *pszFilename, const char *pszModule, void **ppvImageBase)
     1445SUPR3DECL(int) SUPR3LoadModule(const char *pszFilename, const char *pszModule, void **ppvImageBase)
    14511446{
    14521447    int rc = VINF_SUCCESS;
     
    14601455        rc = supLoadModule(pszFilename, pszModule, NULL, ppvImageBase);
    14611456    else
    1462         LogRel(("SUPLoadModule: Verification of \"%s\" failed, rc=%Rrc\n", rc));
     1457        LogRel(("SUPR3LoadModule: Verification of \"%s\" failed, rc=%Rrc\n", rc));
    14631458    return rc;
    14641459}
     
    15331528     * Check the VMMR0.r0 module if loaded.
    15341529     */
    1535     /** @todo call the SUPLoadModule caller.... */
     1530    /** @todo call the SUPR3LoadModule caller.... */
    15361531    /** @todo proper reference counting and such. */
    15371532    if (g_pvVMMR0 != NIL_RTR0PTR)
    15381533    {
    15391534        void *pvValue;
    1540         if (!SUPGetSymbolR0((void *)g_pvVMMR0, pszSymbol, &pvValue))
     1535        if (!SUPR3GetSymbolR0((void *)g_pvVMMR0, pszSymbol, &pvValue))
    15411536        {
    15421537            *pValue = (uintptr_t)pvValue;
     
    16521647
    16531648/**
    1654  * Worker for SUPLoadModule().
     1649 * Worker for SUPR3LoadModule().
    16551650 *
    16561651 * @returns VBox status code.
     
    18681863
    18691864
    1870 SUPR3DECL(int) SUPFreeModule(void *pvImageBase)
     1865SUPR3DECL(int) SUPR3FreeModule(void *pvImageBase)
    18711866{
    18721867    /* fake */
     
    18981893
    18991894
    1900 SUPR3DECL(int) SUPGetSymbolR0(void *pvImageBase, const char *pszSymbol, void **ppvValue)
     1895SUPR3DECL(int) SUPR3GetSymbolR0(void *pvImageBase, const char *pszSymbol, void **ppvValue)
    19011896{
    19021897    *ppvValue = NULL;
     
    19331928
    19341929
    1935 SUPR3DECL(int) SUPLoadVMM(const char *pszFilename)
     1930SUPR3DECL(int) SUPR3LoadVMM(const char *pszFilename)
    19361931{
    19371932    void *pvImageBase;
    1938     return SUPLoadModule(pszFilename, "VMMR0.r0", &pvImageBase);
    1939 }
    1940 
    1941 
    1942 SUPR3DECL(int) SUPUnloadVMM(void)
    1943 {
    1944     return SUPFreeModule((void*)g_pvVMMR0);
    1945 }
    1946 
    1947 
    1948 SUPR3DECL(int) SUPGipGetPhys(PRTHCPHYS pHCPhys)
     1933    return SUPR3LoadModule(pszFilename, "VMMR0.r0", &pvImageBase);
     1934}
     1935
     1936
     1937SUPR3DECL(int) SUPR3UnloadVMM(void)
     1938{
     1939    return SUPR3FreeModule((void*)g_pvVMMR0);
     1940}
     1941
     1942
     1943SUPR3DECL(int) SUPR3GipGetPhys(PRTHCPHYS pHCPhys)
    19491944{
    19501945    if (g_pSUPGlobalInfoPage)
  • trunk/src/VBox/HostDrivers/Support/SUPLibInternal.h

    r20862 r20864  
    315315
    316316
    317 int                supR3PageLock(void *pvStart, size_t cPages, PSUPPAGE paPages);
    318 int                supR3PageUnlock(void *pvStart);
     317SUPR3DECL(int)      supR3PageLock(void *pvStart, size_t cPages, PSUPPAGE paPages);
     318SUPR3DECL(int)      supR3PageUnlock(void *pvStart);
    319319
    320320RT_C_DECLS_END
  • trunk/src/VBox/HostDrivers/Support/testcase/SUPInstall.cpp

    r14831 r20864  
    4242{
    4343    RTR3Init();
    44     int rc = SUPInstall();
     44    int rc = SUPR3Install();
    4545    if (RT_SUCCESS(rc))
    4646    {
  • trunk/src/VBox/HostDrivers/Support/testcase/SUPUninstall.cpp

    r14831 r20864  
    4242{
    4343    RTR3Init();
    44     int rc = SUPUninstall();
     44    int rc = SUPR3Uninstall();
    4545    if (RT_SUCCESS(rc))
    4646    {
  • trunk/src/VBox/HostDrivers/Support/testcase/tstContiguous.cpp

    r13837 r20864  
    5656         */
    5757        RTHCPHYS HCPhys;
    58         void *pv = SUPContAlloc(8, &HCPhys);
     58        void *pv = SUPR3ContAlloc(8, NIL_RTR0PTR, &HCPhys);
    5959        rcRet += pv == NULL || HCPhys == 0;
    6060        if (pv && HCPhys)
    6161        {
    6262            memset(pv, 0xff, PAGE_SIZE * 8);
    63             pv = SUPContAlloc(5, &HCPhys);
     63            pv = SUPR3ContAlloc(5, NIL_RTR0PTR, &HCPhys);
    6464            rcRet += pv == NULL || HCPhys == 0;
    6565            if (pv && HCPhys)
    6666            {
    6767                memset(pv, 0x7f, PAGE_SIZE * 5);
    68                 rc = SUPContFree(pv, 5);
     68                rc = SUPR3ContFree(pv, 5);
    6969                rcRet += rc != 0;
    7070                if (rc)
    71                     RTPrintf("tstContiguous: SUPContFree failed! rc=%Rrc\n", rc);
     71                    RTPrintf("tstContiguous: SUPR3ContFree failed! rc=%Rrc\n", rc);
    7272
    7373                void *apv[128];
    7474                for (unsigned i = 0; i < RT_ELEMENTS(apv); i++)
    7575                {
    76                     apv[i] = SUPContAlloc(1 + (i % 11), &HCPhys);
     76                    apv[i] = SUPR3ContAlloc(1 + (i % 11), NIL_RTR0PTR, &HCPhys);
    7777                    if (!apv[i])
    7878                    {
     
    8484                    if (apv[i])
    8585                    {
    86                         rc = SUPContFree(apv[i], 1 + (i % 11));
     86                        rc = SUPR3ContFree(apv[i], 1 + (i % 11));
    8787                        rcRet += rc != 0;
    8888                        if (rc)
    89                             RTPrintf("tstContiguous: i=%d SUPContFree failed! rc=%Rrc\n", i, rc);
     89                            RTPrintf("tstContiguous: i=%d SUPR3ContFree failed! rc=%Rrc\n", i, rc);
    9090                    }
    9191            }
    9292            else
    93                 RTPrintf("tstContiguous: SUPContAlloc (2nd) failed!\n");
     93                RTPrintf("tstContiguous: SUPR3ContAlloc (2nd) failed!\n");
    9494        }
    9595        else
    96             RTPrintf("tstContiguous: SUPContAlloc failed!\n");
     96            RTPrintf("tstContiguous: SUPR3ContAlloc failed!\n");
    9797
    98         rc = SUPTerm();
    99         RTPrintf("tstContiguous: SUPTerm -> rc=%Rrc\n", rc);
     98        rc = SUPR3Term(false /*fForced*/);
     99        RTPrintf("tstContiguous: SUPR3Term -> rc=%Rrc\n", rc);
    100100        rcRet += rc != 0;
    101101    }
  • trunk/src/VBox/HostDrivers/Support/testcase/tstGIP-2.cpp

    r17091 r20864  
    178178        }
    179179
    180         SUPTerm();
     180        SUPR3Term(false /*fForced*/);
    181181    }
    182182    else
  • trunk/src/VBox/HostDrivers/Support/testcase/tstGetPagingMode.cpp

    r14831 r20864  
    4747    if (RT_SUCCESS(rc))
    4848    {
    49         SUPPAGINGMODE enmMode = SUPGetPagingMode();
     49        SUPPAGINGMODE enmMode = SUPR3GetPagingMode();
    5050        switch (enmMode)
    5151        {
     
    8989        }
    9090
    91         int rc2 = SUPTerm();
    92         RTPrintf("SUPTerm -> rc=%Rrc\n", rc2);
     91        int rc2 = SUPR3Term(false /*fForced*/);
     92        RTPrintf("SUPR3Term -> rc=%Rrc\n", rc2);
    9393    }
    9494    else
  • trunk/src/VBox/HostDrivers/Support/testcase/tstInit.cpp

    r14831 r20864  
    4848    if (!rc)
    4949    {
    50         rc = SUPTerm();
    51         RTPrintf("tstInit: SUPTerm -> rc=%d\n", rc);
     50        rc = SUPR3Term(false /*fForced*/);
     51        RTPrintf("tstInit: SUPR3Term -> rc=%d\n", rc);
    5252    }
    5353
  • trunk/src/VBox/HostDrivers/Support/testcase/tstInt.cpp

    r20602 r20864  
    9292         */
    9393        char    szFile[RTPATH_MAX];
    94         rc = SUPLoadVMM(ExeDirFile(szFile, argv[0], "VMMR0.r0"));
     94        rc = SUPR3LoadVMM(ExeDirFile(szFile, argv[0], "VMMR0.r0"));
    9595        if (!rc)
    9696        {
     
    103103            PSUPPAGE paPages = (PSUPPAGE)RTMemAllocZ(cPages * sizeof(SUPPAGE));
    104104            if (paPages)
    105                 rc = SUPLowAlloc(cPages, (void **)&pVM, &pVMR0, &paPages[0]);
     105                rc = SUPR3LowAlloc(cPages, (void **)&pVM, &pVMR0, &paPages[0]);
    106106            else
    107107                rc = VERR_NO_MEMORY;
     
    115115                pVM->enmVMState = VMSTATE_CREATED;
    116116
    117                 rc = SUPSetVMForFastIOCtl(pVMR0);
     117                rc = SUPR3SetVMForFastIOCtl(pVMR0);
    118118                if (!rc)
    119119                {
     
    124124                    for (i = cIterations; i > 0; i--)
    125125                    {
    126                         rc = SUPCallVMMR0(pVMR0, NIL_VMCPUID, VMMR0_DO_SLOW_NOP, NULL);
     126                        rc = SUPR3CallVMMR0(pVMR0, NIL_VMCPUID, VMMR0_DO_SLOW_NOP, NULL);
    127127                        if (rc != VINF_SUCCESS)
    128128                        {
    129                             RTPrintf("tstInt: SUPCallVMMR0 -> rc=%Rrc i=%d Expected VINF_SUCCESS!\n", rc, i);
     129                            RTPrintf("tstInt: SUPR3CallVMMR0 -> rc=%Rrc i=%d Expected VINF_SUCCESS!\n", rc, i);
    130130                            rcRet++;
    131131                            break;
    132132                        }
    133133                    }
    134                     RTPrintf("tstInt: Performed SUPCallVMMR0 %d times (rc=%Rrc)\n", cIterations, rc);
     134                    RTPrintf("tstInt: Performed SUPR3CallVMMR0 %d times (rc=%Rrc)\n", cIterations, rc);
    135135
    136136                    /*
     
    146146                        {
    147147                            uint64_t OneStartTick = ASMReadTSC();
    148                             rc = SUPCallVMMR0Fast(pVMR0, VMMR0_DO_NOP, 0);
     148                            rc = SUPR3CallVMMR0Fast(pVMR0, VMMR0_DO_NOP, 0);
    149149                            uint64_t Ticks = ASMReadTSC() - OneStartTick;
    150150                            if (Ticks < MinTicks)
     
    153153                            if (RT_UNLIKELY(rc != VINF_SUCCESS))
    154154                            {
    155                                 RTPrintf("tstInt: SUPCallVMMR0Fast -> rc=%Rrc i=%d Expected VINF_SUCCESS!\n", rc, i);
     155                                RTPrintf("tstInt: SUPR3CallVMMR0Fast -> rc=%Rrc i=%d Expected VINF_SUCCESS!\n", rc, i);
    156156                                rcRet++;
    157157                                break;
     
    161161                        uint64_t NanoSecs = RTTimeNanoTS() - StartTS;
    162162
    163                         RTPrintf("tstInt: SUPCallVMMR0Fast - %d iterations in %llu ns / %llu ticks. %llu ns / %#llu ticks per iteration. Min %llu ticks.\n",
     163                        RTPrintf("tstInt: SUPR3CallVMMR0Fast - %d iterations in %llu ns / %llu ticks. %llu ns / %#llu ticks per iteration. Min %llu ticks.\n",
    164164                                 i, NanoSecs, Ticks, NanoSecs / i, Ticks / i, MinTicks);
    165165
     
    174174                        {
    175175                            uint64_t OneStartTick = ASMReadTSC();
    176                             rc = SUPCallVMMR0Ex(pVMR0, NIL_VMCPUID, VMMR0_DO_SLOW_NOP, 0, NULL);
     176                            rc = SUPR3CallVMMR0Ex(pVMR0, NIL_VMCPUID, VMMR0_DO_SLOW_NOP, 0, NULL);
    177177                            uint64_t Ticks = ASMReadTSC() - OneStartTick;
    178178                            if (Ticks < MinTicks)
     
    181181                            if (RT_UNLIKELY(rc != VINF_SUCCESS))
    182182                            {
    183                                 RTPrintf("tstInt: SUPCallVMMR0Ex -> rc=%Rrc i=%d Expected VINF_SUCCESS!\n", rc, i);
     183                                RTPrintf("tstInt: SUPR3CallVMMR0Ex -> rc=%Rrc i=%d Expected VINF_SUCCESS!\n", rc, i);
    184184                                rcRet++;
    185185                                break;
     
    189189                        NanoSecs = RTTimeNanoTS() - StartTS;
    190190
    191                         RTPrintf("tstInt: SUPCallVMMR0Ex   - %d iterations in %llu ns / %llu ticks. %llu ns / %#llu ticks per iteration. Min %llu ticks.\n",
     191                        RTPrintf("tstInt: SUPR3CallVMMR0Ex   - %d iterations in %llu ns / %llu ticks. %llu ns / %#llu ticks per iteration. Min %llu ticks.\n",
    192192                                 i, NanoSecs, Ticks, NanoSecs / i, Ticks / i, MinTicks);
    193193                    }
     
    195195                else
    196196                {
    197                     RTPrintf("tstInt: SUPSetVMForFastIOCtl failed: %Rrc\n", rc);
     197                    RTPrintf("tstInt: SUPR3SetVMForFastIOCtl failed: %Rrc\n", rc);
    198198                    rcRet++;
    199199                }
     
    201201            else
    202202            {
    203                 RTPrintf("tstInt: SUPContAlloc2(%#zx,,) failed\n", sizeof(*pVM));
     203                RTPrintf("tstInt: SUPR3ContAlloc(%#zx,,) failed\n", sizeof(*pVM));
    204204                rcRet++;
    205205            }
     
    208208             * Unload VMM.
    209209             */
    210             rc = SUPUnloadVMM();
     210            rc = SUPR3UnloadVMM();
    211211            if (rc)
    212212            {
    213                 RTPrintf("tstInt: SUPUnloadVMM failed with rc=%Rrc\n", rc);
     213                RTPrintf("tstInt: SUPR3UnloadVMM failed with rc=%Rrc\n", rc);
    214214                rcRet++;
    215215            }
     
    217217        else
    218218        {
    219             RTPrintf("tstInt: SUPLoadVMM failed with rc=%Rrc\n", rc);
     219            RTPrintf("tstInt: SUPR3LoadVMM failed with rc=%Rrc\n", rc);
    220220            rcRet++;
    221221        }
     
    224224         * Terminate.
    225225         */
    226         rc = SUPTerm();
     226        rc = SUPR3Term(false /*fForced*/);
    227227        rcRet += rc != 0;
    228         RTPrintf("tstInt: SUPTerm -> rc=%Rrc\n", rc);
     228        RTPrintf("tstInt: SUPR3Term -> rc=%Rrc\n", rc);
    229229    }
    230230
  • trunk/src/VBox/HostDrivers/Support/testcase/tstLow.cpp

    r14831 r20864  
    5959        void *pvPages0 = (void *)0x77777777;
    6060        memset(&aPages0[0], 0x8f, sizeof(aPages0));
    61         rc = SUPLowAlloc(RT_ELEMENTS(aPages0), &pvPages0, NULL, aPages0);
     61        rc = SUPR3LowAlloc(RT_ELEMENTS(aPages0), &pvPages0, NULL, aPages0);
    6262        if (RT_SUCCESS(rc))
    6363        {
     
    9191                        }
    9292            }
    93             SUPLowFree(pvPages0, RT_ELEMENTS(aPages0));
     93            SUPR3LowFree(pvPages0, RT_ELEMENTS(aPages0));
    9494        }
    9595        else
    9696        {
    97             RTPrintf("SUPLowAlloc(%d,,) failed -> rc=%Rrc\n", RT_ELEMENTS(aPages0), rc);
     97            RTPrintf("SUPR3LowAlloc(%d,,) failed -> rc=%Rrc\n", RT_ELEMENTS(aPages0), rc);
    9898            rcRet++;
    9999        }
     
    107107            void *pvPages1 = (void *)0x77777777;
    108108            memset(&aPages1[0], 0x8f, sizeof(aPages1));
    109             rc = SUPLowAlloc(cPages, &pvPages1, NULL, aPages1);
     109            rc = SUPR3LowAlloc(cPages, &pvPages1, NULL, aPages1);
    110110            if (RT_SUCCESS(rc))
    111111            {
     
    139139                            }
    140140                }
    141                 SUPLowFree(pvPages1, cPages);
     141                SUPR3LowFree(pvPages1, cPages);
    142142            }
    143143            else
    144144            {
    145                 RTPrintf("SUPLowAlloc(%d,,) failed -> rc=%Rrc\n", cPages, rc);
     145                RTPrintf("SUPR3LowAlloc(%d,,) failed -> rc=%Rrc\n", cPages, rc);
    146146                rcRet++;
    147147            }
  • trunk/src/VBox/HostDrivers/Support/testcase/tstPage.cpp

    r14831 r20864  
     1/* $Id$ */
    12/** @file
    2  *
    3  * VBox host drivers - Ring-0 support drivers - Testcases:
    4  * Test the page allocation interface
     3 * SUP Testcase - Page allocation interface (ring 3).
    54 */
    65
    76/*
    8  * Copyright (C) 2006-2007 Sun Microsystems, Inc.
     7 * Copyright (C) 2006-2009 Sun Microsystems, Inc.
    98 *
    109 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    5150    {
    5251        void *pv;
    53         rc = SUPPageAlloc(1, &pv);
     52        rc = SUPR3PageAlloc(1, &pv);
    5453        cErrors += rc != 0;
    5554        if (!rc)
    5655        {
    5756            memset(pv, 0xff, PAGE_SIZE);
    58             rc = SUPPageFree(pv, 1);
     57            rc = SUPR3PageFree(pv, 1);
    5958            cErrors += rc != 0;
    6059            if (rc)
    61                 RTPrintf("tstPage: SUPPageFree() failed rc=%d\n", rc);
     60                RTPrintf("tstPage: SUPR3PageFree() failed rc=%d\n", rc);
    6261        }
    6362        else
    64             RTPrintf("tstPage: SUPPageAlloc(1,) failed rc=%d\n", rc);
     63            RTPrintf("tstPage: SUPR3PageAlloc(1,) failed rc=%d\n", rc);
    6564
    6665        /*
    6766         * Big chunk.
    6867         */
    69         rc = SUPPageAlloc(1023, &pv);
     68        rc = SUPR3PageAlloc(1023, &pv);
    7069        cErrors += rc != 0;
    7170        if (!rc)
    7271        {
    7372            memset(pv, 0xfe, 1023 << PAGE_SHIFT);
    74             rc = SUPPageFree(pv, 1023);
     73            rc = SUPR3PageFree(pv, 1023);
    7574            cErrors += rc != 0;
    7675            if (rc)
    77                 RTPrintf("tstPage: SUPPageFree() failed rc=%d\n", rc);
     76                RTPrintf("tstPage: SUPR3PageFree() failed rc=%d\n", rc);
    7877        }
    7978        else
    80             RTPrintf("tstPage: SUPPageAlloc(1,) failed rc=%d\n", rc);
     79            RTPrintf("tstPage: SUPR3PageAlloc(1,) failed rc=%d\n", rc);
    8180
    8281
    83         //rc = SUPTerm();
     82        //rc = SUPR3Term();
    8483        cErrors += rc != 0;
    8584        if (rc)
    86             RTPrintf("tstPage: SUPTerm failed rc=%d\n", rc);
     85            RTPrintf("tstPage: SUPR3Term failed rc=%d\n", rc);
    8786    }
    8887    else
  • trunk/src/VBox/HostDrivers/Support/testcase/tstPin.cpp

    r20862 r20864  
    6161         */
    6262        void *pv;
    63         int rc = SUPPageAlloc(1, &pv);
     63        int rc = SUPR3PageAlloc(1, &pv);
    6464        AssertRC(rc);
    6565        RTPrintf("pv=%p\n", pv);
     
    8888        {
    8989            aPinnings[i].pv = NULL;
    90             SUPPageAlloc(0x10000 >> PAGE_SHIFT, &aPinnings[i].pv);
     90            SUPR3PageAlloc(0x10000 >> PAGE_SHIFT, &aPinnings[i].pv);
    9191            aPinnings[i].pvAligned = RT_ALIGN_P(aPinnings[i].pv, PAGE_SIZE);
    9292            rc = supR3PageLock(aPinnings[i].pvAligned, 0xf000 >> PAGE_SHIFT, &aPinnings[i].aPages[0]);
     
    108108                RTPrintf("SUPPageLock -> rc=%d\n", rc);
    109109                rcRet++;
    110                 SUPPageFree(aPinnings[i].pv, 0x10000 >> PAGE_SHIFT);
     110                SUPR3PageFree(aPinnings[i].pv, 0x10000 >> PAGE_SHIFT);
    111111                aPinnings[i].pv = aPinnings[i].pvAligned = NULL;
    112112                break;
     
    133133            {
    134134                memset(aPinnings[i].pv, 0xcc, 0x10000);
    135                 SUPPageFree(aPinnings[i].pv, 0x10000 >> PAGE_SHIFT);
     135                SUPR3PageFree(aPinnings[i].pv, 0x10000 >> PAGE_SHIFT);
    136136                aPinnings[i].pv = NULL;
    137137            }
     
    142142         * Allocate a bit of contiguous memory.
    143143         */
    144         pv = SUPContAlloc(RT_ALIGN_Z(15003, PAGE_SIZE) >> PAGE_SHIFT, &HCPhys);
     144        pv = SUPR3ContAlloc(RT_ALIGN_Z(15003, PAGE_SIZE) >> PAGE_SHIFT, NIL_RTR0PTR, &HCPhys);
    145145        rcRet += pv == NULL || HCPhys == 0;
    146146        if (pv && HCPhys)
    147147        {
    148             RTPrintf("SUPContAlloc(15003) -> HCPhys=%llx pv=%p\n", HCPhys, pv);
     148            RTPrintf("SUPR3ContAlloc(15003) -> HCPhys=%llx pv=%p\n", HCPhys, pv);
    149149            void *pv0 = pv;
    150150            memset(pv0, 0xaf, 15003);
    151             pv = SUPContAlloc(RT_ALIGN_Z(12999, PAGE_SIZE) >> PAGE_SHIFT, &HCPhys);
     151            pv = SUPR3ContAlloc(RT_ALIGN_Z(12999, PAGE_SIZE) >> PAGE_SHIFT, NIL_RTR0PTR, &HCPhys);
    152152            rcRet += pv == NULL || HCPhys == 0;
    153153            if (pv && HCPhys)
    154154            {
    155                 RTPrintf("SUPContAlloc(12999) -> HCPhys=%llx pv=%p\n", HCPhys, pv);
     155                RTPrintf("SUPR3ContAlloc(12999) -> HCPhys=%llx pv=%p\n", HCPhys, pv);
    156156                memset(pv, 0xbf, 12999);
    157                 rc = SUPContFree(pv, RT_ALIGN_Z(12999, PAGE_SIZE) >> PAGE_SHIFT);
     157                rc = SUPR3ContFree(pv, RT_ALIGN_Z(12999, PAGE_SIZE) >> PAGE_SHIFT);
    158158                rcRet += rc != 0;
    159159                if (rc)
    160                     RTPrintf("SUPContFree failed! rc=%d\n", rc);
     160                    RTPrintf("SUPR3ContFree failed! rc=%d\n", rc);
    161161            }
    162162            else
    163                 RTPrintf("SUPContAlloc (2nd) failed!\n");
     163                RTPrintf("SUPR3ContAlloc (2nd) failed!\n");
    164164            memset(pv0, 0xaf, 15003);
    165165            /* pv0 is intentionally not freed! */
    166166        }
    167167        else
    168             RTPrintf("SUPContAlloc failed!\n");
     168            RTPrintf("SUPR3ContAlloc failed!\n");
    169169
    170170        /*
     
    174174        #define BIG_SIZEPP  (BIG_SIZE + PAGE_SIZE)
    175175        pv = NULL;
    176         SUPPageAlloc(BIG_SIZEPP >> PAGE_SHIFT, &pv);
     176        SUPR3PageAlloc(BIG_SIZEPP >> PAGE_SHIFT, &pv);
    177177        if (pv)
    178178        {
     
    204204                rcRet++;
    205205            }
    206             SUPPageFree(pv, BIG_SIZEPP >> PAGE_SHIFT);
    207         }
    208 
    209         rc = SUPTerm();
    210         RTPrintf("SUPTerm -> rc=%d\n", rc);
     206            SUPR3PageFree(pv, BIG_SIZEPP >> PAGE_SHIFT);
     207        }
     208
     209        rc = SUPR3Term(false /*fForced*/);
     210        RTPrintf("SUPR3Term -> rc=%d\n", rc);
    211211        rcRet += rc != 0;
    212212    }
  • trunk/src/VBox/NetworkServices/DHCP/VBoxNetDHCP.cpp

    r20354 r20864  
    577577        CloseReq.hIf = m_hIf;
    578578        m_hIf = INTNET_HANDLE_INVALID;
    579         int rc = SUPCallVMMR0Ex(NIL_RTR0PTR, NIL_VMCPUID, VMMR0_DO_INTNET_IF_CLOSE, 0, &CloseReq.Hdr);
     579        int rc = SUPR3CallVMMR0Ex(NIL_RTR0PTR, NIL_VMCPUID, VMMR0_DO_INTNET_IF_CLOSE, 0, &CloseReq.Hdr);
    580580        AssertRC(rc);
    581581    }
     
    583583    if (m_pSession)
    584584    {
    585         SUPTerm(false /* not forced */);
     585        SUPR3Term(false /*fForced*/);
    586586        m_pSession = NIL_RTR0PTR;
    587587    }
     
    879879    }
    880880
    881     rc = SUPLoadVMM(strcat(szPath, "/VMMR0.r0"));
     881    rc = SUPR3LoadVMM(strcat(szPath, "/VMMR0.r0"));
    882882    if (RT_FAILURE(rc))
    883883    {
    884         RTStrmPrintf(g_pStdErr, "VBoxNetDHCP: SUPLoadVMM(\"%s\") -> %Rrc", szPath, rc);
     884        RTStrmPrintf(g_pStdErr, "VBoxNetDHCP: SUPR3LoadVMM(\"%s\") -> %Rrc", szPath, rc);
    885885        return 1;
    886886    }
     
    907907     */
    908908    debugPrint(2, false, "attempting to open/create network \"%s\"...", OpenReq.szNetwork);
    909     rc = SUPCallVMMR0Ex(NIL_RTR0PTR, NIL_VMCPUID, VMMR0_DO_INTNET_OPEN, 0, &OpenReq.Hdr);
     909    rc = SUPR3CallVMMR0Ex(NIL_RTR0PTR, NIL_VMCPUID, VMMR0_DO_INTNET_OPEN, 0, &OpenReq.Hdr);
    910910    if (RT_SUCCESS(rc))
    911911    {
     
    922922        GetRing3BufferReq.hIf = m_hIf;
    923923        GetRing3BufferReq.pRing3Buf = NULL;
    924         rc = SUPCallVMMR0Ex(NIL_RTR0PTR, NIL_VMCPUID, VMMR0_DO_INTNET_IF_GET_RING3_BUFFER, 0, &GetRing3BufferReq.Hdr);
     924        rc = SUPR3CallVMMR0Ex(NIL_RTR0PTR, NIL_VMCPUID, VMMR0_DO_INTNET_IF_GET_RING3_BUFFER, 0, &GetRing3BufferReq.Hdr);
    925925        if (RT_SUCCESS(rc))
    926926        {
     
    939939            ActiveReq.hIf = m_hIf;
    940940            ActiveReq.fActive = true;
    941             rc = SUPCallVMMR0Ex(NIL_RTR0PTR, NIL_VMCPUID, VMMR0_DO_INTNET_IF_SET_ACTIVE, 0, &ActiveReq.Hdr);
     941            rc = SUPR3CallVMMR0Ex(NIL_RTR0PTR, NIL_VMCPUID, VMMR0_DO_INTNET_IF_SET_ACTIVE, 0, &ActiveReq.Hdr);
    942942            if (RT_SUCCESS(rc))
    943943                return 0;
    944944
    945945            /* bail out */
    946             RTStrmPrintf(g_pStdErr, "VBoxNetDHCP: SUPCallVMMR0Ex(,VMMR0_DO_INTNET_IF_SET_PROMISCUOUS_MODE,) failed, rc=%Rrc\n", rc);
     946            RTStrmPrintf(g_pStdErr, "VBoxNetDHCP: SUPR3CallVMMR0Ex(,VMMR0_DO_INTNET_IF_SET_PROMISCUOUS_MODE,) failed, rc=%Rrc\n", rc);
    947947        }
    948948        else
    949             RTStrmPrintf(g_pStdErr, "VBoxNetDHCP: SUPCallVMMR0Ex(,VMMR0_DO_INTNET_IF_GET_RING3_BUFFER,) failed, rc=%Rrc\n", rc);
     949            RTStrmPrintf(g_pStdErr, "VBoxNetDHCP: SUPR3CallVMMR0Ex(,VMMR0_DO_INTNET_IF_GET_RING3_BUFFER,) failed, rc=%Rrc\n", rc);
    950950    }
    951951    else
    952         RTStrmPrintf(g_pStdErr, "VBoxNetDHCP: SUPCallVMMR0Ex(,VMMR0_DO_INTNET_OPEN,) failed, rc=%Rrc\n", rc);
     952        RTStrmPrintf(g_pStdErr, "VBoxNetDHCP: SUPR3CallVMMR0Ex(,VMMR0_DO_INTNET_OPEN,) failed, rc=%Rrc\n", rc);
    953953
    954954    return RT_SUCCESS(rc) ? 0 : 1;
     
    979979        WaitReq.hIf = m_hIf;
    980980        WaitReq.cMillies = 2000; /* 2 secs - the sleep is for some reason uninterruptible... */  /** @todo fix interruptability in SrvIntNet! */
    981         int rc = SUPCallVMMR0Ex(NIL_RTR0PTR, NIL_VMCPUID, VMMR0_DO_INTNET_IF_WAIT, 0, &WaitReq.Hdr);
     981        int rc = SUPR3CallVMMR0Ex(NIL_RTR0PTR, NIL_VMCPUID, VMMR0_DO_INTNET_IF_WAIT, 0, &WaitReq.Hdr);
    982982        if (RT_FAILURE(rc))
    983983        {
  • trunk/src/VBox/NetworkServices/NetLib/VBoxNetInt.cpp

    r19454 r20864  
    2121    SendReq.pSession     = pSession;
    2222    SendReq.hIf          = hIf;
    23     return SUPCallVMMR0Ex(NIL_RTR0PTR, NIL_VMCPUID, VMMR0_DO_INTNET_IF_SEND, 0, &SendReq.Hdr);
     23    return SUPR3CallVMMR0Ex(NIL_RTR0PTR, NIL_VMCPUID, VMMR0_DO_INTNET_IF_SEND, 0, &SendReq.Hdr);
    2424}
    2525
  • trunk/src/VBox/NetworkServices/NetLib/VBoxNetIntIf.cpp

    r19454 r20864  
    4949    SendReq.pSession     = pSession;
    5050    SendReq.hIf          = hIf;
    51     return SUPCallVMMR0Ex(NIL_RTR0PTR, NIL_VMCPUID, VMMR0_DO_INTNET_IF_SEND, 0, &SendReq.Hdr);
     51    return SUPR3CallVMMR0Ex(NIL_RTR0PTR, NIL_VMCPUID, VMMR0_DO_INTNET_IF_SEND, 0, &SendReq.Hdr);
    5252}
    5353
  • trunk/src/VBox/VMM/GMM.cpp

    r18204 r20864  
    128128         */
    129129        void *pvChunk;
    130         rc = SUPPageAlloc(GMM_CHUNK_SIZE >> PAGE_SHIFT, &pvChunk);
     130        rc = SUPR3PageAlloc(GMM_CHUNK_SIZE >> PAGE_SHIFT, &pvChunk);
    131131        if (RT_FAILURE(rc))
    132132            return VMSetError(pVM, rc, RT_SRC_POS,
    133                               N_("Out of memory (SUPPageAlloc) seeding a %u pages allocation request"),
     133                              N_("Out of memory (SUPR3PageAlloc) seeding a %u pages allocation request"),
    134134                              pReq->cPages);
    135135
  • trunk/src/VBox/VMM/HWACCM.cpp

    r20838 r20864  
    629629
    630630    /* Enable VT-x or AMD-V on all host CPUs. */
    631     rc = SUPCallVMMR0Ex(pVM->pVMR0, 0 /* VCPU 0 */, VMMR0_DO_HWACC_ENABLE, 0, NULL);
     631    rc = SUPR3CallVMMR0Ex(pVM->pVMR0, 0 /*idCpu*/, VMMR0_DO_HWACC_ENABLE, 0, NULL);
    632632    if (RT_FAILURE(rc))
    633633    {
    634         LogRel(("HWACCMR3InitFinalize: SUPCallVMMR0Ex VMMR0_DO_HWACC_ENABLE failed with %Rrc\n", rc));
     634        LogRel(("HWACCMR3InitFinalize: SUPR3CallVMMR0Ex VMMR0_DO_HWACC_ENABLE failed with %Rrc\n", rc));
    635635        return rc;
    636636    }
     
    10001000            }
    10011001
    1002             rc = SUPCallVMMR0Ex(pVM->pVMR0, 0 /* VCPU 0 */, VMMR0_DO_HWACC_SETUP_VM, 0, NULL);
     1002            rc = SUPR3CallVMMR0Ex(pVM->pVMR0, 0 /*idCpu*/, VMMR0_DO_HWACC_SETUP_VM, 0, NULL);
    10031003            AssertRC(rc);
    10041004            if (rc == VINF_SUCCESS)
     
    11081108                pVM->hwaccm.s.fNestedPaging = pVM->hwaccm.s.fAllowNestedPaging;
    11091109
    1110             rc = SUPCallVMMR0Ex(pVM->pVMR0, 0 /* VCPU 0 */, VMMR0_DO_HWACC_SETUP_VM, 0, NULL);
     1110            rc = SUPR3CallVMMR0Ex(pVM->pVMR0, 0 /*idCpu*/, VMMR0_DO_HWACC_SETUP_VM, 0, NULL);
    11111111            AssertRC(rc);
    11121112            if (rc == VINF_SUCCESS)
  • trunk/src/VBox/VMM/MMInternal.h

    r20774 r20864  
    526526#endif
    527527    /** Flag indicating the allocation method.
    528      * Set: SUPLowAlloc().
    529      * Clear: SUPPageAlloc() + SUPPageLock(). */
     528     * Set: SUPR3LowAlloc().
     529     * Clear: SUPR3PageAllocLockedEx(). */
    530530    bool                                fLow;
    531531    /** Number of subpools. */
  • trunk/src/VBox/VMM/MMPagePool.cpp

    r20680 r20864  
    6868     *        ring-0. Need to change the wasy we allocate it... */
    6969    AssertReleaseReturn(sizeof(*pVM->mm.s.pPagePoolR3) + sizeof(*pVM->mm.s.pPagePoolLowR3) < PAGE_SIZE, VERR_INTERNAL_ERROR);
    70     int rc = SUPPageAllocLockedEx(1, (void **)&pVM->mm.s.pPagePoolR3, NULL);
     70    int rc = SUPR3PageAllocLockedEx(1, (void **)&pVM->mm.s.pPagePoolR3, NULL);
    7171    if (RT_FAILURE(rc))
    7272        return rc;
     
    123123        {
    124124            int rc = SUPR3PageFreeEx(pSubPool->pvPages, pSubPool->cPages);
    125             AssertMsgRC(rc, ("SUPPageFree(%p) failed with rc=%Rrc\n", pSubPool->pvPages, rc));
     125            AssertMsgRC(rc, ("SUPR3PageFreeEx(%p) failed with rc=%Rrc\n", pSubPool->pvPages, rc));
    126126            pSubPool->pvPages = NULL;
    127127
     
    144144        while (pSubPool)
    145145        {
    146             int rc = SUPLowFree(pSubPool->pvPages, pSubPool->cPages);
    147             AssertMsgRC(rc, ("SUPPageFree(%p) failed with rc=%d\n", pSubPool->pvPages, rc));
     146            int rc = SUPR3LowFree(pSubPool->pvPages, pSubPool->cPages);
     147            AssertMsgRC(rc, ("SUPR3LowFree(%p) failed with rc=%d\n", pSubPool->pvPages, rc));
    148148            pSubPool->pvPages = NULL;
    149149
     
    258258    }
    259259    else
    260         rc = SUPLowAlloc(cPages, &pSub->pvPages, NULL, paPhysPages);
     260        rc = SUPR3LowAlloc(cPages, &pSub->pvPages, NULL, paPhysPages);
    261261    if (RT_SUCCESS(rc))
    262262    {
  • trunk/src/VBox/VMM/PDMDriver.cpp

    r20706 r20864  
    961961    if (    uOperation >= VMMR0_DO_SRV_START
    962962        &&  uOperation <  VMMR0_DO_SRV_END)
    963         rc = SUPCallVMMR0Ex(pDrvIns->Internal.s.pVM->pVMR0, NIL_VMCPUID, uOperation, 0, (PSUPVMMR0REQHDR)pvArg);
     963        rc = SUPR3CallVMMR0Ex(pDrvIns->Internal.s.pVM->pVMR0, NIL_VMCPUID, uOperation, 0, (PSUPVMMR0REQHDR)pvArg);
    964964    else
    965965    {
  • trunk/src/VBox/VMM/PDMLdr.cpp

    r19924 r20864  
    142142            {
    143143                Assert(pModule->ImageBase);
    144                 int rc2 = SUPFreeModule((void *)(uintptr_t)pModule->ImageBase);
     144                int rc2 = SUPR3FreeModule((void *)(uintptr_t)pModule->ImageBase);
    145145                AssertRC(rc2);
    146146                pModule->ImageBase = 0;
     
    518518                }
    519519                else
    520                     AssertMsgFailed(("SUPPageAlloc(%d,) -> %Rrc\n", cPages, rc));
     520                    AssertMsgFailed(("SUPR3PageAlloc(%d,) -> %Rrc\n", cPages, rc));
    521521                RTMemTmpFree(paPages);
    522522            }
     
    590590     */
    591591    void *pvImageBase;
    592     int rc = SUPLoadModule(pszFilename, pszName, &pvImageBase);
     592    int rc = SUPR3LoadModule(pszFilename, pszName, &pvImageBase);
    593593    if (RT_SUCCESS(rc))
    594594    {
     
    706706            &&  !strcmp(pModule->szName, pszModule))
    707707        {
    708             int rc = SUPGetSymbolR0((void *)(uintptr_t)pModule->ImageBase, pszSymbol, (void **)ppvValue);
     708            int rc = SUPR3GetSymbolR0((void *)(uintptr_t)pModule->ImageBase, pszSymbol, (void **)ppvValue);
    709709            if (RT_FAILURE(rc))
    710710            {
  • trunk/src/VBox/VMM/PGM.cpp

    r20808 r20864  
    552552 * will return to the ring-3 caller (and later ring-0) and asking it to seed
    553553 * the page allocator with some fresh pages (VERR_GMM_SEED_ME). Ring-3 will
    554  * then perform an SUPPageAlloc(cbChunk >> PAGE_SHIFT) call and make a
     554 * then perform an SUPR3PageAlloc(cbChunk >> PAGE_SHIFT) call and make a
    555555 * "SeededAllocPages" call to ring-0.
    556556 *
     
    15031503     * and the guest running in real mode.
    15041504     */
    1505     pVM->pgm.s.enmHostMode = SUPGetPagingMode();
     1505    pVM->pgm.s.enmHostMode = SUPR3GetPagingMode();
    15061506    switch (pVM->pgm.s.enmHostMode)
    15071507    {
  • trunk/src/VBox/VMM/PGMPhys.cpp

    r20730 r20864  
    30543054    {
    30553055        void *pvChunk;
    3056         rcAlloc = rc = SUPPageAlloc(GMM_CHUNK_SIZE >> PAGE_SHIFT, &pvChunk);
     3056        rcAlloc = rc = SUPR3PageAlloc(GMM_CHUNK_SIZE >> PAGE_SHIFT, &pvChunk);
    30573057        if (RT_SUCCESS(rc))
    30583058        {
    30593059            rcSeed = rc = VMMR3CallR0(pVM, VMMR0_DO_GMM_SEED_CHUNK, (uintptr_t)pvChunk, NULL);
    30603060            if (RT_FAILURE(rc))
    3061                 SUPPageFree(pvChunk, GMM_CHUNK_SIZE >> PAGE_SHIFT);
     3061                SUPR3PageFree(pvChunk, GMM_CHUNK_SIZE >> PAGE_SHIFT);
    30623062        }
    30633063        if (RT_SUCCESS(rc))
  • trunk/src/VBox/VMM/STAM.cpp

    r20681 r20864  
    759759        GVMMReq.Hdr.u32Magic = SUPVMMR0REQHDR_MAGIC;
    760760        GVMMReq.pSession = pVM->pSession;
    761         rc = SUPCallVMMR0Ex(pVM->pVMR0, NIL_VMCPUID, VMMR0_DO_GVMM_RESET_STATISTICS, 0, &GVMMReq.Hdr);
     761        rc = SUPR3CallVMMR0Ex(pVM->pVMR0, NIL_VMCPUID, VMMR0_DO_GVMM_RESET_STATISTICS, 0, &GVMMReq.Hdr);
    762762    }
    763763
     
    768768//        GMMReq.Hdr.u32Magic = SUPVMMR0REQHDR_MAGIC;
    769769//        GMMReq.pSession = pVM->pSession;
    770 //        rc = SUPCallVMMR0Ex(pVM->pVMR0, VMMR0_DO_GMM_RESET_STATISTICS, 0, &Req.Hdr);
     770//        rc = SUPR3CallVMMR0Ex(pVM->pVMR0, VMMR0_DO_GMM_RESET_STATISTICS, 0, &Req.Hdr);
    771771//    }
    772772
     
    17711771        Req.Hdr.u32Magic = SUPVMMR0REQHDR_MAGIC;
    17721772        Req.pSession = pVM->pSession;
    1773         int rc = SUPCallVMMR0Ex(pVM->pVMR0, NIL_VMCPUID, VMMR0_DO_GVMM_QUERY_STATISTICS, 0, &Req.Hdr);
     1773        int rc = SUPR3CallVMMR0Ex(pVM->pVMR0, NIL_VMCPUID, VMMR0_DO_GVMM_QUERY_STATISTICS, 0, &Req.Hdr);
    17741774        if (RT_SUCCESS(rc))
    17751775            pUVM->stam.s.GVMMStats = Req.Stats;
  • trunk/src/VBox/VMM/TM.cpp

    r20784 r20864  
    220220    AssertMsgReturn(pVM->tm.s.pvGIPR3, ("GIP support is now required!\n"), VERR_INTERNAL_ERROR);
    221221    RTHCPHYS HCPhysGIP;
    222     rc = SUPGipGetPhys(&HCPhysGIP);
     222    rc = SUPR3GipGetPhys(&HCPhysGIP);
    223223    AssertMsgRCReturn(rc, ("Failed to get GIP physical address!\n"), rc);
    224224
  • trunk/src/VBox/VMM/VM.cpp

    r20854 r20864  
    528528    CreateVMReq.pVMR3           = NULL;
    529529    CreateVMReq.cCpus           = cCpus;
    530     rc = SUPCallVMMR0Ex(NIL_RTR0PTR, NIL_VMCPUID, VMMR0_DO_GVMM_CREATE_VM, 0, &CreateVMReq.Hdr);
     530    rc = SUPR3CallVMMR0Ex(NIL_RTR0PTR, NIL_VMCPUID, VMMR0_DO_GVMM_CREATE_VM, 0, &CreateVMReq.Hdr);
    531531    if (RT_SUCCESS(rc))
    532532    {
     
    698698        }
    699699
    700         int rc2 = SUPCallVMMR0Ex(CreateVMReq.pVMR0, 0 /* VCPU 0 */, VMMR0_DO_GVMM_DESTROY_VM, 0, NULL);
     700        int rc2 = SUPR3CallVMMR0Ex(CreateVMReq.pVMR0, 0 /*idCpu*/, VMMR0_DO_GVMM_DESTROY_VM, 0, NULL);
    701701        AssertRC(rc2);
    702702    }
     
    719719{
    720720    Assert(VMMGetCpuId(pVM) == idCpu);
    721     int rc = SUPCallVMMR0Ex(pVM->pVMR0, idCpu, VMMR0_DO_GVMM_REGISTER_VMCPU, 0, NULL);
     721    int rc = SUPR3CallVMMR0Ex(pVM->pVMR0, idCpu, VMMR0_DO_GVMM_REGISTER_VMCPU, 0, NULL);
    722722    if (RT_FAILURE(rc))
    723723        LogRel(("idCpu=%u rc=%Rrc\n", idCpu, rc));
     
    19111911         * Tell GVMM to destroy the VM and free its resources.
    19121912         */
    1913         int rc = SUPCallVMMR0Ex(pUVM->pVM->pVMR0, 0 /* VCPU 0 */, VMMR0_DO_GVMM_DESTROY_VM, 0, NULL);
     1913        int rc = SUPR3CallVMMR0Ex(pUVM->pVM->pVMR0, 0 /*idCpu*/, VMMR0_DO_GVMM_DESTROY_VM, 0, NULL);
    19141914        AssertRC(rc);
    19151915        pUVM->pVM = NULL;
     
    20572057    if (pUVM->vm.s.pSession)
    20582058    {
    2059         int rc = SUPTerm();
     2059        int rc = SUPR3Term(false /*fForced*/);
    20602060        AssertRC(rc);
    20612061        pUVM->vm.s.pSession = NIL_RTR0PTR;
  • trunk/src/VBox/VMM/VMEmt.cpp

    r20856 r20864  
    652652            //RTLogRelPrintf("u64NanoTS=%RI64 cLoops=%3d sleep %02dms (%7RU64) ", u64NanoTS, cLoops, cMilliSecs, u64NanoTS);
    653653            STAM_REL_PROFILE_START(&pUVCpu->vm.s.StatHaltBlock, c);
    654             rc = SUPCallVMMR0Ex(pVM->pVMR0, pVCpu->idCpu, VMMR0_DO_GVMM_SCHED_HALT, u64GipTime, NULL);
     654            rc = SUPR3CallVMMR0Ex(pVM->pVMR0, pVCpu->idCpu, VMMR0_DO_GVMM_SCHED_HALT, u64GipTime, NULL);
    655655            STAM_REL_PROFILE_STOP(&pUVCpu->vm.s.StatHaltBlock, c);
    656656            if (rc == VERR_INTERRUPTED)
     
    672672        {
    673673            STAM_REL_PROFILE_START(&pUVCpu->vm.s.StatHaltYield, d);
    674             rc = SUPCallVMMR0Ex(pVM->pVMR0, pVCpu->idCpu, VMMR0_DO_GVMM_SCHED_POLL, false /* don't yield */, NULL);
     674            rc = SUPR3CallVMMR0Ex(pVM->pVMR0, pVCpu->idCpu, VMMR0_DO_GVMM_SCHED_POLL, false /* don't yield */, NULL);
    675675            STAM_REL_PROFILE_STOP(&pUVCpu->vm.s.StatHaltYield, d);
    676676        }
     
    711711         * anything needs our attention.
    712712         */
    713         rc = SUPCallVMMR0Ex(pVM->pVMR0, pVCpu->idCpu, VMMR0_DO_GVMM_SCHED_HALT, RTTimeNanoTS() + 1000000000 /* +1s */, NULL);
     713        rc = SUPR3CallVMMR0Ex(pVM->pVMR0, pVCpu->idCpu, VMMR0_DO_GVMM_SCHED_HALT, RTTimeNanoTS() + 1000000000 /* +1s */, NULL);
    714714        if (rc == VERR_INTERRUPTED)
    715715            rc = VINF_SUCCESS;
     
    740740    if (pUVCpu->vm.s.fWait)
    741741    {
    742         int rc = SUPCallVMMR0Ex(pUVCpu->pVM->pVMR0, pUVCpu->idCpu, VMMR0_DO_GVMM_SCHED_WAKE_UP, 0, NULL);
     742        int rc = SUPR3CallVMMR0Ex(pUVCpu->pVM->pVMR0, pUVCpu->idCpu, VMMR0_DO_GVMM_SCHED_WAKE_UP, 0, NULL);
    743743        AssertRC(rc);
    744744    }
     
    752752            if (fFlags & VMNOTIFYFF_FLAGS_POKE)
    753753            {
    754                 int rc = SUPCallVMMR0Ex(pUVCpu->pVM->pVMR0, pUVCpu->idCpu, VMMR0_DO_GVMM_SCHED_POKE, 0, NULL);
     754                int rc = SUPR3CallVMMR0Ex(pUVCpu->pVM->pVMR0, pUVCpu->idCpu, VMMR0_DO_GVMM_SCHED_POKE, 0, NULL);
    755755                AssertRC(rc);
    756756            }
  • trunk/src/VBox/VMM/VMM.cpp

    r20857 r20864  
    177177     * Register the Ring-0 VM handle with the session for fast ioctl calls.
    178178     */
    179     rc = SUPSetVMForFastIOCtl(pVM->pVMR0);
     179    rc = SUPR3SetVMForFastIOCtl(pVM->pVMR0);
    180180    if (RT_FAILURE(rc))
    181181        return rc;
     
    510510        rc = VINF_SUCCESS;
    511511#else
    512         rc = SUPCallVMMR0Ex(pVM->pVMR0, 0 /* VCPU 0 */, VMMR0_DO_VMMR0_INIT, VMMGetSvnRev(), NULL);
     512        rc = SUPR3CallVMMR0Ex(pVM->pVMR0, 0 /*idCpu*/, VMMR0_DO_VMMR0_INIT, VMMGetSvnRev(), NULL);
    513513#endif
    514514        /*
     
    584584            rc = VINF_SUCCESS;
    585585#else
    586             rc = SUPCallVMMR0(pVM->pVMR0, 0 /* VCPU 0 */, VMMR0_DO_CALL_HYPERVISOR, NULL);
     586            rc = SUPR3CallVMMR0(pVM->pVMR0, 0 /* VCPU 0 */, VMMR0_DO_CALL_HYPERVISOR, NULL);
    587587#endif
    588588#ifdef LOG_ENABLED
     
    637637        rc = VINF_SUCCESS;
    638638#else
    639         rc = SUPCallVMMR0Ex(pVM->pVMR0, 0 /* VCPU 0 */, VMMR0_DO_VMMR0_TERM, 0, NULL);
     639        rc = SUPR3CallVMMR0Ex(pVM->pVMR0, 0 /*idCpu*/, VMMR0_DO_VMMR0_TERM, 0, NULL);
    640640#endif
    641641        /*
     
    11461146            rc = VERR_GENERAL_FAILURE;
    11471147#else
    1148             rc = SUPCallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0);
     1148            rc = SUPR3CallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0);
    11491149            if (RT_LIKELY(rc == VINF_SUCCESS))
    11501150                rc = pVCpu->vmm.s.iLastGZRc;
     
    11971197            rc = VERR_GENERAL_FAILURE;
    11981198#else
    1199             rc = SUPCallVMMR0Fast(pVM->pVMR0, VMMR0_DO_HWACC_RUN, pVCpu->idCpu);
     1199            rc = SUPR3CallVMMR0Fast(pVM->pVMR0, VMMR0_DO_HWACC_RUN, pVCpu->idCpu);
    12001200            if (RT_LIKELY(rc == VINF_SUCCESS))
    12011201                rc = pVCpu->vmm.s.iLastGZRc;
     
    16971697            rc = VERR_GENERAL_FAILURE;
    16981698#else
    1699             rc = SUPCallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0);
     1699            rc = SUPR3CallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0);
    17001700            if (RT_LIKELY(rc == VINF_SUCCESS))
    17011701                rc = pVCpu->vmm.s.iLastGZRc;
     
    17321732
    17331733/**
    1734  * Wrapper for SUPCallVMMR0Ex which will deal with
    1735  * VINF_VMM_CALL_HOST returns.
     1734 * Wrapper for SUPR3CallVMMR0Ex which will deal with VINF_VMM_CALL_HOST returns.
    17361735 *
    17371736 * @returns VBox status code.
     
    17391738 * @param   uOperation  Operation to execute.
    17401739 * @param   u64Arg      Constant argument.
    1741  * @param   pReqHdr     Pointer to a request header. See SUPCallVMMR0Ex for
     1740 * @param   pReqHdr     Pointer to a request header. See SUPR3CallVMMR0Ex for
    17421741 *                      details.
    17431742 */
     
    17561755        rc = VERR_GENERAL_FAILURE;
    17571756#else
    1758         rc = SUPCallVMMR0Ex(pVM->pVMR0, pVCpu->idCpu, uOperation, u64Arg, pReqHdr);
     1757        rc = SUPR3CallVMMR0Ex(pVM->pVMR0, pVCpu->idCpu, uOperation, u64Arg, pReqHdr);
    17591758#endif
    17601759        /*
     
    18061805            rc = VERR_GENERAL_FAILURE;
    18071806#else
    1808             rc = SUPCallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0);
     1807            rc = SUPR3CallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0);
    18091808            if (RT_LIKELY(rc == VINF_SUCCESS))
    18101809                rc = pVCpu->vmm.s.iLastGZRc;
  • trunk/src/VBox/VMM/VMMAll/MMAllHyper.cpp

    r20774 r20864  
    311311#endif
    312312            *ppv = pv;
    313             /* ASMMemZero32(pv, cbAligned); - not required since memory is alloc-only and SUPPageAlloc zeros it. */
     313            /* ASMMemZero32(pv, cbAligned); - not required since memory is alloc-only and SUPR3PageAlloc zeros it. */
    314314            Log2(("MMHyperAlloc: cb=%#x uAlignment=%#x returns VINF_SUCCESS and *ppv=%p\n", cb, uAlignment, ppv));
    315315            return VINF_SUCCESS;
  • trunk/src/VBox/VMM/VMMSwitcher.cpp

    r20557 r20864  
    111111     */
    112112    pVM->vmm.s.cbCoreCode = RT_ALIGN_32(cbCoreCode, PAGE_SIZE);
    113     pVM->vmm.s.pvCoreCodeR3 = SUPContAlloc2(pVM->vmm.s.cbCoreCode >> PAGE_SHIFT, &pVM->vmm.s.pvCoreCodeR0, &pVM->vmm.s.HCPhysCoreCode);
     113    pVM->vmm.s.pvCoreCodeR3 = SUPR3ContAlloc(pVM->vmm.s.cbCoreCode >> PAGE_SHIFT, &pVM->vmm.s.pvCoreCodeR0, &pVM->vmm.s.HCPhysCoreCode);
    114114    int rc = VERR_NO_MEMORY;
    115115    if (pVM->vmm.s.pvCoreCodeR3)
     
    137137                pVM->vmm.s.pvCoreCodeR0 = NIL_RTR0PTR;
    138138                pVM->vmm.s.HCPhysCoreCode = NIL_RTHCPHYS;
    139                 pVM->vmm.s.pvCoreCodeR3 = SUPContAlloc2(pVM->vmm.s.cbCoreCode >> PAGE_SHIFT, &pVM->vmm.s.pvCoreCodeR0, &pVM->vmm.s.HCPhysCoreCode);
     139                pVM->vmm.s.pvCoreCodeR3 = SUPR3ContAlloc(pVM->vmm.s.cbCoreCode >> PAGE_SHIFT, &pVM->vmm.s.pvCoreCodeR0, &pVM->vmm.s.HCPhysCoreCode);
    140140                if (!pVM->vmm.s.pvCoreCodeR3)
    141141                    break;
     
    158158                LogRel(("Core code alloc attempt #%d: pvR3=%p pvR0=%p HCPhys=%RHp\n",
    159159                        i, paBadTries[i].pvR3, paBadTries[i].pvR0, paBadTries[i].HCPhys));
    160                 SUPContFree(paBadTries[i].pvR3, paBadTries[i].cb >> PAGE_SHIFT);
     160                SUPR3ContFree(paBadTries[i].pvR3, paBadTries[i].cb >> PAGE_SHIFT);
    161161            }
    162162            RTMemTmpFree(paBadTries);
     
    200200        /* shit */
    201201        AssertMsgFailed(("PGMR3Map(,%RRv, %RHp, %#x, 0) failed with rc=%Rrc\n", pVM->vmm.s.pvCoreCodeRC, pVM->vmm.s.HCPhysCoreCode, cbCoreCode, rc));
    202         SUPContFree(pVM->vmm.s.pvCoreCodeR3, pVM->vmm.s.cbCoreCode >> PAGE_SHIFT);
     202        SUPR3ContFree(pVM->vmm.s.pvCoreCodeR3, pVM->vmm.s.cbCoreCode >> PAGE_SHIFT);
    203203    }
    204204    else
  • trunk/src/VBox/VMM/VMMTests.cpp

    r19660 r20864  
    7373    CPUMSetHyperEIP(pVCpu, pVM->vmm.s.pfnCallTrampolineRC);
    7474    Assert(CPUMGetHyperCR3(pVCpu) && CPUMGetHyperCR3(pVCpu) == PGMGetHyperCR3(pVCpu));
    75     rc = SUPCallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0);
     75    rc = SUPR3CallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0);
    7676    if (RT_LIKELY(rc == VINF_SUCCESS))
    7777        rc = pVCpu->vmm.s.iLastGZRc;
     
    113113    CPUMSetHyperEIP(pVCpu, pVM->vmm.s.pfnCallTrampolineRC);
    114114    Assert(CPUMGetHyperCR3(pVCpu) && CPUMGetHyperCR3(pVCpu) == PGMGetHyperCR3(pVCpu));
    115     rc = SUPCallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0);
     115    rc = SUPR3CallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0);
    116116    if (RT_LIKELY(rc == VINF_SUCCESS))
    117117        rc = pVCpu->vmm.s.iLastGZRc;
     
    361361        do
    362362        {
    363             rc = SUPCallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0);
     363            rc = SUPR3CallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0);
    364364            if (RT_LIKELY(rc == VINF_SUCCESS))
    365365                rc = pVCpu->vmm.s.iLastGZRc;
     
    415415
    416416            uint64_t TickThisStart = ASMReadTSC();
    417             rc = SUPCallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0);
     417            rc = SUPR3CallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0);
    418418            if (RT_LIKELY(rc == VINF_SUCCESS))
    419419                rc = pVCpu->vmm.s.iLastGZRc;
     
    561561
    562562            uint64_t TickThisStart = ASMReadTSC();
    563             rc = SUPCallVMMR0Fast(pVM->pVMR0, VMMR0_DO_HWACC_RUN, 0);
     563            rc = SUPR3CallVMMR0Fast(pVM->pVMR0, VMMR0_DO_HWACC_RUN, 0);
    564564            uint64_t TickThisElapsed = ASMReadTSC() - TickThisStart;
    565565            if (RT_FAILURE(rc))
  • trunk/src/VBox/VMM/testcase/tstCFGM.cpp

    r20863 r20864  
    5151    int rc = SUPR3Init(NULL);
    5252    if (RT_SUCCESS(rc))
    53         rc = SUPPageAlloc(RT_ALIGN_Z(sizeof(*pVM), PAGE_SIZE) >> PAGE_SHIFT, (void **)&pVM);
     53        rc = SUPR3PageAlloc(RT_ALIGN_Z(sizeof(*pVM), PAGE_SIZE) >> PAGE_SHIFT, (void **)&pVM);
    5454    if (RT_FAILURE(rc))
    5555    {
  • trunk/src/VBox/VMM/testcase/tstGlobalConfig.cpp

    r19454 r20864  
    103103    }
    104104
    105     rc = SUPLoadVMM("./VMMR0.r0");
     105    rc = SUPR3LoadVMM("./VMMR0.r0");
    106106    if (RT_SUCCESS(rc))
    107107    {
    108108        Req.pSession = pSession;
    109         rc = SUPCallVMMR0Ex(NIL_RTR0PTR, NIL_VMCPUID, enmOp, 0, &Req.Hdr);
     109        rc = SUPR3CallVMMR0Ex(NIL_RTR0PTR, NIL_VMCPUID, enmOp, 0, &Req.Hdr);
    110110        if (RT_SUCCESS(rc))
    111111        {
     
    121121
    122122    }
    123     SUPTerm(false /* not forced */);
     123    SUPR3Term(false /*fForced*/);
    124124
    125125    return RT_FAILURE(rc) ? 1 : 0;
  • trunk/src/VBox/VMM/testcase/tstMMHyperHeap.cpp

    r20620 r20864  
    3838#include <iprt/string.h>
    3939
    40 /* does not work for more CPUs as SUPLowAlloc() would refuse to allocate more pages */
     40/* does not work for more CPUs as SUPR3LowAlloc() would refuse to allocate more pages */
    4141#define NUM_CPUS  16
    4242
     
    5858    int rc = SUPR3Init(NULL);
    5959    if (RT_SUCCESS(rc))
    60         rc = SUPLowAlloc(RT_ELEMENTS(aPages), (void **)&pVM, &pvR0, &aPages[0]);
     60        rc = SUPR3LowAlloc(RT_ELEMENTS(aPages), (void **)&pVM, &pvR0, &aPages[0]);
    6161    if (RT_FAILURE(rc))
    6262    {
  • trunk/src/VBox/VMM/testcase/tstSSM.cpp

    r20153 r20864  
    594594                 */
    595595                PVM pVM;
    596                 rc = SUPPageAlloc((sizeof(*pVM) + PAGE_SIZE - 1) >> PAGE_SHIFT, (void **)&pVM);
     596                rc = SUPR3PageAlloc((sizeof(*pVM) + PAGE_SIZE - 1) >> PAGE_SHIFT, (void **)&pVM);
    597597                if (RT_SUCCESS(rc))
    598598                {
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