Changeset 13813 in vbox
- Timestamp:
- Nov 4, 2008 9:55:34 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 38804
- Location:
- trunk
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm.h
r13778 r13813 129 129 VMMR3DECL(void) VMMR3Relocate(PVM pVM, RTGCINTPTR offDelta); 130 130 VMMR3DECL(int) VMMR3UpdateLoggers(PVM pVM); 131 VMMR3DECL(const char *) VMMR3Get GCAssertMsg1(PVM pVM);132 VMMR3DECL(const char *) VMMR3Get GCAssertMsg2(PVM pVM);131 VMMR3DECL(const char *) VMMR3GetRZAssertMsg1(PVM pVM); 132 VMMR3DECL(const char *) VMMR3GetRZAssertMsg2(PVM pVM); 133 133 VMMR3DECL(int) VMMR3GetImportRC(PVM pVM, const char *pszSymbol, PRTRCPTR pRCPtrValue); 134 134 VMMR3DECL(int) VMMR3SelectSwitcher(PVM pVM, VMMSWITCHER enmSwitcher); … … 136 136 VMMR3DECL(int) VMMR3RawRunGC(PVM pVM); 137 137 VMMR3DECL(int) VMMR3HwAccRunGC(PVM pVM); 138 VMMR3DECL(int) VMMR3Call GC(PVM pVM, RTRCPTR GCPtrEntry, unsigned cArgs, ...);139 VMMR3DECL(int) VMMR3Call GCV(PVM pVM, RTRCPTR GCPtrEntry, unsigned cArgs, va_list args);138 VMMR3DECL(int) VMMR3CallRC(PVM pVM, RTRCPTR RCPtrEntry, unsigned cArgs, ...); 139 VMMR3DECL(int) VMMR3CallRCV(PVM pVM, RTRCPTR RCPtrEntry, unsigned cArgs, va_list args); 140 140 VMMR3DECL(int) VMMR3ResumeHyper(PVM pVM); 141 141 VMMR3DECL(void) VMMR3FatalDump(PVM pVM, int rcErr); -
trunk/include/iprt/initterm.h
r11841 r13813 82 82 RTR3DECL(int) RTR3InitAndSUPLibWithProgramPath(const char *pszProgramPath); 83 83 84 /** 84 /** 85 85 * Initializes the runtime library and possibly also SUPLib too. 86 * 86 * 87 87 * Avoid this interface, it's not considered stable. 88 * 88 * 89 89 * @returns IPRT status code. 90 90 * @param iVersion The interface version. Must be 0 atm. … … 119 119 #ifdef IN_GC 120 120 /** 121 * Init alizes the guestcontext runtime library.121 * Initializes the raw-mode context runtime library. 122 122 * 123 123 * @returns iprt status code. … … 125 125 * @param u64ProgramStartNanoTS The startup timestamp. 126 126 */ 127 RTGCDECL(int) RT GCInit(uint64_t u64ProgramStartNanoTS);127 RTGCDECL(int) RTRCInit(uint64_t u64ProgramStartNanoTS); 128 128 129 129 /** 130 * Terminates the guestcontext runtime library.130 * Terminates the raw-mode context runtime library. 131 131 */ 132 RTGCDECL(void) RT GCTerm(void);132 RTGCDECL(void) RTRCTerm(void); 133 133 #endif 134 134 -
trunk/src/VBox/Runtime/gc/initterm-gc.cpp
r8245 r13813 1 1 /* $Id$ */ 2 2 /** @file 3 * IPRT - Init GuestContext.3 * IPRT - Init Raw-mode Context. 4 4 */ 5 5 … … 64 64 65 65 /** 66 * Init alizes the guest context runtime library.66 * Initializes the raw-mode context runtime library. 67 67 * 68 68 * @returns iprt status code. … … 70 70 * @param u64ProgramStartNanoTS The startup timestamp. 71 71 */ 72 RTGCDECL(int) RT GCInit(uint64_t u64ProgramStartNanoTS)72 RTGCDECL(int) RTRCInit(uint64_t u64ProgramStartNanoTS) 73 73 { 74 74 /* … … 85 85 86 86 /** 87 * Terminates the guestcontext runtime library.87 * Terminates the raw-mode context runtime library. 88 88 */ 89 RTGCDECL(void) RT GCTerm(void)89 RTGCDECL(void) RTRCTerm(void) 90 90 { 91 91 /* do nothing */ -
trunk/src/VBox/VMM/EM.cpp
r13796 r13813 664 664 665 665 case VINF_EM_DBG_HYPER_ASSERTION: 666 RTPrintf("\nVINF_EM_DBG_HYPER_ASSERTION:\n%s%s\n", VMMR3Get GCAssertMsg1(pVM), VMMR3GetGCAssertMsg2(pVM));667 rc = DBGFR3EventAssertion(pVM, DBGFEVENT_ASSERTION_HYPER, VMMR3Get GCAssertMsg1(pVM), VMMR3GetGCAssertMsg2(pVM));666 RTPrintf("\nVINF_EM_DBG_HYPER_ASSERTION:\n%s%s\n", VMMR3GetRZAssertMsg1(pVM), VMMR3GetRZAssertMsg2(pVM)); 667 rc = DBGFR3EventAssertion(pVM, DBGFEVENT_ASSERTION_HYPER, VMMR3GetRZAssertMsg1(pVM), VMMR3GetRZAssertMsg2(pVM)); 668 668 break; 669 669 -
trunk/src/VBox/VMM/VMM.cpp
r13798 r13813 743 743 744 744 /** 745 * Gets the pointer to g_szRTAssertMsg1 in GC.746 * @returns Pointer to VMMGC::g_szRTAssertMsg1.747 * Returns NULL if not present.745 * Gets the pointer to a buffer containing the R0/RC AssertMsg1 output. 746 * 747 * @returns Pointer to the buffer. 748 748 * @param pVM The VM handle. 749 749 */ 750 VMMR3DECL(const char *) VMMR3GetGCAssertMsg1(PVM pVM) 751 { 752 RTGCPTR32 GCPtr; 753 int rc = PDMR3LdrGetSymbolRC(pVM, NULL, "g_szRTAssertMsg1", &GCPtr); 750 VMMR3DECL(const char *) VMMR3GetRZAssertMsg1(PVM pVM) 751 { 752 if (HWACCMIsEnabled(pVM)) 753 return pVM->vmm.s.szRing0AssertMsg1; 754 755 RTRCPTR RCPtr; 756 int rc = PDMR3LdrGetSymbolRC(pVM, NULL, "g_szRTAssertMsg1", &RCPtr); 754 757 if (VBOX_SUCCESS(rc)) 755 return (const char *)MMHyperGC2HC(pVM, GCPtr); 758 return (const char *)MMHyperRCToR3(pVM, RCPtr); 759 756 760 return NULL; 757 761 } … … 759 763 760 764 /** 761 * Gets the pointer to g_szRTAssertMsg2 in GC.762 * @returns Pointer to VMMGC::g_szRTAssertMsg2.763 * Returns NULL if not present.765 * Gets the pointer to a buffer containing the R0/RC AssertMsg2 output. 766 * 767 * @returns Pointer to the buffer. 764 768 * @param pVM The VM handle. 765 769 */ 766 VMMR3DECL(const char *) VMMR3GetGCAssertMsg2(PVM pVM) 767 { 768 RTGCPTR32 GCPtr; 769 int rc = PDMR3LdrGetSymbolRC(pVM, NULL, "g_szRTAssertMsg2", &GCPtr); 770 VMMR3DECL(const char *) VMMR3GetRZAssertMsg2(PVM pVM) 771 { 772 if (HWACCMIsEnabled(pVM)) 773 return pVM->vmm.s.szRing0AssertMsg2; 774 775 RTRCPTR RCPtr; 776 int rc = PDMR3LdrGetSymbolRC(pVM, NULL, "g_szRTAssertMsg2", &RCPtr); 770 777 if (VBOX_SUCCESS(rc)) 771 return (const char *)MMHyperGC2HC(pVM, GCPtr); 778 return (const char *)MMHyperRCToR3(pVM, RCPtr); 779 772 780 return NULL; 773 781 } … … 1139 1147 } 1140 1148 1141 /** 1142 * Calls GC a function. 1149 1150 /** 1151 * Calls a RC function. 1143 1152 * 1144 1153 * @param pVM The VM handle. 1145 * @param GCPtrEntry The GC function address.1154 * @param RCPtrEntry The address of the RC function. 1146 1155 * @param cArgs The number of arguments in the .... 1147 1156 * @param ... Arguments to the function. 1148 1157 */ 1149 VMMR3DECL(int) VMMR3Call GC(PVM pVM, RTRCPTR GCPtrEntry, unsigned cArgs, ...)1158 VMMR3DECL(int) VMMR3CallRC(PVM pVM, RTRCPTR RCPtrEntry, unsigned cArgs, ...) 1150 1159 { 1151 1160 va_list args; 1152 1161 va_start(args, cArgs); 1153 int rc = VMMR3Call GCV(pVM, GCPtrEntry, cArgs, args);1162 int rc = VMMR3CallRCV(pVM, RCPtrEntry, cArgs, args); 1154 1163 va_end(args); 1155 1164 return rc; … … 1158 1167 1159 1168 /** 1160 * Calls GC afunction.1169 * Calls a RC function. 1161 1170 * 1162 1171 * @param pVM The VM handle. 1163 * @param GCPtrEntry The GC function address.1172 * @param RCPtrEntry The address of the RC function. 1164 1173 * @param cArgs The number of arguments in the .... 1165 1174 * @param args Arguments to the function. 1166 1175 */ 1167 VMMR3DECL(int) VMMR3Call GCV(PVM pVM, RTRCPTR GCPtrEntry, unsigned cArgs, va_list args)1168 { 1169 Log2(("VMMR3CallGCV: GCPtrEntry=%VRv cArgs=%d\n", GCPtrEntry, cArgs));1176 VMMR3DECL(int) VMMR3CallRCV(PVM pVM, RTRCPTR RCPtrEntry, unsigned cArgs, va_list args) 1177 { 1178 Log2(("VMMR3CallGCV: RCPtrEntry=%VRv cArgs=%d\n", RCPtrEntry, cArgs)); 1170 1179 1171 1180 /* … … 1181 1190 1182 1191 CPUMPushHyper(pVM, cArgs * sizeof(RTGCUINTPTR32)); /* stack frame size */ 1183 CPUMPushHyper(pVM, GCPtrEntry); /* what to call */1192 CPUMPushHyper(pVM, RCPtrEntry); /* what to call */ 1184 1193 CPUMSetHyperEIP(pVM, pVM->vmm.s.pfnCallTrampolineRC); 1185 1194 … … 1238 1247 VMMR3DECL(int) VMMR3ResumeHyper(PVM pVM) 1239 1248 { 1240 Log(("VMMR3ResumeHyper: eip=%V Gv esp=%VGv\n", CPUMGetHyperEIP(pVM), CPUMGetHyperESP(pVM)));1249 Log(("VMMR3ResumeHyper: eip=%VRv esp=%VRv\n", CPUMGetHyperEIP(pVM), CPUMGetHyperESP(pVM))); 1241 1250 1242 1251 /* -
trunk/src/VBox/VMM/VMMGC/VMMGC.cpp
r13714 r13813 1 1 /* $Id$ */ 2 2 /** @file 3 * VMM - GuestContext.3 * VMM - Raw-mode Context. 4 4 */ 5 5 … … 68 68 { 69 69 /* 70 * Init GC modules.70 * Init RC modules. 71 71 */ 72 72 case VMMGC_DO_VMMGC_INIT: … … 87 87 va_end(va); 88 88 89 int rc = RT GCInit(u64TS);89 int rc = RTRCInit(u64TS); 90 90 Log(("VMMGCEntry: VMMGC_DO_VMMGC_INIT - uArg=%u (svn revision) u64TS=%RX64; rc=%Rrc\n", uArg, u64TS, rc)); 91 91 AssertRCReturn(rc, rc); … … 162 162 163 163 /** 164 * Internal GC logger worker: Flush logger.164 * Internal RC logger worker: Flush logger. 165 165 * 166 166 * @returns VINF_SUCCESS. -
trunk/src/VBox/VMM/VMMGC/VMMGC.def
r13306 r13813 1 1 ;; @file 2 ; VMM GuestContext DLL - Definition file.2 ; VMM Raw-mode Context DLL - Definition file. 3 3 4 4 ; -
trunk/src/VBox/VMM/VMMGC/VMMGC.mac
r8155 r13813 1 1 ; $Id$ 2 2 ;; @file 3 ; VMMGC - GuestContext Assembly Macros.3 ; VMMGC - Raw-mode Context Assembly Macros. 4 4 ; 5 5 -
trunk/src/VBox/VMM/VMMGC/VMMGC99.asm
r8155 r13813 1 1 ; $Id$ 2 2 ;; @file 3 ; VMMGC 0 - The first object module in the link.3 ; VMMGC99 - The last object module in the link. 4 4 ; 5 5 -
trunk/src/VBox/VMM/VMMGC/VMMGCA.asm
r12989 r13813 1 1 ; $Id$ 2 2 ;; @file 3 ; VMMGC - GuestContext Virtual Machine Monitor assembly routines.3 ; VMMGC - Raw-mode Context Virtual Machine Monitor assembly routines. 4 4 ; 5 5 -
trunk/src/VBox/VMM/VMMGC/VMMGCBuiltin.def
r8155 r13813 1 ; $Id$ 1 2 ;; @file 3 ; VMM Raw-mode Context Builtin DLL - Definition file for generating import library. 2 4 ; 3 ; VMM Guest Context Builtin DLL - Definition file for generating import library.4 5 5 6 ; Copyright (C) 2006-2007 Sun Microsystems, Inc. -
trunk/src/VBox/VMM/VMMGuruMeditation.cpp
r13714 r13813 231 231 { 232 232 bool fIsRing0 = rcErr == VERR_VMM_RING0_ASSERTION; 233 const char *pszMsg1 = fIsRing0 ? pVM->vmm.s.szRing0AssertMsg1 : VMMR3GetGCAssertMsg1(pVM);233 const char *pszMsg1 = VMMR3GetRZAssertMsg1(pVM); 234 234 while (pszMsg1 && *pszMsg1 == '\n') 235 235 pszMsg1++; 236 const char *pszMsg2 = fIsRing0 ? pVM->vmm.s.szRing0AssertMsg2 : VMMR3GetGCAssertMsg2(pVM);236 const char *pszMsg2 = VMMR3GetRZAssertMsg2(pVM); 237 237 while (pszMsg2 && *pszMsg2 == '\n') 238 238 pszMsg2++; -
trunk/src/VBox/VMM/VMMInternal.h
r13798 r13813 88 88 89 89 /** 90 * The ring-0 logger instance. 91 * We need to be able to find the VM handle from the logger instance. 90 * The ring-0 logger instance wrapper. 91 * 92 * We need to be able to find the VM handle from the logger instance, so we wrap 93 * it in this structure. 92 94 */ 93 95 typedef struct VMMR0LOGGER … … 102 104 uint32_t u32Alignment; 103 105 #endif 104 /** The ring-0 logger instance. This extends beyond the size. */106 /** The ring-0 logger instance. This extends beyond the size. */ 105 107 RTLOGGER Logger; 106 } VMMR0LOGGER, *PVMMR0LOGGER; 108 } VMMR0LOGGER; 109 /** Pointer to a ring-0 logger instance wrapper. */ 110 typedef VMMR0LOGGER *PVMMR0LOGGER; 107 111 108 112 … … 113 117 typedef struct VMMR0JMPBUF 114 118 { 115 /** Tra nditional jmp_buf stuff119 /** Traditional jmp_buf stuff 116 120 * @{ */ 117 121 #if HC_ARCH_BITS == 32 -
trunk/src/VBox/VMM/VMMR0/VMMR0.cpp
r13812 r13813 19 19 * additional information or have any questions. 20 20 */ 21 22 21 23 22 /******************************************************************************* … … 450 449 } 451 450 #endif /* VBOX_WITH_STATISTICS */ 452 453 451 454 452 … … 1058 1056 1059 1057 1060 1061 1058 /** 1062 1059 * Internal R0 logger worker: Flush logger. … … 1112 1109 1113 1110 1114 1115 1111 /** 1116 1112 * Jump back to ring-3 if we're the EMT and the longjmp is armed. … … 1139 1135 #endif 1140 1136 } 1141 1142 1137 1143 1138 … … 1211 1206 } 1212 1207 1213 -
trunk/src/VBox/VMM/VMMSwitcher.cpp
r13798 r13813 25 25 #define LOG_GROUP LOG_GROUP_VMM 26 26 #include <VBox/vmm.h> 27 #include <VBox/vmapi.h>28 27 #include <VBox/pgm.h> 29 #include <VBox/cfgm.h> 30 #include <VBox/pdmqueue.h> 31 #include <VBox/pdmapi.h> 32 #include <VBox/cpum.h> 28 #include <VBox/selm.h> 33 29 #include <VBox/mm.h> 34 #include <VBox/iom.h>35 #include <VBox/trpm.h>36 #include <VBox/selm.h>37 #include <VBox/em.h>38 30 #include <VBox/sup.h> 39 #include <VBox/dbgf.h>40 #include <VBox/csam.h>41 #include <VBox/patm.h>42 #include <VBox/rem.h>43 #include <VBox/ssm.h>44 #include <VBox/tm.h>45 31 #include "VMMInternal.h" 46 32 #include "VMMSwitcher/VMMSwitcher.h" 47 33 #include <VBox/vm.h> 34 #include <VBox/dis.h> 48 35 49 36 #include <VBox/err.h> 50 37 #include <VBox/param.h> 51 #include <VBox/version.h>52 #include <VBox/x86.h>53 #include <VBox/hwaccm.h>54 38 #include <iprt/assert.h> 55 39 #include <iprt/alloc.h> 56 40 #include <iprt/asm.h> 57 #include <iprt/time.h>58 #include <iprt/stream.h>59 41 #include <iprt/string.h> 60 #include <iprt/stdarg.h>61 42 #include <iprt/ctype.h> 62 63 64 65 /** The saved state version. */66 #define VMM_SAVED_STATE_VERSION 367 43 68 44 -
trunk/src/VBox/VMM/VMMSwitcher/VMMSwitcher.mac
r8155 r13813 20 20 ; 21 21 22 %ifndef __ VMMSwitcher_mac__23 %define __ VMMSwitcher_mac__22 %ifndef ___VMMSwitcher_mac 23 %define ___VMMSwitcher_mac 24 24 25 25 %include "iprt/asmdefs.mac" … … 140 140 %endif 141 141 142 %endif ; !__ VMMSwitcher_mac__142 %endif ; !___VMMSwitcher_mac 143 143 -
trunk/src/VBox/VMM/VMMTests.cpp
r13714 r13813 56 56 static int vmmR3DoGCTest(PVM pVM, VMMGCOPERATION enmTestcase, unsigned uVariation) 57 57 { 58 RT GCPTR32 GCPtrEP;59 int rc = PDMR3LdrGetSymbolRC(pVM, VMMGC_MAIN_MODULE_NAME, "VMMGCEntry", & GCPtrEP);58 RTRCPTR RCPtrEP; 59 int rc = PDMR3LdrGetSymbolRC(pVM, VMMGC_MAIN_MODULE_NAME, "VMMGCEntry", &RCPtrEP); 60 60 if (VBOX_FAILURE(rc)) 61 61 return rc; … … 67 67 CPUMPushHyper(pVM, enmTestcase); 68 68 CPUMPushHyper(pVM, pVM->pVMGC); 69 CPUMPushHyper(pVM, 3 * sizeof(RT GCPTR32));/* stack frame size */70 CPUMPushHyper(pVM, GCPtrEP); /* what to call */69 CPUMPushHyper(pVM, 3 * sizeof(RTRCPTR)); /* stack frame size */ 70 CPUMPushHyper(pVM, RCPtrEP); /* what to call */ 71 71 CPUMSetHyperEIP(pVM, pVM->vmm.s.pfnCallTrampolineRC); 72 72 rc = SUPCallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN); … … 93 93 RTPrintf("VMM: testing 0%x / %d - %s\n", u8Trap, uVariation, pszDesc); 94 94 95 RT GCPTR32 GCPtrEP;96 int rc = PDMR3LdrGetSymbolRC(pVM, VMMGC_MAIN_MODULE_NAME, "VMMGCEntry", & GCPtrEP);95 RTRCPTR RCPtrEP; 96 int rc = PDMR3LdrGetSymbolRC(pVM, VMMGC_MAIN_MODULE_NAME, "VMMGCEntry", &RCPtrEP); 97 97 if (VBOX_FAILURE(rc)) 98 98 return rc; … … 104 104 CPUMPushHyper(pVM, u8Trap + VMMGC_DO_TESTCASE_TRAP_FIRST); 105 105 CPUMPushHyper(pVM, pVM->pVMGC); 106 CPUMPushHyper(pVM, 3 * sizeof(RT GCPTR32));/* stack frame size */107 CPUMPushHyper(pVM, GCPtrEP); /* what to call */106 CPUMPushHyper(pVM, 3 * sizeof(RTRCPTR)); /* stack frame size */ 107 CPUMPushHyper(pVM, RCPtrEP); /* what to call */ 108 108 CPUMSetHyperEIP(pVM, pVM->vmm.s.pfnCallTrampolineRC); 109 109 rc = SUPCallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN); … … 128 128 else if (pszFaultEIP) 129 129 { 130 RT GCPTR32 GCPtrFault;131 int rc2 = PDMR3LdrGetSymbolRC(pVM, VMMGC_MAIN_MODULE_NAME, pszFaultEIP, & GCPtrFault);130 RTRCPTR RCPtrFault; 131 int rc2 = PDMR3LdrGetSymbolRC(pVM, VMMGC_MAIN_MODULE_NAME, pszFaultEIP, &RCPtrFault); 132 132 if (VBOX_FAILURE(rc2)) 133 133 RTPrintf("VMM: FAILURE - Failed to resolve symbol '%s', %Vrc!\n", pszFaultEIP, rc); 134 else if ( GCPtrFault != CPUMGetHyperEIP(pVM))135 { 136 RTPrintf("VMM: FAILURE - EIP=%VGv expected %VGv (%s)\n", CPUMGetHyperEIP(pVM), GCPtrFault, pszFaultEIP);134 else if (RCPtrFault != CPUMGetHyperEIP(pVM)) 135 { 136 RTPrintf("VMM: FAILURE - EIP=%VGv expected %VGv (%s)\n", CPUMGetHyperEIP(pVM), RCPtrFault, pszFaultEIP); 137 137 fDump = true; 138 138 } … … 183 183 * Setup stack for calling VMMGCEntry(). 184 184 */ 185 RT GCPTR32 GCPtrEP;186 int rc = PDMR3LdrGetSymbolRC(pVM, VMMGC_MAIN_MODULE_NAME, "VMMGCEntry", & GCPtrEP);185 RTRCPTR RCPtrEP; 186 int rc = PDMR3LdrGetSymbolRC(pVM, VMMGC_MAIN_MODULE_NAME, "VMMGCEntry", &RCPtrEP); 187 187 if (VBOX_SUCCESS(rc)) 188 188 { 189 RTPrintf("VMM: VMMGCEntry=%VGv\n", GCPtrEP);189 RTPrintf("VMM: VMMGCEntry=%VGv\n", RCPtrEP); 190 190 191 191 /* … … 245 245 /* a bad one at VMMGCEntry */ 246 246 RTPrintf("VMM: testing hardware bp at VMMGCEntry (hit)\n"); 247 DBGFR3AddrFromFlat(pVM, &Addr, GCPtrEP);247 DBGFR3AddrFromFlat(pVM, &Addr, RCPtrEP); 248 248 RTUINT iBp1; 249 249 rc = DBGFR3BpSetReg(pVM, &Addr, 0, ~(uint64_t)0, X86_DR7_RW_EO, 1, &iBp1); … … 338 338 CPUMPushHyper(pVM, VMMGC_DO_TESTCASE_HYPER_INTERRUPT); 339 339 CPUMPushHyper(pVM, pVM->pVMGC); 340 CPUMPushHyper(pVM, 3 * sizeof(RT GCPTR32));/* stack frame size */341 CPUMPushHyper(pVM, GCPtrEP); /* what to call */340 CPUMPushHyper(pVM, 3 * sizeof(RTRCPTR)); /* stack frame size */ 341 CPUMPushHyper(pVM, RCPtrEP); /* what to call */ 342 342 CPUMSetHyperEIP(pVM, pVM->vmm.s.pfnCallTrampolineRC); 343 343 Log(("trampoline=%x\n", pVM->vmm.s.pfnCallTrampolineRC)); … … 400 400 CPUMPushHyper(pVM, VMMGC_DO_TESTCASE_NOP); 401 401 CPUMPushHyper(pVM, pVM->pVMGC); 402 CPUMPushHyper(pVM, 3 * sizeof(RT GCPTR32)); /* stack frame size */403 CPUMPushHyper(pVM, GCPtrEP); /* what to call */402 CPUMPushHyper(pVM, 3 * sizeof(RTRCPTR)); /* stack frame size */ 403 CPUMPushHyper(pVM, RCPtrEP); /* what to call */ 404 404 CPUMSetHyperEIP(pVM, pVM->vmm.s.pfnCallTrampolineRC); 405 405 … … 494 494 * Setup stack for calling VMMGCEntry(). 495 495 */ 496 RT GCPTR32 GCPtrEP;497 rc = PDMR3LdrGetSymbolRC(pVM, VMMGC_MAIN_MODULE_NAME, "VMMGCEntry", & GCPtrEP);496 RTRCPTR RCPtrEP; 497 rc = PDMR3LdrGetSymbolRC(pVM, VMMGC_MAIN_MODULE_NAME, "VMMGCEntry", &RCPtrEP); 498 498 if (VBOX_SUCCESS(rc)) 499 499 { 500 RTPrintf("VMM: VMMGCEntry=%VGv\n", GCPtrEP);500 RTPrintf("VMM: VMMGCEntry=%VGv\n", RCPtrEP); 501 501 502 502 CPUMQueryHyperCtxPtr(pVM, &pHyperCtx); … … 527 527 CPUMPushHyper(pVM, VMMGC_DO_TESTCASE_HWACCM_NOP); 528 528 CPUMPushHyper(pVM, pVM->pVMGC); 529 CPUMPushHyper(pVM, 3 * sizeof(RT GCPTR32)); /* stack frame size */530 CPUMPushHyper(pVM, GCPtrEP); /* what to call */529 CPUMPushHyper(pVM, 3 * sizeof(RTRCPTR)); /* stack frame size */ 530 CPUMPushHyper(pVM, RCPtrEP); /* what to call */ 531 531 CPUMSetHyperEIP(pVM, pVM->vmm.s.pfnCallTrampolineRC); 532 532 -
trunk/src/VBox/VMM/testcase/tstMicro.cpp
r13782 r13813 209 209 return rc; 210 210 } 211 RT GCPTR32 GCPtrEntry;212 rc = PDMR3LdrGetSymbolRC(pVM, "tstMicroGC.gc", "tstMicroGC", & GCPtrEntry);211 RTRCPTR RCPtrEntry; 212 rc = PDMR3LdrGetSymbolRC(pVM, "tstMicroGC.gc", "tstMicroGC", &RCPtrEntry); 213 213 if (VBOX_FAILURE(rc)) 214 214 { … … 216 216 return rc; 217 217 } 218 RT GCPTR32 GCPtrStart;219 rc = PDMR3LdrGetSymbolRC(pVM, "tstMicroGC.gc", "tstMicroGCAsmStart", & GCPtrStart);218 RTRCPTR RCPtrStart; 219 rc = PDMR3LdrGetSymbolRC(pVM, "tstMicroGC.gc", "tstMicroGCAsmStart", &RCPtrStart); 220 220 if (VBOX_FAILURE(rc)) 221 221 { … … 223 223 return rc; 224 224 } 225 RT GCPTR32 GCPtrEnd;226 rc = PDMR3LdrGetSymbolRC(pVM, "tstMicroGC.gc", "tstMicroGCAsmEnd", & GCPtrEnd);225 RTRCPTR RCPtrEnd; 226 rc = PDMR3LdrGetSymbolRC(pVM, "tstMicroGC.gc", "tstMicroGCAsmEnd", &RCPtrEnd); 227 227 if (VBOX_FAILURE(rc)) 228 228 { … … 241 241 return rc; 242 242 } 243 pTst-> GCPtr = MMHyperHC2GC(pVM, pTst);244 pTst-> GCPtrStack = MMHyperHC2GC(pVM, &pTst->au8Stack[sizeof(pTst->au8Stack) - 32]);243 pTst->RCPtr = MMHyperR3ToRC(pVM, pTst); 244 pTst->RCPtrStack = MMHyperR3ToRC(pVM, &pTst->au8Stack[sizeof(pTst->au8Stack) - 32]); 245 245 246 246 /* the page must be writable from user mode */ 247 rc = PGMMapModifyPage(pVM, pTst-> GCPtr, sizeof(*pTst), X86_PTE_US | X86_PTE_RW, ~(uint64_t)(X86_PTE_US | X86_PTE_RW));247 rc = PGMMapModifyPage(pVM, pTst->RCPtr, sizeof(*pTst), X86_PTE_US | X86_PTE_RW, ~(uint64_t)(X86_PTE_US | X86_PTE_RW)); 248 248 if (VBOX_FAILURE(rc)) 249 249 { … … 253 253 254 254 /* all the code must be executable from R3. */ 255 rc = PGMMapModifyPage(pVM, GCPtrStart, GCPtrEnd - GCPtrStart + PAGE_SIZE, X86_PTE_US, ~(uint64_t)X86_PTE_US);255 rc = PGMMapModifyPage(pVM, RCPtrStart, RCPtrEnd - RCPtrStart + PAGE_SIZE, X86_PTE_US, ~(uint64_t)X86_PTE_US); 256 256 if (VBOX_FAILURE(rc)) 257 257 { … … 265 265 * Disassemble the assembly... 266 266 */ 267 RTGCPTR GCPtr = GCPtrStart;268 while (GCPtr < GCPtrEnd)267 RTGCPTR GCPtr = RCPtrStart; 268 while (GCPtr < RCPtrEnd) 269 269 { 270 270 size_t cb = 0; … … 298 298 for (int c = 0; c < 100; c++) 299 299 { 300 int rc2 = VMMR3Call GC(pVM, GCPtrEntry, 2, pTst->GCPtr, enmTest);300 int rc2 = VMMR3CallRC(pVM, RCPtrEntry, 2, pTst->RCPtr, enmTest); 301 301 if (VBOX_SUCCESS(rc2)) 302 302 { … … 327 327 { 328 328 TSTMICROTEST enmTest = (TSTMICROTEST)i; 329 rc = VMMR3Call GC(pVM, GCPtrEntry, 2, pTst->GCPtr, enmTest);329 rc = VMMR3CallRC(pVM, RCPtrEntry, 2, pTst->RCPtr, enmTest); 330 330 PrintResultTrap(pTst, enmTest, rc); 331 331 } -
trunk/src/VBox/VMM/testcase/tstMicro.h
r8155 r13813 75 75 typedef struct TSTMICRO 76 76 { 77 /** The GC address of this structure. */78 RT GCPTR GCPtr;77 /** The RC address of this structure. */ 78 RTRCPTR RCPtr; 79 79 /** Just for proper alignment. */ 80 RT GCPTR GCPtrStack;80 RTRCPTR RCPtrStack; 81 81 82 82 /** TSC sampled right before leaving R0. */ -
trunk/src/VBox/VMM/testcase/tstMicro.mac
r8155 r13813 25 25 26 26 struc TSTMICRO 27 . GCPtr resd 128 . GCPtrStack resd 127 .RCPtr resd 1 28 .RCPtrStack resd 1 29 29 .u64TSCR0Start resq 1 30 30 .u64TSCRxStart resq 1 -
trunk/src/VBox/VMM/testcase/tstMicroGCA.asm
r8155 r13813 303 303 mov ds, eax 304 304 push dword 01069h ; ss 305 push dword [ebx + TSTMICRO. GCPtrStack] ; esp305 push dword [ebx + TSTMICRO.RCPtrStack] ; esp 306 306 push dword 0000h ; eflags 307 307 push dword 01061h ; cs … … 343 343 mov ds, eax 344 344 push 0206ah ; ss 345 push dword [ebx + TSTMICRO. GCPtrStack] ; esp345 push dword [ebx + TSTMICRO.RCPtrStack] ; esp 346 346 push dword 0000h ; eflags 347 347 push 02062h ; cs … … 383 383 mov ds, eax 384 384 push 0306bh ; ss 385 push dword [ebx + TSTMICRO. GCPtrStack] ; esp385 push dword [ebx + TSTMICRO.RCPtrStack] ; esp 386 386 push dword 0000h ; eflags 387 387 push 03063h ; cs
Note:
See TracChangeset
for help on using the changeset viewer.