Changeset 46861 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Jun 28, 2013 10:29:10 AM (11 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/VMMAll.cpp
r46326 r46861 360 360 } 361 361 362 363 /** 364 * Returns the build type for matching components. 365 * 366 * @returns Build type value. 367 */ 368 uint32_t vmmGetBuildType(void) 369 { 370 uint32_t uRet = 0xbeef0000; 371 #ifdef DEBUG 372 uRet |= RT_BIT_32(0); 373 #endif 374 #ifdef VBOX_WITH_STATISTICS 375 uRet |= RT_BIT_32(1); 376 #endif 377 return uRet; 378 } 379 -
trunk/src/VBox/VMM/VMMR0/VMMR0.cpp
r46420 r46861 264 264 * @param pVM Pointer to the VM. 265 265 * @param uSvnRev The SVN revision of the ring-3 part. 266 * @param uBuildType Build type indicator. 266 267 * @thread EMT. 267 268 */ 268 static int vmmR0InitVM(PVM pVM, uint32_t uSvnRev )269 { 270 /* 271 * Match the SVN revisions .269 static int vmmR0InitVM(PVM pVM, uint32_t uSvnRev, uint32_t uBuildType) 270 { 271 /* 272 * Match the SVN revisions and build type. 272 273 */ 273 274 if (uSvnRev != VMMGetSvnRev()) … … 277 278 return VERR_VMM_R0_VERSION_MISMATCH; 278 279 } 280 if (uBuildType != vmmGetBuildType()) 281 { 282 LogRel(("VMMR0InitVM: Build type mismatch, r3=%#x r0=%#x\n", uBuildType, vmmGetBuildType())); 283 SUPR0Printf("VMMR0InitVM: Build type mismatch, r3=%#x r0=%#x\n", uBuildType, vmmGetBuildType()); 284 return VERR_VMM_R0_VERSION_MISMATCH; 285 } 279 286 if ( !VALID_PTR(pVM) 280 287 || pVM->pVMR0 != pVM) 281 288 return VERR_INVALID_PARAMETER; 289 282 290 283 291 #ifdef LOG_ENABLED … … 953 961 */ 954 962 case VMMR0_DO_VMMR0_INIT: 955 return vmmR0InitVM(pVM, (uint32_t)u64Arg);963 return vmmR0InitVM(pVM, RT_LODWORD(u64Arg), RT_HIDWORD(u64Arg)); 956 964 957 965 /* -
trunk/src/VBox/VMM/VMMR3/VMM.cpp
r46420 r46861 511 511 rc = VINF_SUCCESS; 512 512 #else 513 rc = SUPR3CallVMMR0Ex(pVM->pVMR0, 0 /*idCpu*/, VMMR0_DO_VMMR0_INIT, VMMGetSvnRev(), NULL); 513 rc = SUPR3CallVMMR0Ex(pVM->pVMR0, 0 /*idCpu*/, VMMR0_DO_VMMR0_INIT, 514 RT_MAKE_U64(VMMGetSvnRev(), vmmGetBuildType()), NULL); 514 515 #endif 515 516 /* … … 569 570 CPUMSetHyperESP(pVCpu, pVCpu->vmm.s.pbEMTStackBottomRC); /* Clear the stack. */ 570 571 uint64_t u64TS = RTTimeProgramStartNanoTS(); 571 CPUMPushHyper(pVCpu, (uint32_t)(u64TS >> 32)); /* Param 3: The program startup TS - Hi. */ 572 CPUMPushHyper(pVCpu, (uint32_t)u64TS); /* Param 3: The program startup TS - Lo. */ 572 CPUMPushHyper(pVCpu, (uint32_t)(u64TS >> 32)); /* Param 4: The program startup TS - Hi. */ 573 CPUMPushHyper(pVCpu, (uint32_t)u64TS); /* Param 4: The program startup TS - Lo. */ 574 CPUMPushHyper(pVCpu, vmmGetBuildType()); /* Param 3: Version argument. */ 573 575 CPUMPushHyper(pVCpu, VMMGetSvnRev()); /* Param 2: Version argument. */ 574 576 CPUMPushHyper(pVCpu, VMMGC_DO_VMMGC_INIT); /* Param 1: Operation. */ 575 577 CPUMPushHyper(pVCpu, pVM->pVMRC); /* Param 0: pVM */ 576 CPUMPushHyper(pVCpu, 5* sizeof(RTRCPTR)); /* trampoline param: stacksize. */578 CPUMPushHyper(pVCpu, 6 * sizeof(RTRCPTR)); /* trampoline param: stacksize. */ 577 579 CPUMPushHyper(pVCpu, RCPtrEP); /* Call EIP. */ 578 580 CPUMSetHyperEIP(pVCpu, pVM->vmm.s.pfnCallTrampolineRC); -
trunk/src/VBox/VMM/VMMRC/VMMRC.cpp
r44528 r46861 70 70 { 71 71 /* 72 * Validate the svn revision (uArg) .72 * Validate the svn revision (uArg) and build type (ellipsis). 73 73 */ 74 74 if (uArg != VMMGetSvnRev()) 75 75 return VERR_VMM_RC_VERSION_MISMATCH; 76 76 77 va_list va; 78 va_start(va, uArg); 79 80 uint32_t uBuildType = va_arg(va, uint32_t); 81 if (uBuildType != vmmGetBuildType()) 82 return VERR_VMM_RC_VERSION_MISMATCH; 83 77 84 /* 78 85 * Initialize the runtime. 79 * (The program timestamp is found in the elipsis.)80 86 */ 81 va_list va;82 va_start(va, uArg);83 87 uint64_t u64TS = va_arg(va, uint64_t); 88 84 89 va_end(va); 85 90 -
trunk/src/VBox/VMM/include/VMMInternal.h
r45701 r46861 520 520 int vmmInitFormatTypes(void); 521 521 void vmmTermFormatTypes(void); 522 uint32_t vmmGetBuildType(void); 522 523 523 524 #ifdef IN_RING3
Note:
See TracChangeset
for help on using the changeset viewer.