Changeset 20864 in vbox
- Timestamp:
- Jun 23, 2009 7:19:42 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 49009
- Location:
- trunk
- Files:
-
- 39 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/pdmdrv.h
r20706 r20864 621 621 622 622 /** 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. 624 625 * 625 626 * When entering using this call the R0 components can call into the host kernel -
trunk/include/VBox/sup.h
r20862 r20864 68 68 { 69 69 /** The usual invalid entry. 70 * This is returned by SUP GetPagingMode() */70 * This is returned by SUPR3GetPagingMode() */ 71 71 SUPPAGINGMODE_INVALID = 0, 72 72 /** Normal 32-bit paging, no global pages */ … … 453 453 * @returns VBox status code. 454 454 */ 455 SUPR3DECL(int) SUP Install(void);455 SUPR3DECL(int) SUPR3Install(void); 456 456 457 457 /** … … 460 460 * @returns VBox status code. 461 461 */ 462 SUPR3DECL(int) SUP Uninstall(void);462 SUPR3DECL(int) SUPR3Uninstall(void); 463 463 464 464 /** … … 543 543 * Initializes the support library. 544 544 * Each succesful call to SUPR3Init() must be countered by a 545 * call to SUP Term(false).545 * call to SUPR3Term(false). 546 546 * 547 547 * @returns VBox status code. … … 558 558 */ 559 559 #ifdef __cplusplus 560 SUPR3DECL(int) SUP Term(bool fForced = false);560 SUPR3DECL(int) SUPR3Term(bool fForced = false); 561 561 #else 562 SUPR3DECL(int) SUP Term(int fForced);562 SUPR3DECL(int) SUPR3Term(int fForced); 563 563 #endif 564 564 … … 571 571 * VM is about to be destroyed. 572 572 */ 573 SUPR3DECL(int) SUP SetVMForFastIOCtl(PVMR0 pVMR0);573 SUPR3DECL(int) SUPR3SetVMForFastIOCtl(PVMR0 pVMR0); 574 574 575 575 /** … … 583 583 * @param pvArg Argument. 584 584 */ 585 SUPR3DECL(int) SUP CallVMMR0(PVMR0 pVMR0, VMCPUID idCpu, unsigned uOperation, void *pvArg);586 587 /** 588 * Variant of SUP CallVMMR0, except that this takes the fast ioclt path585 SUPR3DECL(int) SUPR3CallVMMR0(PVMR0 pVMR0, VMCPUID idCpu, unsigned uOperation, void *pvArg); 586 587 /** 588 * Variant of SUPR3CallVMMR0, except that this takes the fast ioclt path 589 589 * regardsless of compile-time defaults. 590 590 * … … 594 594 * @param idCpu The virtual CPU ID. 595 595 */ 596 SUPR3DECL(int) SUP CallVMMR0Fast(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 kernel601 * (i.e. use the SUPR0 and RT APIs).596 SUPR3DECL(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). 602 602 * 603 603 * See VMMR0Entry() for more details. … … 612 612 * limit on this, just below 4KB. 613 613 */ 614 SUPR3DECL(int) SUP CallVMMR0Ex(PVMR0 pVMR0, VMCPUID idCpu, unsigned uOperation, uint64_t u64Arg, PSUPVMMR0REQHDR pReqHdr);614 SUPR3DECL(int) SUPR3CallVMMR0Ex(PVMR0 pVMR0, VMCPUID idCpu, unsigned uOperation, uint64_t u64Arg, PSUPVMMR0REQHDR pReqHdr); 615 615 616 616 /** … … 672 672 * @returns The paging mode. 673 673 */ 674 SUPR3DECL(SUPPAGINGMODE) SUP GetPagingMode(void);674 SUPR3DECL(SUPPAGINGMODE) SUPR3GetPagingMode(void); 675 675 676 676 /** 677 677 * Allocate zero-filled pages. 678 678 * 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. 682 681 * 683 682 * @returns VBox status. … … 685 684 * @param ppvPages Where to store the base pointer to the allocated pages. 686 685 */ 687 SUPR3DECL(int) SUP PageAlloc(size_t cPages, void **ppvPages);688 689 /** 690 * Frees pages allocated with SUP PageAlloc().686 SUPR3DECL(int) SUPR3PageAlloc(size_t cPages, void **ppvPages); 687 688 /** 689 * Frees pages allocated with SUPR3PageAlloc(). 691 690 * 692 691 * @returns VBox status. 693 * @param pvPages Pointer returned by SUP PageAlloc().692 * @param pvPages Pointer returned by SUPR3PageAlloc(). 694 693 * @param cPages Number of pages that was allocated. 695 694 */ 696 SUPR3DECL(int) SUP PageFree(void *pvPages, size_t cPages);695 SUPR3DECL(int) SUPR3PageFree(void *pvPages, size_t cPages); 697 696 698 697 /** … … 702 701 * Use SUPR3PageFreeEx() to free memory allocated with this function. 703 702 * 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. 707 705 * 708 706 * @returns VBox status code. … … 765 763 * Allocate non-zeroed locked pages. 766 764 * 767 * Use this to allocate a number of pages rather than using RTMem*() and mess with768 * alignment. The returned address is of course page aligned. Call SUPPageFreeLocked()769 * to free the pages once done with them.770 *771 765 * @returns VBox status code. 772 766 * @param cPages Number of pages to allocate. … … 775 769 * On entry this will point to an array of with cbMemory >> PAGE_SHIFT entries. 776 770 * 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 */ 773 SUPR3DECL(int) SUPR3PageAllocLockedEx(size_t cPages, void **ppvPages, PSUPPAGE paPages); 774 775 /** 776 * Frees locked pages allocated with SUPPageAllocLockedEx(). 782 777 * 783 778 * @returns VBox status. 784 * @param pvPages Pointer returned by SUP PageAlloc().779 * @param pvPages Pointer returned by SUPR3PageAllocLockedEx(). 785 780 * @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 */ 783 SUPR3DECL(int) SUPR3PageFreeLocked(void *pvPages, size_t cPages); 801 784 802 785 /** … … 807 790 * *pHCPhys is set to the physical address of the memory. 808 791 * If ppvR0 isn't NULL, *ppvR0 is set to the ring-0 mapping. 809 * The returned memory must be freed using SUP ContFree().792 * The returned memory must be freed using SUPR3ContFree(). 810 793 * @returns NULL on failure. 811 794 * @param cPages Number of pages to allocate. … … 817 800 * the world switchers. 818 801 */ 819 SUPR3DECL(void *) SUP ContAlloc2(size_t cPages, PRTR0PTR pR0Ptr, PRTHCPHYS pHCPhys);820 821 /** 822 * Frees memory allocated with SUP ContAlloc().802 SUPR3DECL(void *) SUPR3ContAlloc(size_t cPages, PRTR0PTR pR0Ptr, PRTHCPHYS pHCPhys); 803 804 /** 805 * Frees memory allocated with SUPR3ContAlloc(). 823 806 * 824 807 * @returns VBox status code. … … 826 809 * @param cPages Number of pages to be freed. 827 810 */ 828 SUPR3DECL(int) SUP ContFree(void *pv, size_t cPages);811 SUPR3DECL(int) SUPR3ContFree(void *pv, size_t cPages); 829 812 830 813 /** … … 837 820 * @param cPages Number of pages to allocate. 838 821 * @param ppvPages Where to store the pointer to the allocated memory. 839 * The pointer stored here on success must be passed to SUPLowFree when840 * the memory should be released.822 * The pointer stored here on success must be passed to 823 * SUPR3LowFree when the memory should be released. 841 824 * @param ppvPagesR0 Where to store the ring-0 pointer to the allocated memory. optional. 842 825 * @param paPages Where to store the physical addresses of the individual pages. 843 826 */ 844 SUPR3DECL(int) SUP LowAlloc(size_t cPages, void **ppvPages, PRTR0PTR ppvPagesR0, PSUPPAGE paPages);845 846 /** 847 * Frees memory allocated with SUP LowAlloc().827 SUPR3DECL(int) SUPR3LowAlloc(size_t cPages, void **ppvPages, PRTR0PTR ppvPagesR0, PSUPPAGE paPages); 828 829 /** 830 * Frees memory allocated with SUPR3LowAlloc(). 848 831 * 849 832 * @returns VBox status code. … … 851 834 * @param cPages Number of pages that was allocated. 852 835 */ 853 SUPR3DECL(int) SUP LowFree(void *pv, size_t cPages);836 SUPR3DECL(int) SUPR3LowFree(void *pv, size_t cPages); 854 837 855 838 /** … … 864 847 * @param ppvImageBase Where to store the image address. 865 848 */ 866 SUPR3DECL(int) SUP LoadModule(const char *pszFilename, const char *pszModule, void **ppvImageBase);849 SUPR3DECL(int) SUPR3LoadModule(const char *pszFilename, const char *pszModule, void **ppvImageBase); 867 850 868 851 /** … … 889 872 * @remark This will not actually 'free' the module, there are of course usage counting. 890 873 */ 891 SUPR3DECL(int) SUP FreeModule(void *pvImageBase);874 SUPR3DECL(int) SUPR3FreeModule(void *pvImageBase); 892 875 893 876 /** … … 900 883 * @param ppvValue Where to store the symbol value. 901 884 */ 902 SUPR3DECL(int) SUP GetSymbolR0(void *pvImageBase, const char *pszSymbol, void **ppvValue);885 SUPR3DECL(int) SUPR3GetSymbolR0(void *pvImageBase, const char *pszSymbol, void **ppvValue); 903 886 904 887 /** … … 906 889 * 907 890 * @returns VBox status code. 908 * @deprecated Use SUP LoadModule(pszFilename, "VMMR0.r0", &pvImageBase)909 */ 910 SUPR3DECL(int) SUP LoadVMM(const char *pszFilename);891 * @deprecated Use SUPR3LoadModule(pszFilename, "VMMR0.r0", &pvImageBase) 892 */ 893 SUPR3DECL(int) SUPR3LoadVMM(const char *pszFilename); 911 894 912 895 /** … … 914 897 * 915 898 * @returns VBox status code. 916 * @deprecated Use SUP FreeModule().917 */ 918 SUPR3DECL(int) SUP UnloadVMM(void);899 * @deprecated Use SUPR3FreeModule(). 900 */ 901 SUPR3DECL(int) SUPR3UnloadVMM(void); 919 902 920 903 /** … … 924 907 * @param pHCPhys Where to store the physical address of the GIP. 925 908 */ 926 SUPR3DECL(int) SUP GipGetPhys(PRTHCPHYS pHCPhys);909 SUPR3DECL(int) SUPR3GipGetPhys(PRTHCPHYS pHCPhys); 927 910 928 911 /** -
trunk/src/VBox/Devices/Network/testcase/tstIntNet-1.cpp
r19924 r20864 312 312 SendReq.pSession = pSession; 313 313 SendReq.hIf = hIf; 314 rc = SUP CallVMMR0Ex(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); 315 315 if (RT_FAILURE(rc)) 316 316 { 317 RTPrintf("tstIntNet-1: SUP CallVMMR0Ex(,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); 318 318 g_cErrors++; 319 319 } … … 542 542 WaitReq.hIf = hIf; 543 543 WaitReq.cMillies = cMillies - (uint32_t)cElapsedMillies; 544 int rc = SUP CallVMMR0Ex(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); 545 545 if (rc == VERR_TIMEOUT) 546 546 break; … … 853 853 } 854 854 855 rc = SUP LoadVMM(strcat(szPath, "/../VMMR0.r0"));855 rc = SUPR3LoadVMM(strcat(szPath, "/../VMMR0.r0")); 856 856 if (RT_FAILURE(rc)) 857 857 { 858 RTPrintf("tstIntNet-1: SUP LoadVMM(\"%s\") -> %Rrc\n", szPath, rc);858 RTPrintf("tstIntNet-1: SUPR3LoadVMM(\"%s\") -> %Rrc\n", szPath, rc); 859 859 return 1; 860 860 } … … 882 882 OpenReq.szNetwork, OpenReq.szTrunk); 883 883 RTStrmFlush(g_pStdOut); 884 rc = SUP CallVMMR0Ex(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); 885 885 if (RT_SUCCESS(rc)) 886 886 { … … 898 898 GetRing3BufferReq.hIf = OpenReq.hIf; 899 899 GetRing3BufferReq.pRing3Buf = NULL; 900 rc = SUP CallVMMR0Ex(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); 901 901 if (RT_SUCCESS(rc)) 902 902 { … … 913 913 PromiscReq.hIf = OpenReq.hIf; 914 914 PromiscReq.fPromiscuous = true; 915 rc = SUP CallVMMR0Ex(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); 916 916 if (RT_SUCCESS(rc)) 917 917 RTPrintf("tstIntNet-1: interface in promiscuous mode\n"); … … 928 928 ActiveReq.hIf = OpenReq.hIf; 929 929 ActiveReq.fActive = true; 930 rc = SUP CallVMMR0Ex(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); 931 931 if (RT_SUCCESS(rc)) 932 932 { … … 972 972 else 973 973 { 974 RTPrintf("tstIntNet-1: SUP CallVMMR0Ex(,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); 975 975 g_cErrors++; 976 976 } … … 978 978 else 979 979 { 980 RTPrintf("tstIntNet-1: SUP CallVMMR0Ex(,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); 981 981 g_cErrors++; 982 982 } … … 984 984 else 985 985 { 986 RTPrintf("tstIntNet-1: SUP CallVMMR0Ex(,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); 987 987 g_cErrors++; 988 988 } … … 990 990 else 991 991 { 992 RTPrintf("tstIntNet-1: SUP CallVMMR0Ex(,VMMR0_DO_INTNET_OPEN,) failed, rc=%Rrc\n", rc);992 RTPrintf("tstIntNet-1: SUPR3CallVMMR0Ex(,VMMR0_DO_INTNET_OPEN,) failed, rc=%Rrc\n", rc); 993 993 g_cErrors++; 994 994 } 995 995 996 SUP Term(false /* not forced*/);996 SUPR3Term(false /*fForced*/); 997 997 998 998 /* close open files */ -
trunk/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp
r20842 r20864 1641 1641 int rc; 1642 1642 1643 rc = SUP Uninstall();1643 rc = SUPR3Uninstall(); 1644 1644 if (RT_SUCCESS(rc)) 1645 1645 return 0; … … 1658 1658 int rc; 1659 1659 1660 rc = SUP Install();1660 rc = SUPR3Install(); 1661 1661 if (RT_SUCCESS(rc)) 1662 1662 return 0; -
trunk/src/VBox/HostDrivers/Support/SUPLib.cpp
r20862 r20864 149 149 150 150 151 SUPR3DECL(int) SUP Install(void)151 SUPR3DECL(int) SUPR3Install(void) 152 152 { 153 153 return suplibOsInstall(); … … 155 155 156 156 157 SUPR3DECL(int) SUP Uninstall(void)157 SUPR3DECL(int) SUPR3Uninstall(void) 158 158 { 159 159 return suplibOsUninstall(); … … 486 486 487 487 488 SUPR3DECL(int) SUP Term(bool fForced)488 SUPR3DECL(int) SUPR3Term(bool fForced) 489 489 { 490 490 /* 491 491 * Verify state. 492 492 */ 493 AssertMsg(g_cInits > 0, ("SUP Term() is called before SUPR3Init()!\n"));493 AssertMsg(g_cInits > 0, ("SUPR3Term() is called before SUPR3Init()!\n")); 494 494 if (g_cInits == 0) 495 495 return VERR_WRONG_ORDER; … … 526 526 527 527 528 SUPR3DECL(SUPPAGINGMODE) SUP GetPagingMode(void)528 SUPR3DECL(SUPPAGINGMODE) SUPR3GetPagingMode(void) 529 529 { 530 530 /* fake */ … … 550 550 || RT_FAILURE(Req.Hdr.rc)) 551 551 { 552 LogRel(("SUP GetPagingMode: %Rrc %Rrc\n", rc, Req.Hdr.rc));552 LogRel(("SUPR3GetPagingMode: %Rrc %Rrc\n", rc, Req.Hdr.rc)); 553 553 Req.u.Out.enmMode = SUPPAGINGMODE_INVALID; 554 554 } … … 568 568 569 569 570 SUPR3DECL(int) SUP CallVMMR0Fast(PVMR0 pVMR0, unsigned uOperation, VMCPUID idCpu)570 SUPR3DECL(int) SUPR3CallVMMR0Fast(PVMR0 pVMR0, unsigned uOperation, VMCPUID idCpu) 571 571 { 572 572 if (RT_LIKELY(uOperation == SUP_VMMR0_DO_RAW_RUN)) … … 582 582 583 583 584 SUPR3DECL(int) SUP CallVMMR0Ex(PVMR0 pVMR0, VMCPUID idCpu, unsigned uOperation, uint64_t u64Arg, PSUPVMMR0REQHDR pReqHdr)584 SUPR3DECL(int) SUPR3CallVMMR0Ex(PVMR0 pVMR0, VMCPUID idCpu, unsigned uOperation, uint64_t u64Arg, PSUPVMMR0REQHDR pReqHdr) 585 585 { 586 586 /* … … 645 645 646 646 647 SUPR3DECL(int) SUP CallVMMR0(PVMR0 pVMR0, VMCPUID idCpu, unsigned uOperation, void *pvArg)647 SUPR3DECL(int) SUPR3CallVMMR0(PVMR0 pVMR0, VMCPUID idCpu, unsigned uOperation, void *pvArg) 648 648 { 649 649 /* … … 655 655 ("%#x\n", uOperation), 656 656 VERR_INTERNAL_ERROR); 657 return SUP CallVMMR0Ex(pVMR0, idCpu, uOperation, (uintptr_t)pvArg, NULL);658 } 659 660 661 SUPR3DECL(int) SUP SetVMForFastIOCtl(PVMR0 pVMR0)657 return SUPR3CallVMMR0Ex(pVMR0, idCpu, uOperation, (uintptr_t)pvArg, NULL); 658 } 659 660 661 SUPR3DECL(int) SUPR3SetVMForFastIOCtl(PVMR0 pVMR0) 662 662 { 663 663 if (RT_UNLIKELY(g_u32FakeMode)) … … 834 834 835 835 836 SUPR3DECL(int) SUP PageAlloc(size_t cPages, void **ppvPages)836 SUPR3DECL(int) SUPR3PageAlloc(size_t cPages, void **ppvPages) 837 837 { 838 838 /* … … 850 850 851 851 852 SUPR3DECL(int) SUP PageFree(void *pvPages, size_t cPages)852 SUPR3DECL(int) SUPR3PageFree(void *pvPages, size_t cPages) 853 853 { 854 854 /* … … 876 876 * On entry this will point to an array of with cbMemory >> PAGE_SHIFT entries. 877 877 */ 878 intsupR3PageLock(void *pvStart, size_t cPages, PSUPPAGE paPages)878 SUPR3DECL(int) supR3PageLock(void *pvStart, size_t cPages, PSUPPAGE paPages) 879 879 { 880 880 /* … … 938 938 * down by SUPPageLock(). 939 939 */ 940 intsupR3PageUnlock(void *pvStart)940 SUPR3DECL(int) supR3PageUnlock(void *pvStart) 941 941 { 942 942 /* … … 968 968 969 969 970 SUPR3DECL(int) SUP PageAllocLockedEx(size_t cPages, void **ppvPages, PSUPPAGE paPages)970 SUPR3DECL(int) SUPR3PageAllocLockedEx(size_t cPages, void **ppvPages, PSUPPAGE paPages) 971 971 { 972 972 return SUPR3PageAllocEx(cPages, 0 /*fFlags*/, ppvPages, NULL /*pR0Ptr*/, paPages); … … 974 974 975 975 976 SUPR3DECL(int) SUP PageFreeLocked(void *pvPages, size_t cPages)976 SUPR3DECL(int) SUPR3PageFreeLocked(void *pvPages, size_t cPages) 977 977 { 978 978 /* … … 1001 1001 1002 1002 /** 1003 * Fallback for SUPPageAllocLockedEx on systems where RTR0MemObjPhysAllocNC isn't supported. 1003 * Fallback for SUPR3PageAllocLockedEx on systems where RTR0MemObjPhysAllocNC 1004 * isn't supported. 1004 1005 */ 1005 1006 static int supPagePageAllocNoKernelFallback(size_t cPages, void **ppvPages, PSUPPAGE paPages) … … 1234 1235 1235 1236 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) 1237 SUPR3DECL(void *) SUPR3ContAlloc(size_t cPages, PRTR0PTR pR0Ptr, PRTHCPHYS pHCPhys) 1243 1238 { 1244 1239 /* … … 1289 1284 1290 1285 1291 SUPR3DECL(int) SUP ContFree(void *pv, size_t cPages)1286 SUPR3DECL(int) SUPR3ContFree(void *pv, size_t cPages) 1292 1287 { 1293 1288 /* … … 1324 1319 1325 1320 1326 SUPR3DECL(int) SUP LowAlloc(size_t cPages, void **ppvPages, PRTR0PTR ppvPagesR0, PSUPPAGE paPages)1321 SUPR3DECL(int) SUPR3LowAlloc(size_t cPages, void **ppvPages, PRTR0PTR ppvPagesR0, PSUPPAGE paPages) 1327 1322 { 1328 1323 /* … … 1389 1384 1390 1385 1391 SUPR3DECL(int) SUP LowFree(void *pv, size_t cPages)1386 SUPR3DECL(int) SUPR3LowFree(void *pv, size_t cPages) 1392 1387 { 1393 1388 /* … … 1448 1443 1449 1444 1450 SUPR3DECL(int) SUP LoadModule(const char *pszFilename, const char *pszModule, void **ppvImageBase)1445 SUPR3DECL(int) SUPR3LoadModule(const char *pszFilename, const char *pszModule, void **ppvImageBase) 1451 1446 { 1452 1447 int rc = VINF_SUCCESS; … … 1460 1455 rc = supLoadModule(pszFilename, pszModule, NULL, ppvImageBase); 1461 1456 else 1462 LogRel(("SUP LoadModule: Verification of \"%s\" failed, rc=%Rrc\n", rc));1457 LogRel(("SUPR3LoadModule: Verification of \"%s\" failed, rc=%Rrc\n", rc)); 1463 1458 return rc; 1464 1459 } … … 1533 1528 * Check the VMMR0.r0 module if loaded. 1534 1529 */ 1535 /** @todo call the SUP LoadModule caller.... */1530 /** @todo call the SUPR3LoadModule caller.... */ 1536 1531 /** @todo proper reference counting and such. */ 1537 1532 if (g_pvVMMR0 != NIL_RTR0PTR) 1538 1533 { 1539 1534 void *pvValue; 1540 if (!SUP GetSymbolR0((void *)g_pvVMMR0, pszSymbol, &pvValue))1535 if (!SUPR3GetSymbolR0((void *)g_pvVMMR0, pszSymbol, &pvValue)) 1541 1536 { 1542 1537 *pValue = (uintptr_t)pvValue; … … 1652 1647 1653 1648 /** 1654 * Worker for SUP LoadModule().1649 * Worker for SUPR3LoadModule(). 1655 1650 * 1656 1651 * @returns VBox status code. … … 1868 1863 1869 1864 1870 SUPR3DECL(int) SUP FreeModule(void *pvImageBase)1865 SUPR3DECL(int) SUPR3FreeModule(void *pvImageBase) 1871 1866 { 1872 1867 /* fake */ … … 1898 1893 1899 1894 1900 SUPR3DECL(int) SUP GetSymbolR0(void *pvImageBase, const char *pszSymbol, void **ppvValue)1895 SUPR3DECL(int) SUPR3GetSymbolR0(void *pvImageBase, const char *pszSymbol, void **ppvValue) 1901 1896 { 1902 1897 *ppvValue = NULL; … … 1933 1928 1934 1929 1935 SUPR3DECL(int) SUP LoadVMM(const char *pszFilename)1930 SUPR3DECL(int) SUPR3LoadVMM(const char *pszFilename) 1936 1931 { 1937 1932 void *pvImageBase; 1938 return SUP LoadModule(pszFilename, "VMMR0.r0", &pvImageBase);1939 } 1940 1941 1942 SUPR3DECL(int) SUP UnloadVMM(void)1943 { 1944 return SUP FreeModule((void*)g_pvVMMR0);1945 } 1946 1947 1948 SUPR3DECL(int) SUP GipGetPhys(PRTHCPHYS pHCPhys)1933 return SUPR3LoadModule(pszFilename, "VMMR0.r0", &pvImageBase); 1934 } 1935 1936 1937 SUPR3DECL(int) SUPR3UnloadVMM(void) 1938 { 1939 return SUPR3FreeModule((void*)g_pvVMMR0); 1940 } 1941 1942 1943 SUPR3DECL(int) SUPR3GipGetPhys(PRTHCPHYS pHCPhys) 1949 1944 { 1950 1945 if (g_pSUPGlobalInfoPage) -
trunk/src/VBox/HostDrivers/Support/SUPLibInternal.h
r20862 r20864 315 315 316 316 317 intsupR3PageLock(void *pvStart, size_t cPages, PSUPPAGE paPages);318 intsupR3PageUnlock(void *pvStart);317 SUPR3DECL(int) supR3PageLock(void *pvStart, size_t cPages, PSUPPAGE paPages); 318 SUPR3DECL(int) supR3PageUnlock(void *pvStart); 319 319 320 320 RT_C_DECLS_END -
trunk/src/VBox/HostDrivers/Support/testcase/SUPInstall.cpp
r14831 r20864 42 42 { 43 43 RTR3Init(); 44 int rc = SUP Install();44 int rc = SUPR3Install(); 45 45 if (RT_SUCCESS(rc)) 46 46 { -
trunk/src/VBox/HostDrivers/Support/testcase/SUPUninstall.cpp
r14831 r20864 42 42 { 43 43 RTR3Init(); 44 int rc = SUP Uninstall();44 int rc = SUPR3Uninstall(); 45 45 if (RT_SUCCESS(rc)) 46 46 { -
trunk/src/VBox/HostDrivers/Support/testcase/tstContiguous.cpp
r13837 r20864 56 56 */ 57 57 RTHCPHYS HCPhys; 58 void *pv = SUP ContAlloc(8, &HCPhys);58 void *pv = SUPR3ContAlloc(8, NIL_RTR0PTR, &HCPhys); 59 59 rcRet += pv == NULL || HCPhys == 0; 60 60 if (pv && HCPhys) 61 61 { 62 62 memset(pv, 0xff, PAGE_SIZE * 8); 63 pv = SUP ContAlloc(5, &HCPhys);63 pv = SUPR3ContAlloc(5, NIL_RTR0PTR, &HCPhys); 64 64 rcRet += pv == NULL || HCPhys == 0; 65 65 if (pv && HCPhys) 66 66 { 67 67 memset(pv, 0x7f, PAGE_SIZE * 5); 68 rc = SUP ContFree(pv, 5);68 rc = SUPR3ContFree(pv, 5); 69 69 rcRet += rc != 0; 70 70 if (rc) 71 RTPrintf("tstContiguous: SUP ContFree failed! rc=%Rrc\n", rc);71 RTPrintf("tstContiguous: SUPR3ContFree failed! rc=%Rrc\n", rc); 72 72 73 73 void *apv[128]; 74 74 for (unsigned i = 0; i < RT_ELEMENTS(apv); i++) 75 75 { 76 apv[i] = SUP ContAlloc(1 + (i % 11), &HCPhys);76 apv[i] = SUPR3ContAlloc(1 + (i % 11), NIL_RTR0PTR, &HCPhys); 77 77 if (!apv[i]) 78 78 { … … 84 84 if (apv[i]) 85 85 { 86 rc = SUP ContFree(apv[i], 1 + (i % 11));86 rc = SUPR3ContFree(apv[i], 1 + (i % 11)); 87 87 rcRet += rc != 0; 88 88 if (rc) 89 RTPrintf("tstContiguous: i=%d SUP ContFree failed! rc=%Rrc\n", i, rc);89 RTPrintf("tstContiguous: i=%d SUPR3ContFree failed! rc=%Rrc\n", i, rc); 90 90 } 91 91 } 92 92 else 93 RTPrintf("tstContiguous: SUP ContAlloc (2nd) failed!\n");93 RTPrintf("tstContiguous: SUPR3ContAlloc (2nd) failed!\n"); 94 94 } 95 95 else 96 RTPrintf("tstContiguous: SUP ContAlloc failed!\n");96 RTPrintf("tstContiguous: SUPR3ContAlloc failed!\n"); 97 97 98 rc = SUP Term();99 RTPrintf("tstContiguous: SUP Term -> rc=%Rrc\n", rc);98 rc = SUPR3Term(false /*fForced*/); 99 RTPrintf("tstContiguous: SUPR3Term -> rc=%Rrc\n", rc); 100 100 rcRet += rc != 0; 101 101 } -
trunk/src/VBox/HostDrivers/Support/testcase/tstGIP-2.cpp
r17091 r20864 178 178 } 179 179 180 SUP Term();180 SUPR3Term(false /*fForced*/); 181 181 } 182 182 else -
trunk/src/VBox/HostDrivers/Support/testcase/tstGetPagingMode.cpp
r14831 r20864 47 47 if (RT_SUCCESS(rc)) 48 48 { 49 SUPPAGINGMODE enmMode = SUP GetPagingMode();49 SUPPAGINGMODE enmMode = SUPR3GetPagingMode(); 50 50 switch (enmMode) 51 51 { … … 89 89 } 90 90 91 int rc2 = SUP Term();92 RTPrintf("SUP Term -> rc=%Rrc\n", rc2);91 int rc2 = SUPR3Term(false /*fForced*/); 92 RTPrintf("SUPR3Term -> rc=%Rrc\n", rc2); 93 93 } 94 94 else -
trunk/src/VBox/HostDrivers/Support/testcase/tstInit.cpp
r14831 r20864 48 48 if (!rc) 49 49 { 50 rc = SUP Term();51 RTPrintf("tstInit: SUP Term -> rc=%d\n", rc);50 rc = SUPR3Term(false /*fForced*/); 51 RTPrintf("tstInit: SUPR3Term -> rc=%d\n", rc); 52 52 } 53 53 -
trunk/src/VBox/HostDrivers/Support/testcase/tstInt.cpp
r20602 r20864 92 92 */ 93 93 char szFile[RTPATH_MAX]; 94 rc = SUP LoadVMM(ExeDirFile(szFile, argv[0], "VMMR0.r0"));94 rc = SUPR3LoadVMM(ExeDirFile(szFile, argv[0], "VMMR0.r0")); 95 95 if (!rc) 96 96 { … … 103 103 PSUPPAGE paPages = (PSUPPAGE)RTMemAllocZ(cPages * sizeof(SUPPAGE)); 104 104 if (paPages) 105 rc = SUP LowAlloc(cPages, (void **)&pVM, &pVMR0, &paPages[0]);105 rc = SUPR3LowAlloc(cPages, (void **)&pVM, &pVMR0, &paPages[0]); 106 106 else 107 107 rc = VERR_NO_MEMORY; … … 115 115 pVM->enmVMState = VMSTATE_CREATED; 116 116 117 rc = SUP SetVMForFastIOCtl(pVMR0);117 rc = SUPR3SetVMForFastIOCtl(pVMR0); 118 118 if (!rc) 119 119 { … … 124 124 for (i = cIterations; i > 0; i--) 125 125 { 126 rc = SUP CallVMMR0(pVMR0, NIL_VMCPUID, VMMR0_DO_SLOW_NOP, NULL);126 rc = SUPR3CallVMMR0(pVMR0, NIL_VMCPUID, VMMR0_DO_SLOW_NOP, NULL); 127 127 if (rc != VINF_SUCCESS) 128 128 { 129 RTPrintf("tstInt: SUP CallVMMR0 -> rc=%Rrc i=%d Expected VINF_SUCCESS!\n", rc, i);129 RTPrintf("tstInt: SUPR3CallVMMR0 -> rc=%Rrc i=%d Expected VINF_SUCCESS!\n", rc, i); 130 130 rcRet++; 131 131 break; 132 132 } 133 133 } 134 RTPrintf("tstInt: Performed SUP CallVMMR0 %d times (rc=%Rrc)\n", cIterations, rc);134 RTPrintf("tstInt: Performed SUPR3CallVMMR0 %d times (rc=%Rrc)\n", cIterations, rc); 135 135 136 136 /* … … 146 146 { 147 147 uint64_t OneStartTick = ASMReadTSC(); 148 rc = SUP CallVMMR0Fast(pVMR0, VMMR0_DO_NOP, 0);148 rc = SUPR3CallVMMR0Fast(pVMR0, VMMR0_DO_NOP, 0); 149 149 uint64_t Ticks = ASMReadTSC() - OneStartTick; 150 150 if (Ticks < MinTicks) … … 153 153 if (RT_UNLIKELY(rc != VINF_SUCCESS)) 154 154 { 155 RTPrintf("tstInt: SUP CallVMMR0Fast -> rc=%Rrc i=%d Expected VINF_SUCCESS!\n", rc, i);155 RTPrintf("tstInt: SUPR3CallVMMR0Fast -> rc=%Rrc i=%d Expected VINF_SUCCESS!\n", rc, i); 156 156 rcRet++; 157 157 break; … … 161 161 uint64_t NanoSecs = RTTimeNanoTS() - StartTS; 162 162 163 RTPrintf("tstInt: SUP CallVMMR0Fast - %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", 164 164 i, NanoSecs, Ticks, NanoSecs / i, Ticks / i, MinTicks); 165 165 … … 174 174 { 175 175 uint64_t OneStartTick = ASMReadTSC(); 176 rc = SUP CallVMMR0Ex(pVMR0, NIL_VMCPUID, VMMR0_DO_SLOW_NOP, 0, NULL);176 rc = SUPR3CallVMMR0Ex(pVMR0, NIL_VMCPUID, VMMR0_DO_SLOW_NOP, 0, NULL); 177 177 uint64_t Ticks = ASMReadTSC() - OneStartTick; 178 178 if (Ticks < MinTicks) … … 181 181 if (RT_UNLIKELY(rc != VINF_SUCCESS)) 182 182 { 183 RTPrintf("tstInt: SUP CallVMMR0Ex -> rc=%Rrc i=%d Expected VINF_SUCCESS!\n", rc, i);183 RTPrintf("tstInt: SUPR3CallVMMR0Ex -> rc=%Rrc i=%d Expected VINF_SUCCESS!\n", rc, i); 184 184 rcRet++; 185 185 break; … … 189 189 NanoSecs = RTTimeNanoTS() - StartTS; 190 190 191 RTPrintf("tstInt: SUP CallVMMR0Ex - %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", 192 192 i, NanoSecs, Ticks, NanoSecs / i, Ticks / i, MinTicks); 193 193 } … … 195 195 else 196 196 { 197 RTPrintf("tstInt: SUP SetVMForFastIOCtl failed: %Rrc\n", rc);197 RTPrintf("tstInt: SUPR3SetVMForFastIOCtl failed: %Rrc\n", rc); 198 198 rcRet++; 199 199 } … … 201 201 else 202 202 { 203 RTPrintf("tstInt: SUP ContAlloc2(%#zx,,) failed\n", sizeof(*pVM));203 RTPrintf("tstInt: SUPR3ContAlloc(%#zx,,) failed\n", sizeof(*pVM)); 204 204 rcRet++; 205 205 } … … 208 208 * Unload VMM. 209 209 */ 210 rc = SUP UnloadVMM();210 rc = SUPR3UnloadVMM(); 211 211 if (rc) 212 212 { 213 RTPrintf("tstInt: SUP UnloadVMM failed with rc=%Rrc\n", rc);213 RTPrintf("tstInt: SUPR3UnloadVMM failed with rc=%Rrc\n", rc); 214 214 rcRet++; 215 215 } … … 217 217 else 218 218 { 219 RTPrintf("tstInt: SUP LoadVMM failed with rc=%Rrc\n", rc);219 RTPrintf("tstInt: SUPR3LoadVMM failed with rc=%Rrc\n", rc); 220 220 rcRet++; 221 221 } … … 224 224 * Terminate. 225 225 */ 226 rc = SUP Term();226 rc = SUPR3Term(false /*fForced*/); 227 227 rcRet += rc != 0; 228 RTPrintf("tstInt: SUP Term -> rc=%Rrc\n", rc);228 RTPrintf("tstInt: SUPR3Term -> rc=%Rrc\n", rc); 229 229 } 230 230 -
trunk/src/VBox/HostDrivers/Support/testcase/tstLow.cpp
r14831 r20864 59 59 void *pvPages0 = (void *)0x77777777; 60 60 memset(&aPages0[0], 0x8f, sizeof(aPages0)); 61 rc = SUP LowAlloc(RT_ELEMENTS(aPages0), &pvPages0, NULL, aPages0);61 rc = SUPR3LowAlloc(RT_ELEMENTS(aPages0), &pvPages0, NULL, aPages0); 62 62 if (RT_SUCCESS(rc)) 63 63 { … … 91 91 } 92 92 } 93 SUP LowFree(pvPages0, RT_ELEMENTS(aPages0));93 SUPR3LowFree(pvPages0, RT_ELEMENTS(aPages0)); 94 94 } 95 95 else 96 96 { 97 RTPrintf("SUP LowAlloc(%d,,) failed -> rc=%Rrc\n", RT_ELEMENTS(aPages0), rc);97 RTPrintf("SUPR3LowAlloc(%d,,) failed -> rc=%Rrc\n", RT_ELEMENTS(aPages0), rc); 98 98 rcRet++; 99 99 } … … 107 107 void *pvPages1 = (void *)0x77777777; 108 108 memset(&aPages1[0], 0x8f, sizeof(aPages1)); 109 rc = SUP LowAlloc(cPages, &pvPages1, NULL, aPages1);109 rc = SUPR3LowAlloc(cPages, &pvPages1, NULL, aPages1); 110 110 if (RT_SUCCESS(rc)) 111 111 { … … 139 139 } 140 140 } 141 SUP LowFree(pvPages1, cPages);141 SUPR3LowFree(pvPages1, cPages); 142 142 } 143 143 else 144 144 { 145 RTPrintf("SUP LowAlloc(%d,,) failed -> rc=%Rrc\n", cPages, rc);145 RTPrintf("SUPR3LowAlloc(%d,,) failed -> rc=%Rrc\n", cPages, rc); 146 146 rcRet++; 147 147 } -
trunk/src/VBox/HostDrivers/Support/testcase/tstPage.cpp
r14831 r20864 1 /* $Id$ */ 1 2 /** @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). 5 4 */ 6 5 7 6 /* 8 * Copyright (C) 2006-200 7Sun Microsystems, Inc.7 * Copyright (C) 2006-2009 Sun Microsystems, Inc. 9 8 * 10 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 51 50 { 52 51 void *pv; 53 rc = SUP PageAlloc(1, &pv);52 rc = SUPR3PageAlloc(1, &pv); 54 53 cErrors += rc != 0; 55 54 if (!rc) 56 55 { 57 56 memset(pv, 0xff, PAGE_SIZE); 58 rc = SUP PageFree(pv, 1);57 rc = SUPR3PageFree(pv, 1); 59 58 cErrors += rc != 0; 60 59 if (rc) 61 RTPrintf("tstPage: SUP PageFree() failed rc=%d\n", rc);60 RTPrintf("tstPage: SUPR3PageFree() failed rc=%d\n", rc); 62 61 } 63 62 else 64 RTPrintf("tstPage: SUP PageAlloc(1,) failed rc=%d\n", rc);63 RTPrintf("tstPage: SUPR3PageAlloc(1,) failed rc=%d\n", rc); 65 64 66 65 /* 67 66 * Big chunk. 68 67 */ 69 rc = SUP PageAlloc(1023, &pv);68 rc = SUPR3PageAlloc(1023, &pv); 70 69 cErrors += rc != 0; 71 70 if (!rc) 72 71 { 73 72 memset(pv, 0xfe, 1023 << PAGE_SHIFT); 74 rc = SUP PageFree(pv, 1023);73 rc = SUPR3PageFree(pv, 1023); 75 74 cErrors += rc != 0; 76 75 if (rc) 77 RTPrintf("tstPage: SUP PageFree() failed rc=%d\n", rc);76 RTPrintf("tstPage: SUPR3PageFree() failed rc=%d\n", rc); 78 77 } 79 78 else 80 RTPrintf("tstPage: SUP PageAlloc(1,) failed rc=%d\n", rc);79 RTPrintf("tstPage: SUPR3PageAlloc(1,) failed rc=%d\n", rc); 81 80 82 81 83 //rc = SUP Term();82 //rc = SUPR3Term(); 84 83 cErrors += rc != 0; 85 84 if (rc) 86 RTPrintf("tstPage: SUP Term failed rc=%d\n", rc);85 RTPrintf("tstPage: SUPR3Term failed rc=%d\n", rc); 87 86 } 88 87 else -
trunk/src/VBox/HostDrivers/Support/testcase/tstPin.cpp
r20862 r20864 61 61 */ 62 62 void *pv; 63 int rc = SUP PageAlloc(1, &pv);63 int rc = SUPR3PageAlloc(1, &pv); 64 64 AssertRC(rc); 65 65 RTPrintf("pv=%p\n", pv); … … 88 88 { 89 89 aPinnings[i].pv = NULL; 90 SUP PageAlloc(0x10000 >> PAGE_SHIFT, &aPinnings[i].pv);90 SUPR3PageAlloc(0x10000 >> PAGE_SHIFT, &aPinnings[i].pv); 91 91 aPinnings[i].pvAligned = RT_ALIGN_P(aPinnings[i].pv, PAGE_SIZE); 92 92 rc = supR3PageLock(aPinnings[i].pvAligned, 0xf000 >> PAGE_SHIFT, &aPinnings[i].aPages[0]); … … 108 108 RTPrintf("SUPPageLock -> rc=%d\n", rc); 109 109 rcRet++; 110 SUP PageFree(aPinnings[i].pv, 0x10000 >> PAGE_SHIFT);110 SUPR3PageFree(aPinnings[i].pv, 0x10000 >> PAGE_SHIFT); 111 111 aPinnings[i].pv = aPinnings[i].pvAligned = NULL; 112 112 break; … … 133 133 { 134 134 memset(aPinnings[i].pv, 0xcc, 0x10000); 135 SUP PageFree(aPinnings[i].pv, 0x10000 >> PAGE_SHIFT);135 SUPR3PageFree(aPinnings[i].pv, 0x10000 >> PAGE_SHIFT); 136 136 aPinnings[i].pv = NULL; 137 137 } … … 142 142 * Allocate a bit of contiguous memory. 143 143 */ 144 pv = SUP ContAlloc(RT_ALIGN_Z(15003, PAGE_SIZE) >> PAGE_SHIFT, &HCPhys);144 pv = SUPR3ContAlloc(RT_ALIGN_Z(15003, PAGE_SIZE) >> PAGE_SHIFT, NIL_RTR0PTR, &HCPhys); 145 145 rcRet += pv == NULL || HCPhys == 0; 146 146 if (pv && HCPhys) 147 147 { 148 RTPrintf("SUP ContAlloc(15003) -> HCPhys=%llx pv=%p\n", HCPhys, pv);148 RTPrintf("SUPR3ContAlloc(15003) -> HCPhys=%llx pv=%p\n", HCPhys, pv); 149 149 void *pv0 = pv; 150 150 memset(pv0, 0xaf, 15003); 151 pv = SUP ContAlloc(RT_ALIGN_Z(12999, PAGE_SIZE) >> PAGE_SHIFT, &HCPhys);151 pv = SUPR3ContAlloc(RT_ALIGN_Z(12999, PAGE_SIZE) >> PAGE_SHIFT, NIL_RTR0PTR, &HCPhys); 152 152 rcRet += pv == NULL || HCPhys == 0; 153 153 if (pv && HCPhys) 154 154 { 155 RTPrintf("SUP ContAlloc(12999) -> HCPhys=%llx pv=%p\n", HCPhys, pv);155 RTPrintf("SUPR3ContAlloc(12999) -> HCPhys=%llx pv=%p\n", HCPhys, pv); 156 156 memset(pv, 0xbf, 12999); 157 rc = SUP ContFree(pv, RT_ALIGN_Z(12999, PAGE_SIZE) >> PAGE_SHIFT);157 rc = SUPR3ContFree(pv, RT_ALIGN_Z(12999, PAGE_SIZE) >> PAGE_SHIFT); 158 158 rcRet += rc != 0; 159 159 if (rc) 160 RTPrintf("SUP ContFree failed! rc=%d\n", rc);160 RTPrintf("SUPR3ContFree failed! rc=%d\n", rc); 161 161 } 162 162 else 163 RTPrintf("SUP ContAlloc (2nd) failed!\n");163 RTPrintf("SUPR3ContAlloc (2nd) failed!\n"); 164 164 memset(pv0, 0xaf, 15003); 165 165 /* pv0 is intentionally not freed! */ 166 166 } 167 167 else 168 RTPrintf("SUP ContAlloc failed!\n");168 RTPrintf("SUPR3ContAlloc failed!\n"); 169 169 170 170 /* … … 174 174 #define BIG_SIZEPP (BIG_SIZE + PAGE_SIZE) 175 175 pv = NULL; 176 SUP PageAlloc(BIG_SIZEPP >> PAGE_SHIFT, &pv);176 SUPR3PageAlloc(BIG_SIZEPP >> PAGE_SHIFT, &pv); 177 177 if (pv) 178 178 { … … 204 204 rcRet++; 205 205 } 206 SUP PageFree(pv, BIG_SIZEPP >> PAGE_SHIFT);207 } 208 209 rc = SUP Term();210 RTPrintf("SUP Term -> 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); 211 211 rcRet += rc != 0; 212 212 } -
trunk/src/VBox/NetworkServices/DHCP/VBoxNetDHCP.cpp
r20354 r20864 577 577 CloseReq.hIf = m_hIf; 578 578 m_hIf = INTNET_HANDLE_INVALID; 579 int rc = SUP CallVMMR0Ex(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); 580 580 AssertRC(rc); 581 581 } … … 583 583 if (m_pSession) 584 584 { 585 SUP Term(false /* not forced*/);585 SUPR3Term(false /*fForced*/); 586 586 m_pSession = NIL_RTR0PTR; 587 587 } … … 879 879 } 880 880 881 rc = SUP LoadVMM(strcat(szPath, "/VMMR0.r0"));881 rc = SUPR3LoadVMM(strcat(szPath, "/VMMR0.r0")); 882 882 if (RT_FAILURE(rc)) 883 883 { 884 RTStrmPrintf(g_pStdErr, "VBoxNetDHCP: SUP LoadVMM(\"%s\") -> %Rrc", szPath, rc);884 RTStrmPrintf(g_pStdErr, "VBoxNetDHCP: SUPR3LoadVMM(\"%s\") -> %Rrc", szPath, rc); 885 885 return 1; 886 886 } … … 907 907 */ 908 908 debugPrint(2, false, "attempting to open/create network \"%s\"...", OpenReq.szNetwork); 909 rc = SUP CallVMMR0Ex(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); 910 910 if (RT_SUCCESS(rc)) 911 911 { … … 922 922 GetRing3BufferReq.hIf = m_hIf; 923 923 GetRing3BufferReq.pRing3Buf = NULL; 924 rc = SUP CallVMMR0Ex(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); 925 925 if (RT_SUCCESS(rc)) 926 926 { … … 939 939 ActiveReq.hIf = m_hIf; 940 940 ActiveReq.fActive = true; 941 rc = SUP CallVMMR0Ex(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); 942 942 if (RT_SUCCESS(rc)) 943 943 return 0; 944 944 945 945 /* bail out */ 946 RTStrmPrintf(g_pStdErr, "VBoxNetDHCP: SUP CallVMMR0Ex(,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); 947 947 } 948 948 else 949 RTStrmPrintf(g_pStdErr, "VBoxNetDHCP: SUP CallVMMR0Ex(,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); 950 950 } 951 951 else 952 RTStrmPrintf(g_pStdErr, "VBoxNetDHCP: SUP CallVMMR0Ex(,VMMR0_DO_INTNET_OPEN,) failed, rc=%Rrc\n", rc);952 RTStrmPrintf(g_pStdErr, "VBoxNetDHCP: SUPR3CallVMMR0Ex(,VMMR0_DO_INTNET_OPEN,) failed, rc=%Rrc\n", rc); 953 953 954 954 return RT_SUCCESS(rc) ? 0 : 1; … … 979 979 WaitReq.hIf = m_hIf; 980 980 WaitReq.cMillies = 2000; /* 2 secs - the sleep is for some reason uninterruptible... */ /** @todo fix interruptability in SrvIntNet! */ 981 int rc = SUP CallVMMR0Ex(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); 982 982 if (RT_FAILURE(rc)) 983 983 { -
trunk/src/VBox/NetworkServices/NetLib/VBoxNetInt.cpp
r19454 r20864 21 21 SendReq.pSession = pSession; 22 22 SendReq.hIf = hIf; 23 return SUP CallVMMR0Ex(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); 24 24 } 25 25 -
trunk/src/VBox/NetworkServices/NetLib/VBoxNetIntIf.cpp
r19454 r20864 49 49 SendReq.pSession = pSession; 50 50 SendReq.hIf = hIf; 51 return SUP CallVMMR0Ex(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); 52 52 } 53 53 -
trunk/src/VBox/VMM/GMM.cpp
r18204 r20864 128 128 */ 129 129 void *pvChunk; 130 rc = SUP PageAlloc(GMM_CHUNK_SIZE >> PAGE_SHIFT, &pvChunk);130 rc = SUPR3PageAlloc(GMM_CHUNK_SIZE >> PAGE_SHIFT, &pvChunk); 131 131 if (RT_FAILURE(rc)) 132 132 return VMSetError(pVM, rc, RT_SRC_POS, 133 N_("Out of memory (SUP PageAlloc) seeding a %u pages allocation request"),133 N_("Out of memory (SUPR3PageAlloc) seeding a %u pages allocation request"), 134 134 pReq->cPages); 135 135 -
trunk/src/VBox/VMM/HWACCM.cpp
r20838 r20864 629 629 630 630 /* Enable VT-x or AMD-V on all host CPUs. */ 631 rc = SUP CallVMMR0Ex(pVM->pVMR0, 0 /* VCPU 0*/, VMMR0_DO_HWACC_ENABLE, 0, NULL);631 rc = SUPR3CallVMMR0Ex(pVM->pVMR0, 0 /*idCpu*/, VMMR0_DO_HWACC_ENABLE, 0, NULL); 632 632 if (RT_FAILURE(rc)) 633 633 { 634 LogRel(("HWACCMR3InitFinalize: SUP CallVMMR0Ex VMMR0_DO_HWACC_ENABLE failed with %Rrc\n", rc));634 LogRel(("HWACCMR3InitFinalize: SUPR3CallVMMR0Ex VMMR0_DO_HWACC_ENABLE failed with %Rrc\n", rc)); 635 635 return rc; 636 636 } … … 1000 1000 } 1001 1001 1002 rc = SUP CallVMMR0Ex(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); 1003 1003 AssertRC(rc); 1004 1004 if (rc == VINF_SUCCESS) … … 1108 1108 pVM->hwaccm.s.fNestedPaging = pVM->hwaccm.s.fAllowNestedPaging; 1109 1109 1110 rc = SUP CallVMMR0Ex(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); 1111 1111 AssertRC(rc); 1112 1112 if (rc == VINF_SUCCESS) -
trunk/src/VBox/VMM/MMInternal.h
r20774 r20864 526 526 #endif 527 527 /** Flag indicating the allocation method. 528 * Set: SUP LowAlloc().529 * Clear: SUP PageAlloc() + SUPPageLock(). */528 * Set: SUPR3LowAlloc(). 529 * Clear: SUPR3PageAllocLockedEx(). */ 530 530 bool fLow; 531 531 /** Number of subpools. */ -
trunk/src/VBox/VMM/MMPagePool.cpp
r20680 r20864 68 68 * ring-0. Need to change the wasy we allocate it... */ 69 69 AssertReleaseReturn(sizeof(*pVM->mm.s.pPagePoolR3) + sizeof(*pVM->mm.s.pPagePoolLowR3) < PAGE_SIZE, VERR_INTERNAL_ERROR); 70 int rc = SUP PageAllocLockedEx(1, (void **)&pVM->mm.s.pPagePoolR3, NULL);70 int rc = SUPR3PageAllocLockedEx(1, (void **)&pVM->mm.s.pPagePoolR3, NULL); 71 71 if (RT_FAILURE(rc)) 72 72 return rc; … … 123 123 { 124 124 int rc = SUPR3PageFreeEx(pSubPool->pvPages, pSubPool->cPages); 125 AssertMsgRC(rc, ("SUP PageFree(%p) failed with rc=%Rrc\n", pSubPool->pvPages, rc));125 AssertMsgRC(rc, ("SUPR3PageFreeEx(%p) failed with rc=%Rrc\n", pSubPool->pvPages, rc)); 126 126 pSubPool->pvPages = NULL; 127 127 … … 144 144 while (pSubPool) 145 145 { 146 int rc = SUP LowFree(pSubPool->pvPages, pSubPool->cPages);147 AssertMsgRC(rc, ("SUP PageFree(%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)); 148 148 pSubPool->pvPages = NULL; 149 149 … … 258 258 } 259 259 else 260 rc = SUP LowAlloc(cPages, &pSub->pvPages, NULL, paPhysPages);260 rc = SUPR3LowAlloc(cPages, &pSub->pvPages, NULL, paPhysPages); 261 261 if (RT_SUCCESS(rc)) 262 262 { -
trunk/src/VBox/VMM/PDMDriver.cpp
r20706 r20864 961 961 if ( uOperation >= VMMR0_DO_SRV_START 962 962 && uOperation < VMMR0_DO_SRV_END) 963 rc = SUP CallVMMR0Ex(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); 964 964 else 965 965 { -
trunk/src/VBox/VMM/PDMLdr.cpp
r19924 r20864 142 142 { 143 143 Assert(pModule->ImageBase); 144 int rc2 = SUP FreeModule((void *)(uintptr_t)pModule->ImageBase);144 int rc2 = SUPR3FreeModule((void *)(uintptr_t)pModule->ImageBase); 145 145 AssertRC(rc2); 146 146 pModule->ImageBase = 0; … … 518 518 } 519 519 else 520 AssertMsgFailed(("SUP PageAlloc(%d,) -> %Rrc\n", cPages, rc));520 AssertMsgFailed(("SUPR3PageAlloc(%d,) -> %Rrc\n", cPages, rc)); 521 521 RTMemTmpFree(paPages); 522 522 } … … 590 590 */ 591 591 void *pvImageBase; 592 int rc = SUP LoadModule(pszFilename, pszName, &pvImageBase);592 int rc = SUPR3LoadModule(pszFilename, pszName, &pvImageBase); 593 593 if (RT_SUCCESS(rc)) 594 594 { … … 706 706 && !strcmp(pModule->szName, pszModule)) 707 707 { 708 int rc = SUP GetSymbolR0((void *)(uintptr_t)pModule->ImageBase, pszSymbol, (void **)ppvValue);708 int rc = SUPR3GetSymbolR0((void *)(uintptr_t)pModule->ImageBase, pszSymbol, (void **)ppvValue); 709 709 if (RT_FAILURE(rc)) 710 710 { -
trunk/src/VBox/VMM/PGM.cpp
r20808 r20864 552 552 * will return to the ring-3 caller (and later ring-0) and asking it to seed 553 553 * the page allocator with some fresh pages (VERR_GMM_SEED_ME). Ring-3 will 554 * then perform an SUP PageAlloc(cbChunk >> PAGE_SHIFT) call and make a554 * then perform an SUPR3PageAlloc(cbChunk >> PAGE_SHIFT) call and make a 555 555 * "SeededAllocPages" call to ring-0. 556 556 * … … 1503 1503 * and the guest running in real mode. 1504 1504 */ 1505 pVM->pgm.s.enmHostMode = SUP GetPagingMode();1505 pVM->pgm.s.enmHostMode = SUPR3GetPagingMode(); 1506 1506 switch (pVM->pgm.s.enmHostMode) 1507 1507 { -
trunk/src/VBox/VMM/PGMPhys.cpp
r20730 r20864 3054 3054 { 3055 3055 void *pvChunk; 3056 rcAlloc = rc = SUP PageAlloc(GMM_CHUNK_SIZE >> PAGE_SHIFT, &pvChunk);3056 rcAlloc = rc = SUPR3PageAlloc(GMM_CHUNK_SIZE >> PAGE_SHIFT, &pvChunk); 3057 3057 if (RT_SUCCESS(rc)) 3058 3058 { 3059 3059 rcSeed = rc = VMMR3CallR0(pVM, VMMR0_DO_GMM_SEED_CHUNK, (uintptr_t)pvChunk, NULL); 3060 3060 if (RT_FAILURE(rc)) 3061 SUP PageFree(pvChunk, GMM_CHUNK_SIZE >> PAGE_SHIFT);3061 SUPR3PageFree(pvChunk, GMM_CHUNK_SIZE >> PAGE_SHIFT); 3062 3062 } 3063 3063 if (RT_SUCCESS(rc)) -
trunk/src/VBox/VMM/STAM.cpp
r20681 r20864 759 759 GVMMReq.Hdr.u32Magic = SUPVMMR0REQHDR_MAGIC; 760 760 GVMMReq.pSession = pVM->pSession; 761 rc = SUP CallVMMR0Ex(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); 762 762 } 763 763 … … 768 768 // GMMReq.Hdr.u32Magic = SUPVMMR0REQHDR_MAGIC; 769 769 // GMMReq.pSession = pVM->pSession; 770 // rc = SUP CallVMMR0Ex(pVM->pVMR0, VMMR0_DO_GMM_RESET_STATISTICS, 0, &Req.Hdr);770 // rc = SUPR3CallVMMR0Ex(pVM->pVMR0, VMMR0_DO_GMM_RESET_STATISTICS, 0, &Req.Hdr); 771 771 // } 772 772 … … 1771 1771 Req.Hdr.u32Magic = SUPVMMR0REQHDR_MAGIC; 1772 1772 Req.pSession = pVM->pSession; 1773 int rc = SUP CallVMMR0Ex(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); 1774 1774 if (RT_SUCCESS(rc)) 1775 1775 pUVM->stam.s.GVMMStats = Req.Stats; -
trunk/src/VBox/VMM/TM.cpp
r20784 r20864 220 220 AssertMsgReturn(pVM->tm.s.pvGIPR3, ("GIP support is now required!\n"), VERR_INTERNAL_ERROR); 221 221 RTHCPHYS HCPhysGIP; 222 rc = SUP GipGetPhys(&HCPhysGIP);222 rc = SUPR3GipGetPhys(&HCPhysGIP); 223 223 AssertMsgRCReturn(rc, ("Failed to get GIP physical address!\n"), rc); 224 224 -
trunk/src/VBox/VMM/VM.cpp
r20854 r20864 528 528 CreateVMReq.pVMR3 = NULL; 529 529 CreateVMReq.cCpus = cCpus; 530 rc = SUP CallVMMR0Ex(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); 531 531 if (RT_SUCCESS(rc)) 532 532 { … … 698 698 } 699 699 700 int rc2 = SUP CallVMMR0Ex(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); 701 701 AssertRC(rc2); 702 702 } … … 719 719 { 720 720 Assert(VMMGetCpuId(pVM) == idCpu); 721 int rc = SUP CallVMMR0Ex(pVM->pVMR0, idCpu, VMMR0_DO_GVMM_REGISTER_VMCPU, 0, NULL);721 int rc = SUPR3CallVMMR0Ex(pVM->pVMR0, idCpu, VMMR0_DO_GVMM_REGISTER_VMCPU, 0, NULL); 722 722 if (RT_FAILURE(rc)) 723 723 LogRel(("idCpu=%u rc=%Rrc\n", idCpu, rc)); … … 1911 1911 * Tell GVMM to destroy the VM and free its resources. 1912 1912 */ 1913 int rc = SUP CallVMMR0Ex(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); 1914 1914 AssertRC(rc); 1915 1915 pUVM->pVM = NULL; … … 2057 2057 if (pUVM->vm.s.pSession) 2058 2058 { 2059 int rc = SUP Term();2059 int rc = SUPR3Term(false /*fForced*/); 2060 2060 AssertRC(rc); 2061 2061 pUVM->vm.s.pSession = NIL_RTR0PTR; -
trunk/src/VBox/VMM/VMEmt.cpp
r20856 r20864 652 652 //RTLogRelPrintf("u64NanoTS=%RI64 cLoops=%3d sleep %02dms (%7RU64) ", u64NanoTS, cLoops, cMilliSecs, u64NanoTS); 653 653 STAM_REL_PROFILE_START(&pUVCpu->vm.s.StatHaltBlock, c); 654 rc = SUP CallVMMR0Ex(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); 655 655 STAM_REL_PROFILE_STOP(&pUVCpu->vm.s.StatHaltBlock, c); 656 656 if (rc == VERR_INTERRUPTED) … … 672 672 { 673 673 STAM_REL_PROFILE_START(&pUVCpu->vm.s.StatHaltYield, d); 674 rc = SUP CallVMMR0Ex(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); 675 675 STAM_REL_PROFILE_STOP(&pUVCpu->vm.s.StatHaltYield, d); 676 676 } … … 711 711 * anything needs our attention. 712 712 */ 713 rc = SUP CallVMMR0Ex(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); 714 714 if (rc == VERR_INTERRUPTED) 715 715 rc = VINF_SUCCESS; … … 740 740 if (pUVCpu->vm.s.fWait) 741 741 { 742 int rc = SUP CallVMMR0Ex(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); 743 743 AssertRC(rc); 744 744 } … … 752 752 if (fFlags & VMNOTIFYFF_FLAGS_POKE) 753 753 { 754 int rc = SUP CallVMMR0Ex(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); 755 755 AssertRC(rc); 756 756 } -
trunk/src/VBox/VMM/VMM.cpp
r20857 r20864 177 177 * Register the Ring-0 VM handle with the session for fast ioctl calls. 178 178 */ 179 rc = SUP SetVMForFastIOCtl(pVM->pVMR0);179 rc = SUPR3SetVMForFastIOCtl(pVM->pVMR0); 180 180 if (RT_FAILURE(rc)) 181 181 return rc; … … 510 510 rc = VINF_SUCCESS; 511 511 #else 512 rc = SUP CallVMMR0Ex(pVM->pVMR0, 0 /* VCPU 0*/, VMMR0_DO_VMMR0_INIT, VMMGetSvnRev(), NULL);512 rc = SUPR3CallVMMR0Ex(pVM->pVMR0, 0 /*idCpu*/, VMMR0_DO_VMMR0_INIT, VMMGetSvnRev(), NULL); 513 513 #endif 514 514 /* … … 584 584 rc = VINF_SUCCESS; 585 585 #else 586 rc = SUP CallVMMR0(pVM->pVMR0, 0 /* VCPU 0 */, VMMR0_DO_CALL_HYPERVISOR, NULL);586 rc = SUPR3CallVMMR0(pVM->pVMR0, 0 /* VCPU 0 */, VMMR0_DO_CALL_HYPERVISOR, NULL); 587 587 #endif 588 588 #ifdef LOG_ENABLED … … 637 637 rc = VINF_SUCCESS; 638 638 #else 639 rc = SUP CallVMMR0Ex(pVM->pVMR0, 0 /* VCPU 0*/, VMMR0_DO_VMMR0_TERM, 0, NULL);639 rc = SUPR3CallVMMR0Ex(pVM->pVMR0, 0 /*idCpu*/, VMMR0_DO_VMMR0_TERM, 0, NULL); 640 640 #endif 641 641 /* … … 1146 1146 rc = VERR_GENERAL_FAILURE; 1147 1147 #else 1148 rc = SUP CallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0);1148 rc = SUPR3CallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0); 1149 1149 if (RT_LIKELY(rc == VINF_SUCCESS)) 1150 1150 rc = pVCpu->vmm.s.iLastGZRc; … … 1197 1197 rc = VERR_GENERAL_FAILURE; 1198 1198 #else 1199 rc = SUP CallVMMR0Fast(pVM->pVMR0, VMMR0_DO_HWACC_RUN, pVCpu->idCpu);1199 rc = SUPR3CallVMMR0Fast(pVM->pVMR0, VMMR0_DO_HWACC_RUN, pVCpu->idCpu); 1200 1200 if (RT_LIKELY(rc == VINF_SUCCESS)) 1201 1201 rc = pVCpu->vmm.s.iLastGZRc; … … 1697 1697 rc = VERR_GENERAL_FAILURE; 1698 1698 #else 1699 rc = SUP CallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0);1699 rc = SUPR3CallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0); 1700 1700 if (RT_LIKELY(rc == VINF_SUCCESS)) 1701 1701 rc = pVCpu->vmm.s.iLastGZRc; … … 1732 1732 1733 1733 /** 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. 1736 1735 * 1737 1736 * @returns VBox status code. … … 1739 1738 * @param uOperation Operation to execute. 1740 1739 * @param u64Arg Constant argument. 1741 * @param pReqHdr Pointer to a request header. See SUP CallVMMR0Ex for1740 * @param pReqHdr Pointer to a request header. See SUPR3CallVMMR0Ex for 1742 1741 * details. 1743 1742 */ … … 1756 1755 rc = VERR_GENERAL_FAILURE; 1757 1756 #else 1758 rc = SUP CallVMMR0Ex(pVM->pVMR0, pVCpu->idCpu, uOperation, u64Arg, pReqHdr);1757 rc = SUPR3CallVMMR0Ex(pVM->pVMR0, pVCpu->idCpu, uOperation, u64Arg, pReqHdr); 1759 1758 #endif 1760 1759 /* … … 1806 1805 rc = VERR_GENERAL_FAILURE; 1807 1806 #else 1808 rc = SUP CallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0);1807 rc = SUPR3CallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0); 1809 1808 if (RT_LIKELY(rc == VINF_SUCCESS)) 1810 1809 rc = pVCpu->vmm.s.iLastGZRc; -
trunk/src/VBox/VMM/VMMAll/MMAllHyper.cpp
r20774 r20864 311 311 #endif 312 312 *ppv = pv; 313 /* ASMMemZero32(pv, cbAligned); - not required since memory is alloc-only and SUP PageAlloc zeros it. */313 /* ASMMemZero32(pv, cbAligned); - not required since memory is alloc-only and SUPR3PageAlloc zeros it. */ 314 314 Log2(("MMHyperAlloc: cb=%#x uAlignment=%#x returns VINF_SUCCESS and *ppv=%p\n", cb, uAlignment, ppv)); 315 315 return VINF_SUCCESS; -
trunk/src/VBox/VMM/VMMSwitcher.cpp
r20557 r20864 111 111 */ 112 112 pVM->vmm.s.cbCoreCode = RT_ALIGN_32(cbCoreCode, PAGE_SIZE); 113 pVM->vmm.s.pvCoreCodeR3 = SUP ContAlloc2(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); 114 114 int rc = VERR_NO_MEMORY; 115 115 if (pVM->vmm.s.pvCoreCodeR3) … … 137 137 pVM->vmm.s.pvCoreCodeR0 = NIL_RTR0PTR; 138 138 pVM->vmm.s.HCPhysCoreCode = NIL_RTHCPHYS; 139 pVM->vmm.s.pvCoreCodeR3 = SUP ContAlloc2(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); 140 140 if (!pVM->vmm.s.pvCoreCodeR3) 141 141 break; … … 158 158 LogRel(("Core code alloc attempt #%d: pvR3=%p pvR0=%p HCPhys=%RHp\n", 159 159 i, paBadTries[i].pvR3, paBadTries[i].pvR0, paBadTries[i].HCPhys)); 160 SUP ContFree(paBadTries[i].pvR3, paBadTries[i].cb >> PAGE_SHIFT);160 SUPR3ContFree(paBadTries[i].pvR3, paBadTries[i].cb >> PAGE_SHIFT); 161 161 } 162 162 RTMemTmpFree(paBadTries); … … 200 200 /* shit */ 201 201 AssertMsgFailed(("PGMR3Map(,%RRv, %RHp, %#x, 0) failed with rc=%Rrc\n", pVM->vmm.s.pvCoreCodeRC, pVM->vmm.s.HCPhysCoreCode, cbCoreCode, rc)); 202 SUP ContFree(pVM->vmm.s.pvCoreCodeR3, pVM->vmm.s.cbCoreCode >> PAGE_SHIFT);202 SUPR3ContFree(pVM->vmm.s.pvCoreCodeR3, pVM->vmm.s.cbCoreCode >> PAGE_SHIFT); 203 203 } 204 204 else -
trunk/src/VBox/VMM/VMMTests.cpp
r19660 r20864 73 73 CPUMSetHyperEIP(pVCpu, pVM->vmm.s.pfnCallTrampolineRC); 74 74 Assert(CPUMGetHyperCR3(pVCpu) && CPUMGetHyperCR3(pVCpu) == PGMGetHyperCR3(pVCpu)); 75 rc = SUP CallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0);75 rc = SUPR3CallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0); 76 76 if (RT_LIKELY(rc == VINF_SUCCESS)) 77 77 rc = pVCpu->vmm.s.iLastGZRc; … … 113 113 CPUMSetHyperEIP(pVCpu, pVM->vmm.s.pfnCallTrampolineRC); 114 114 Assert(CPUMGetHyperCR3(pVCpu) && CPUMGetHyperCR3(pVCpu) == PGMGetHyperCR3(pVCpu)); 115 rc = SUP CallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0);115 rc = SUPR3CallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0); 116 116 if (RT_LIKELY(rc == VINF_SUCCESS)) 117 117 rc = pVCpu->vmm.s.iLastGZRc; … … 361 361 do 362 362 { 363 rc = SUP CallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0);363 rc = SUPR3CallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0); 364 364 if (RT_LIKELY(rc == VINF_SUCCESS)) 365 365 rc = pVCpu->vmm.s.iLastGZRc; … … 415 415 416 416 uint64_t TickThisStart = ASMReadTSC(); 417 rc = SUP CallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0);417 rc = SUPR3CallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0); 418 418 if (RT_LIKELY(rc == VINF_SUCCESS)) 419 419 rc = pVCpu->vmm.s.iLastGZRc; … … 561 561 562 562 uint64_t TickThisStart = ASMReadTSC(); 563 rc = SUP CallVMMR0Fast(pVM->pVMR0, VMMR0_DO_HWACC_RUN, 0);563 rc = SUPR3CallVMMR0Fast(pVM->pVMR0, VMMR0_DO_HWACC_RUN, 0); 564 564 uint64_t TickThisElapsed = ASMReadTSC() - TickThisStart; 565 565 if (RT_FAILURE(rc)) -
trunk/src/VBox/VMM/testcase/tstCFGM.cpp
r20863 r20864 51 51 int rc = SUPR3Init(NULL); 52 52 if (RT_SUCCESS(rc)) 53 rc = SUP PageAlloc(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); 54 54 if (RT_FAILURE(rc)) 55 55 { -
trunk/src/VBox/VMM/testcase/tstGlobalConfig.cpp
r19454 r20864 103 103 } 104 104 105 rc = SUP LoadVMM("./VMMR0.r0");105 rc = SUPR3LoadVMM("./VMMR0.r0"); 106 106 if (RT_SUCCESS(rc)) 107 107 { 108 108 Req.pSession = pSession; 109 rc = SUP CallVMMR0Ex(NIL_RTR0PTR, NIL_VMCPUID, enmOp, 0, &Req.Hdr);109 rc = SUPR3CallVMMR0Ex(NIL_RTR0PTR, NIL_VMCPUID, enmOp, 0, &Req.Hdr); 110 110 if (RT_SUCCESS(rc)) 111 111 { … … 121 121 122 122 } 123 SUP Term(false /* not forced*/);123 SUPR3Term(false /*fForced*/); 124 124 125 125 return RT_FAILURE(rc) ? 1 : 0; -
trunk/src/VBox/VMM/testcase/tstMMHyperHeap.cpp
r20620 r20864 38 38 #include <iprt/string.h> 39 39 40 /* does not work for more CPUs as SUP LowAlloc() would refuse to allocate more pages */40 /* does not work for more CPUs as SUPR3LowAlloc() would refuse to allocate more pages */ 41 41 #define NUM_CPUS 16 42 42 … … 58 58 int rc = SUPR3Init(NULL); 59 59 if (RT_SUCCESS(rc)) 60 rc = SUP LowAlloc(RT_ELEMENTS(aPages), (void **)&pVM, &pvR0, &aPages[0]);60 rc = SUPR3LowAlloc(RT_ELEMENTS(aPages), (void **)&pVM, &pvR0, &aPages[0]); 61 61 if (RT_FAILURE(rc)) 62 62 { -
trunk/src/VBox/VMM/testcase/tstSSM.cpp
r20153 r20864 594 594 */ 595 595 PVM pVM; 596 rc = SUP PageAlloc((sizeof(*pVM) + PAGE_SIZE - 1) >> PAGE_SHIFT, (void **)&pVM);596 rc = SUPR3PageAlloc((sizeof(*pVM) + PAGE_SIZE - 1) >> PAGE_SHIFT, (void **)&pVM); 597 597 if (RT_SUCCESS(rc)) 598 598 {
Note:
See TracChangeset
for help on using the changeset viewer.