Changeset 39402 in vbox for trunk/src/VBox/VMM/VMMR0
- Timestamp:
- Nov 23, 2011 4:25:04 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 75020
- Location:
- trunk/src/VBox/VMM/VMMR0
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/GMMR0.cpp
r39084 r39402 595 595 596 596 /** Macro for obtaining and validating the g_pGMM pointer. 597 * On failure it will return from the invoking function with the specified return value. 597 * 598 * On failure it will return from the invoking function with the specified 599 * return value. 598 600 * 599 601 * @param pGMM The name of the pGMM variable. 600 * @param rc The return value on failure. Use VERR_ INTERNAL_ERROR for601 * VBoxstatus codes.602 * @param rc The return value on failure. Use VERR_GMM_INSTANCE for VBox 603 * status codes. 602 604 */ 603 605 #define GMM_GET_VALID_INSTANCE(pGMM, rc) \ … … 608 610 } while (0) 609 611 610 /** Macro for obtaining and validating the g_pGMM pointer, void function variant. 611 * On failure it will return from the invoking function. 612 /** Macro for obtaining and validating the g_pGMM pointer, void function 613 * variant. 614 * 615 * On failure it will return from the invoking function. 612 616 * 613 617 * @param pGMM The name of the pGMM variable. … … 1097 1101 static int gmmR0ChunkMutexDropGiant(PGMMR0CHUNKMTXSTATE pMtxState) 1098 1102 { 1099 AssertReturn(pMtxState->fFlags == GMMR0CHUNK_MTX_KEEP_GIANT, VERR_ INTERNAL_ERROR_2);1103 AssertReturn(pMtxState->fFlags == GMMR0CHUNK_MTX_KEEP_GIANT, VERR_GMM_MTX_FLAGS); 1100 1104 Assert(pMtxState->pGMM->hMtxOwner == RTThreadNativeSelf()); 1101 1105 pMtxState->fFlags = GMMR0CHUNK_MTX_RETAKE_GIANT; … … 1458 1462 */ 1459 1463 PGMM pGMM; 1460 GMM_GET_VALID_INSTANCE(pGMM, VERR_ INTERNAL_ERROR);1464 GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE); 1461 1465 PGVM pGVM; 1462 1466 int rc = GVMMR0ByVMAndEMT(pVM, idCpu, &pGVM); … … 1502 1506 } 1503 1507 else 1504 rc = VERR_ INTERNAL_ERROR_5;1508 rc = VERR_GMM_IS_NOT_SANE; 1505 1509 gmmR0MutexRelease(pGMM); 1506 1510 LogFlow(("GMMR0InitialReservation: returns %Rrc\n", rc)); … … 1555 1559 */ 1556 1560 PGMM pGMM; 1557 GMM_GET_VALID_INSTANCE(pGMM, VERR_ INTERNAL_ERROR);1561 GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE); 1558 1562 PGVM pGVM; 1559 1563 int rc = GVMMR0ByVMAndEMT(pVM, idCpu, &pGVM); … … 1596 1600 } 1597 1601 else 1598 rc = VERR_ INTERNAL_ERROR_5;1602 rc = VERR_GMM_IS_NOT_SANE; 1599 1603 gmmR0MutexRelease(pGMM); 1600 1604 LogFlow(("GMMR0UpdateReservation: returns %Rrc\n", rc)); … … 2070 2074 2071 2075 /* bail out */ 2072 rc = VERR_ INTERNAL_ERROR;2076 rc = VERR_GMM_CHUNK_INSERT; 2073 2077 } 2074 2078 else 2075 rc = VERR_ INTERNAL_ERROR_5;2079 rc = VERR_GMM_IS_NOT_SANE; 2076 2080 gmmR0MutexRelease(pGMM); 2077 2081 } … … 2415 2419 break; 2416 2420 default: 2417 AssertMsgFailedReturn(("enmAccount=%d\n", enmAccount), VERR_I NTERNAL_ERROR);2421 AssertMsgFailedReturn(("enmAccount=%d\n", enmAccount), VERR_IPE_NOT_REACHED_DEFAULT_CASE); 2418 2422 } 2419 2423 … … 2439 2443 case GMMACCOUNT_SHADOW: pGVM->gmm.s.Allocated.cShadowPages += cPages; break; 2440 2444 case GMMACCOUNT_FIXED: pGVM->gmm.s.Allocated.cFixedPages += cPages; break; 2441 default: AssertMsgFailedReturn(("enmAccount=%d\n", enmAccount), VERR_I NTERNAL_ERROR);2445 default: AssertMsgFailedReturn(("enmAccount=%d\n", enmAccount), VERR_IPE_NOT_REACHED_DEFAULT_CASE); 2442 2446 } 2443 2447 pGVM->gmm.s.cPrivatePages += cPages; … … 2451 2455 { 2452 2456 iPage = gmmR0AllocatePagesInBoundMode(pGVM, iPage, cPages, paPages); 2453 AssertReleaseReturn(iPage == cPages, VERR_ INTERNAL_ERROR_3);2457 AssertReleaseReturn(iPage == cPages, VERR_GMM_ALLOC_PAGES_IPE); 2454 2458 return VINF_SUCCESS; 2455 2459 } … … 2528 2532 case GMMACCOUNT_SHADOW: pGVM->gmm.s.Allocated.cShadowPages -= cPages; break; 2529 2533 case GMMACCOUNT_FIXED: pGVM->gmm.s.Allocated.cFixedPages -= cPages; break; 2530 default: AssertMsgFailedReturn(("enmAccount=%d\n", enmAccount), VERR_I NTERNAL_ERROR);2534 default: AssertMsgFailedReturn(("enmAccount=%d\n", enmAccount), VERR_IPE_NOT_REACHED_DEFAULT_CASE); 2531 2535 } 2532 2536 … … 2599 2603 */ 2600 2604 PGMM pGMM; 2601 GMM_GET_VALID_INSTANCE(pGMM, VERR_ INTERNAL_ERROR);2605 GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE); 2602 2606 PGVM pGVM; 2603 2607 int rc = GVMMR0ByVMAndEMT(pVM, idCpu, &pGVM); … … 2755 2759 } 2756 2760 else 2757 rc = VERR_ INTERNAL_ERROR_5;2761 rc = VERR_GMM_IS_NOT_SANE; 2758 2762 gmmR0MutexRelease(pGMM); 2759 2763 LogFlow(("GMMR0AllocateHandyPages: returns %Rrc\n", rc)); … … 2793 2797 */ 2794 2798 PGMM pGMM; 2795 GMM_GET_VALID_INSTANCE(pGMM, VERR_ INTERNAL_ERROR);2799 GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE); 2796 2800 PGVM pGVM; 2797 2801 int rc = GVMMR0ByVMAndEMT(pVM, idCpu, &pGVM); … … 2830 2834 } 2831 2835 else 2832 rc = VERR_ INTERNAL_ERROR_5;2836 rc = VERR_GMM_IS_NOT_SANE; 2833 2837 gmmR0MutexRelease(pGMM); 2834 2838 LogFlow(("GMMR0AllocatePages: returns %Rrc\n", rc)); … … 2892 2896 */ 2893 2897 PGMM pGMM; 2894 GMM_GET_VALID_INSTANCE(pGMM, VERR_ INTERNAL_ERROR);2898 GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE); 2895 2899 PGVM pGVM; 2896 2900 int rc = GVMMR0ByVMAndEMT(pVM, idCpu, &pGVM); … … 2969 2973 { 2970 2974 gmmR0MutexRelease(pGMM); 2971 rc = VERR_ INTERNAL_ERROR_5;2975 rc = VERR_GMM_IS_NOT_SANE; 2972 2976 } 2973 2977 … … 2993 2997 */ 2994 2998 PGMM pGMM; 2995 GMM_GET_VALID_INSTANCE(pGMM, VERR_ INTERNAL_ERROR);2999 GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE); 2996 3000 PGVM pGVM; 2997 3001 int rc = GVMMR0ByVMAndEMT(pVM, idCpu, &pGVM); … … 3036 3040 } 3037 3041 else 3038 rc = VERR_ INTERNAL_ERROR_5;3042 rc = VERR_GMM_IS_NOT_SANE; 3039 3043 3040 3044 gmmR0MutexRelease(pGMM); … … 3310 3314 break; 3311 3315 default: 3312 AssertMsgFailedReturn(("enmAccount=%d\n", enmAccount), VERR_I NTERNAL_ERROR);3316 AssertMsgFailedReturn(("enmAccount=%d\n", enmAccount), VERR_IPE_NOT_REACHED_DEFAULT_CASE); 3313 3317 } 3314 3318 … … 3381 3385 case GMMACCOUNT_FIXED: pGVM->gmm.s.Allocated.cFixedPages -= iPage; break; 3382 3386 default: 3383 AssertMsgFailedReturn(("enmAccount=%d\n", enmAccount), VERR_I NTERNAL_ERROR);3387 AssertMsgFailedReturn(("enmAccount=%d\n", enmAccount), VERR_IPE_NOT_REACHED_DEFAULT_CASE); 3384 3388 } 3385 3389 … … 3415 3419 */ 3416 3420 PGMM pGMM; 3417 GMM_GET_VALID_INSTANCE(pGMM, VERR_ INTERNAL_ERROR);3421 GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE); 3418 3422 PGVM pGVM; 3419 3423 int rc = GVMMR0ByVMAndEMT(pVM, idCpu, &pGVM); … … 3440 3444 } 3441 3445 else 3442 rc = VERR_ INTERNAL_ERROR_5;3446 rc = VERR_GMM_IS_NOT_SANE; 3443 3447 gmmR0MutexRelease(pGMM); 3444 3448 LogFlow(("GMMR0FreePages: returns %Rrc\n", rc)); … … 3507 3511 */ 3508 3512 PGMM pGMM; 3509 GMM_GET_VALID_INSTANCE(pGMM, VERR_ INTERNAL_ERROR);3513 GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE); 3510 3514 PGVM pGVM; 3511 3515 int rc = GVMMR0ByVMAndEMT(pVM, idCpu, &pGVM); … … 3606 3610 } 3607 3611 else 3608 rc = VERR_ INTERNAL_ERROR_5;3612 rc = VERR_GMM_IS_NOT_SANE; 3609 3613 3610 3614 gmmR0MutexRelease(pGMM); … … 3658 3662 */ 3659 3663 PGMM pGMM; 3660 GMM_GET_VALID_INSTANCE(pGMM, VERR_ INTERNAL_ERROR);3664 GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE); 3661 3665 pReq->cAllocPages = pGMM->cAllocatedPages; 3662 3666 pReq->cFreePages = (pGMM->cChunks << (GMM_CHUNK_SHIFT- PAGE_SHIFT)) - pGMM->cAllocatedPages; … … 3692 3696 */ 3693 3697 PGMM pGMM; 3694 GMM_GET_VALID_INSTANCE(pGMM, VERR_ INTERNAL_ERROR);3698 GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE); 3695 3699 PGVM pGVM; 3696 3700 int rc = GVMMR0ByVMAndEMT(pVM, idCpu, &pGVM); … … 3710 3714 } 3711 3715 else 3712 rc = VERR_ INTERNAL_ERROR_5;3716 rc = VERR_GMM_IS_NOT_SANE; 3713 3717 3714 3718 gmmR0MutexRelease(pGMM); … … 3977 3981 */ 3978 3982 PGMM pGMM; 3979 GMM_GET_VALID_INSTANCE(pGMM, VERR_ INTERNAL_ERROR);3983 GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE); 3980 3984 PGVM pGVM; 3981 3985 int rc = GVMMR0ByVM(pVM, &pGVM); … … 4042 4046 } 4043 4047 else 4044 rc = VERR_ INTERNAL_ERROR_5;4048 rc = VERR_GMM_IS_NOT_SANE; 4045 4049 gmmR0MutexRelease(pGMM); 4046 4050 … … 4087 4091 */ 4088 4092 PGMM pGMM; 4089 GMM_GET_VALID_INSTANCE(pGMM, VERR_ INTERNAL_ERROR);4093 GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE); 4090 4094 PGVM pGVM; 4091 4095 int rc = GVMMR0ByVMAndEMT(pVM, idCpu, &pGVM); … … 4174 4178 */ 4175 4179 PGMM pGMM; 4176 GMM_GET_VALID_INSTANCE(pGMM, VERR_ INTERNAL_ERROR);4180 GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE); 4177 4181 PGVM pGVM; 4178 4182 int rc = GVMMR0ByVMAndEMT(pVM, idCpu, &pGVM); … … 4322 4326 } 4323 4327 else 4324 rc = VERR_ INTERNAL_ERROR_5;4328 rc = VERR_GMM_IS_NOT_SANE; 4325 4329 4326 4330 end: … … 4378 4382 */ 4379 4383 PGMM pGMM; 4380 GMM_GET_VALID_INSTANCE(pGMM, VERR_ INTERNAL_ERROR);4384 GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE); 4381 4385 PGVM pGVM; 4382 4386 int rc = GVMMR0ByVMAndEMT(pVM, idCpu, &pGVM); … … 4443 4447 } 4444 4448 else 4445 rc = VERR_ INTERNAL_ERROR_5;4449 rc = VERR_GMM_IS_NOT_SANE; 4446 4450 4447 4451 gmmR0MutexRelease(pGMM); … … 4553 4557 int rc = VINF_SUCCESS; 4554 4558 PGMM pGMM; 4555 GMM_GET_VALID_INSTANCE(pGMM, VERR_ INTERNAL_ERROR);4559 GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE); 4556 4560 unsigned cPages = pModule->aRegions[idxRegion].cbRegion >> PAGE_SHIFT; 4557 4561 … … 4701 4705 * RTAvlGCPtrDestroy callback. 4702 4706 * 4703 * @returns 0 or VERR_ INTERNAL_ERROR.4707 * @returns 0 or VERR_GMM_INSTANCE. 4704 4708 * @param pNode The node to destroy. 4705 4709 * @param pvGVM The GVM handle. … … 4727 4731 /* Remove from the tree and free memory. */ 4728 4732 PGMM pGMM; 4729 GMM_GET_VALID_INSTANCE(pGMM, VERR_ INTERNAL_ERROR);4733 GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE); 4730 4734 RTAvlGCPtrRemove(&pGMM->pGlobalSharedModuleTree, pRec->Core.Key); 4731 4735 RTMemFree(pRec); … … 4772 4776 */ 4773 4777 PGMM pGMM; 4774 GMM_GET_VALID_INSTANCE(pGMM, VERR_ INTERNAL_ERROR);4778 GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE); 4775 4779 PGVM pGVM; 4776 4780 int rc = GVMMR0ByVMAndEMT(pVM, idCpu, &pGVM); … … 4791 4795 } 4792 4796 else 4793 rc = VERR_ INTERNAL_ERROR_5;4797 rc = VERR_GMM_IS_NOT_SANE; 4794 4798 4795 4799 gmmR0MutexRelease(pGMM); … … 4845 4849 */ 4846 4850 PGMM pGMM; 4847 GMM_GET_VALID_INSTANCE(pGMM, VERR_ INTERNAL_ERROR);4851 GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE); 4848 4852 4849 4853 /* … … 4852 4856 gmmR0MutexAcquire(pGMM); 4853 4857 if (!GMM_CHECK_SANITY_UPON_ENTERING(pGMM)) 4854 rc = VERR_ INTERNAL_ERROR_5;4858 rc = VERR_GMM_IS_NOT_SANE; 4855 4859 else 4856 4860 rc = VINF_SUCCESS; … … 4871 4875 */ 4872 4876 PGMM pGMM; 4873 GMM_GET_VALID_INSTANCE(pGMM, VERR_ INTERNAL_ERROR);4877 GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE); 4874 4878 4875 4879 gmmR0MutexRelease(pGMM); … … 4893 4897 */ 4894 4898 PGMM pGMM; 4895 GMM_GET_VALID_INSTANCE(pGMM, VERR_ INTERNAL_ERROR);4899 GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE); 4896 4900 PGVM pGVM; 4897 4901 int rc = GVMMR0ByVMAndEMT(pVM, pVCpu->idCpu, &pGVM); … … 4923 4927 } 4924 4928 else 4925 rc = VERR_ INTERNAL_ERROR_5;4929 rc = VERR_GMM_IS_NOT_SANE; 4926 4930 4927 4931 # ifndef DEBUG_sandervl … … 5007 5011 5008 5012 PGMM pGMM; 5009 GMM_GET_VALID_INSTANCE(pGMM, VERR_ INTERNAL_ERROR);5013 GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE); 5010 5014 5011 5015 PGVM pGVM; … … 5052 5056 } 5053 5057 else 5054 rc = VERR_ INTERNAL_ERROR_5;5058 rc = VERR_GMM_IS_NOT_SANE; 5055 5059 5056 5060 gmmR0MutexRelease(pGMM); -
trunk/src/VBox/VMM/VMMR0/GVMMR0.cpp
r39303 r39402 272 272 * 273 273 * @param pGVMM The name of the pGVMM variable. 274 * @param rc The return value on failure. Use VERR_ INTERNAL_ERROR for275 * VBoxstatus codes.274 * @param rc The return value on failure. Use VERR_GVMM_INSTANCE for VBox 275 * status codes. 276 276 */ 277 277 #define GVMM_GET_VALID_INSTANCE(pGVMM, rc) \ … … 322 322 */ 323 323 uint32_t cHostCpus = RTMpGetArraySize(); 324 AssertMsgReturn(cHostCpus > 0 && cHostCpus < _64K, ("%d", (int)cHostCpus), VERR_ INTERNAL_ERROR_2);324 AssertMsgReturn(cHostCpus > 0 && cHostCpus < _64K, ("%d", (int)cHostCpus), VERR_GVMM_HOST_CPU_RANGE); 325 325 326 326 PGVMM pGVMM = (PGVMM)RTMemAllocZ(RT_UOFFSETOF(GVMM, aHostCpus[cHostCpus])); … … 535 535 */ 536 536 PGVMM pGVMM; 537 GVMM_GET_VALID_INSTANCE(pGVMM, VERR_ INTERNAL_ERROR);537 GVMM_GET_VALID_INSTANCE(pGVMM, VERR_GVMM_INSTANCE); 538 538 AssertPtrReturn(pSession, VERR_INVALID_HANDLE); 539 539 AssertPtrReturn(pszName, VERR_INVALID_POINTER); … … 602 602 */ 603 603 PGVMM pGVMM; 604 GVMM_GET_VALID_INSTANCE(pGVMM, VERR_ INTERNAL_ERROR);604 GVMM_GET_VALID_INSTANCE(pGVMM, VERR_GVMM_INSTANCE); 605 605 AssertPtrReturn(pSession, VERR_INVALID_HANDLE); 606 606 AssertPtrReturn(pszName, VERR_INVALID_POINTER); … … 740 740 LogFlow(("GVMMR0CreateVM: pSession=%p\n", pSession)); 741 741 PGVMM pGVMM; 742 GVMM_GET_VALID_INSTANCE(pGVMM, VERR_ INTERNAL_ERROR);742 GVMM_GET_VALID_INSTANCE(pGVMM, VERR_GVMM_INSTANCE); 743 743 744 744 AssertPtrReturn(ppVM, VERR_INVALID_POINTER); … … 750 750 751 751 RTNATIVETHREAD hEMT0 = RTThreadNativeSelf(); 752 AssertReturn(hEMT0 != NIL_RTNATIVETHREAD, VERR_ INTERNAL_ERROR);752 AssertReturn(hEMT0 != NIL_RTNATIVETHREAD, VERR_GVMM_BROKEN_IPRT); 753 753 RTNATIVETHREAD ProcId = RTProcSelf(); 754 AssertReturn(ProcId != NIL_RTPROCESS, VERR_ INTERNAL_ERROR);754 AssertReturn(ProcId != NIL_RTPROCESS, VERR_GVMM_BROKEN_IPRT); 755 755 756 756 /* … … 927 927 } 928 928 else 929 rc = VERR_ INTERNAL_ERROR;929 rc = VERR_GVMM_IPE_1; 930 930 } 931 931 else … … 1066 1066 LogFlow(("GVMMR0DestroyVM: pVM=%p\n", pVM)); 1067 1067 PGVMM pGVMM; 1068 GVMM_GET_VALID_INSTANCE(pGVMM, VERR_ INTERNAL_ERROR);1068 GVMM_GET_VALID_INSTANCE(pGVMM, VERR_GVMM_INSTANCE); 1069 1069 1070 1070 … … 1118 1118 pHandle, pHandle->pVM, pHandle->hEMT0, pHandle->ProcId, pHandle->pvObj, pVM, hSelf); 1119 1119 gvmmR0CreateDestroyUnlock(pGVMM); 1120 rc = VERR_ INTERNAL_ERROR;1120 rc = VERR_GVMM_IPE_2; 1121 1121 } 1122 1122 … … 1391 1391 RTPROCESS ProcId = RTProcSelf(); 1392 1392 PGVMM pGVMM; 1393 GVMM_GET_VALID_INSTANCE(pGVMM, VERR_ INTERNAL_ERROR);1393 GVMM_GET_VALID_INSTANCE(pGVMM, VERR_GVMM_INSTANCE); 1394 1394 1395 1395 /* … … 1484 1484 { 1485 1485 PGVMM pGVMM; 1486 GVMM_GET_VALID_INSTANCE(pGVMM, VERR_ INTERNAL_ERROR);1486 GVMM_GET_VALID_INSTANCE(pGVMM, VERR_GVMM_INSTANCE); 1487 1487 1488 1488 /* … … 1503 1503 RTPROCESS ProcId = RTProcSelf(); 1504 1504 AssertReturn(pHandle->ProcId == ProcId, VERR_NOT_OWNER); 1505 AssertPtrReturn(pHandle->pvObj, VERR_ INTERNAL_ERROR);1505 AssertPtrReturn(pHandle->pvObj, VERR_NOT_OWNER); 1506 1506 1507 1507 PGVM pGVM = pHandle->pGVM; 1508 AssertPtrReturn(pGVM, VERR_ INTERNAL_ERROR);1509 AssertReturn(pGVM->pVM == pVM, VERR_ INTERNAL_ERROR);1508 AssertPtrReturn(pGVM, VERR_NOT_OWNER); 1509 AssertReturn(pGVM->pVM == pVM, VERR_NOT_OWNER); 1510 1510 RTNATIVETHREAD hAllegedEMT = RTThreadNativeSelf(); 1511 1511 AssertReturn(idCpu < pGVM->cCpus, VERR_INVALID_CPU_ID); 1512 AssertReturn(pGVM->aCpus[idCpu].hEMT == hAllegedEMT, VERR_ INTERNAL_ERROR);1512 AssertReturn(pGVM->aCpus[idCpu].hEMT == hAllegedEMT, VERR_NOT_OWNER); 1513 1513 1514 1514 *ppGVM = pGVM; … … 2352 2352 else 2353 2353 { 2354 GVMM_GET_VALID_INSTANCE(pGVMM, VERR_ INTERNAL_ERROR);2354 GVMM_GET_VALID_INSTANCE(pGVMM, VERR_GVMM_INSTANCE); 2355 2355 memset(&pStats->SchedVM, 0, sizeof(pStats->SchedVM)); 2356 2356 … … 2501 2501 else 2502 2502 { 2503 GVMM_GET_VALID_INSTANCE(pGVMM, VERR_ INTERNAL_ERROR);2503 GVMM_GET_VALID_INSTANCE(pGVMM, VERR_GVMM_INSTANCE); 2504 2504 2505 2505 int rc = gvmmR0UsedLock(pGVMM); -
trunk/src/VBox/VMM/VMMR0/HWACCMR0.cpp
r39078 r39402 926 926 * notification. Kind of unlikely though, so ignored for now. 927 927 */ 928 AssertReturn(!g_HvmR0.fEnabled, VERR_ INTERNAL_ERROR_3);928 AssertReturn(!g_HvmR0.fEnabled, VERR_HM_ALREADY_ENABLED_IPE); 929 929 ASMAtomicWriteBool(&g_HvmR0.fEnabled, true); 930 930 -
trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp
r39078 r39402 280 280 SVM_VMCB *pVMCB = (SVM_VMCB *)pVM->aCpus[i].hwaccm.s.svm.pVMCB; 281 281 282 AssertMsgReturn(pVMCB, ("Invalid pVMCB\n"), VERR_ EM_INTERNAL_ERROR);282 AssertMsgReturn(pVMCB, ("Invalid pVMCB\n"), VERR_HMSVM_INVALID_PVMCB); 283 283 284 284 /* Program the control fields. Most of them never have to be changed again. */ … … 661 661 662 662 pVMCB = (SVM_VMCB *)pVCpu->hwaccm.s.svm.pVMCB; 663 AssertMsgReturn(pVMCB, ("Invalid pVMCB\n"), VERR_ EM_INTERNAL_ERROR);663 AssertMsgReturn(pVMCB, ("Invalid pVMCB\n"), VERR_HMSVM_INVALID_PVMCB); 664 664 665 665 /* Guest CPU context: ES, CS, SS, DS, FS, GS. */ … … 979 979 980 980 pVMCB = (SVM_VMCB *)pVCpu->hwaccm.s.svm.pVMCB; 981 AssertMsgReturn(pVMCB, ("Invalid pVMCB\n"), VERR_ EM_INTERNAL_ERROR);981 AssertMsgReturn(pVMCB, ("Invalid pVMCB\n"), VERR_HMSVM_INVALID_PVMCB); 982 982 983 983 /* We can jump to this point to resume execution after determining that a VM-exit is innocent. … … 1850 1850 default: 1851 1851 AssertMsgFailed(("Unexpected vm-exit caused by exception %x\n", vector)); 1852 rc = VERR_ EM_INTERNAL_ERROR;1852 rc = VERR_HMSVM_UNEXPECTED_XCPT_EXIT; 1853 1853 break; 1854 1854 … … 2516 2516 default: 2517 2517 /* Unexpected exit codes. */ 2518 rc = VERR_ EM_INTERNAL_ERROR;2518 rc = VERR_HMSVM_UNEXPECTED_EXIT; 2519 2519 AssertMsgFailed(("Unexpected exit code %x\n", exitCode)); /* Can't happen. */ 2520 2520 break; … … 2620 2620 break; 2621 2621 default: 2622 AssertMsgFailedReturn(("Unexpected type %d\n", pPatch->enmType), VERR_ INTERNAL_ERROR);2622 AssertMsgFailedReturn(("Unexpected type %d\n", pPatch->enmType), VERR_HMSVM_UNEXPECTED_PATCH_TYPE); 2623 2623 } 2624 2624 } … … 2793 2793 2794 2794 pVMCB = (SVM_VMCB *)pVCpu->hwaccm.s.svm.pVMCB; 2795 AssertMsgReturn(pVMCB, ("Invalid pVMCB\n"), VERR_ EM_INTERNAL_ERROR);2795 AssertMsgReturn(pVMCB, ("Invalid pVMCB\n"), VERR_HMSVM_INVALID_PVMCB); 2796 2796 2797 2797 #if HC_ARCH_BITS == 32 -
trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
r39078 r39402 2138 2138 default: 2139 2139 AssertFailed(); 2140 return VERR_ INTERNAL_ERROR;2140 return VERR_HM_UNEXPECTED_LD_ST_MSR; 2141 2141 } 2142 2142 } … … 4817 4817 RTHCUINTREG uOldEFlags; 4818 4818 4819 AssertReturn(pVM->hwaccm.s.pfnHost32ToGuest64R0, VERR_ INTERNAL_ERROR);4819 AssertReturn(pVM->hwaccm.s.pfnHost32ToGuest64R0, VERR_HM_NO_32_TO_64_SWITCHER); 4820 4820 Assert(pfnHandler); 4821 4821 Assert(pVCpu->hwaccm.s.vmx.VMCSCache.Write.cValidEntries <= RT_ELEMENTS(pVCpu->hwaccm.s.vmx.VMCSCache.Write.aField)); -
trunk/src/VBox/VMM/VMMR0/PGMR0.cpp
r39078 r39402 80 80 */ 81 81 uint32_t iFirst = pVM->pgm.s.cHandyPages; 82 AssertReturn(iFirst <= RT_ELEMENTS(pVM->pgm.s.aHandyPages), VERR_ INTERNAL_ERROR);82 AssertReturn(iFirst <= RT_ELEMENTS(pVM->pgm.s.aHandyPages), VERR_PGM_HANDY_PAGE_IPE); 83 83 uint32_t cPages = RT_ELEMENTS(pVM->pgm.s.aHandyPages) - iFirst; 84 84 if (!cPages) … … 589 589 #else 590 590 AssertLogRelFailed(); 591 return VERR_ INTERNAL_ERROR_4;592 #endif 593 } 594 591 return VERR_PGM_NOT_USED_IN_MODE; 592 #endif 593 } 594 -
trunk/src/VBox/VMM/VMMR0/VMMR0JmpA-amd64.asm
r37227 r39402 21 21 %include "VBox/asmdefs.mac" 22 22 %include "VMMInternal.mac" 23 %include " iprt/err.mac"23 %include "VBox/err.mac" 24 24 %include "VBox/param.mac" 25 25 … … 173 173 174 174 .entry_error: 175 mov eax, VERR_ INTERNAL_ERROR_2175 mov eax, VERR_VMM_SET_JMP_ERROR 176 176 jmp .proper_return 177 177 178 178 .stack_overflow: 179 mov eax, VERR_ INTERNAL_ERROR_5179 mov eax, VERR_VMM_SET_JMP_STACK_OVERFLOW 180 180 jmp .proper_return 181 181 … … 195 195 mov r14, [xDX + VMMR0JMPBUF.r14] 196 196 mov r15, [xDX + VMMR0JMPBUF.r15] 197 mov eax, VERR_ INTERNAL_ERROR_3 ; todo better return code!197 mov eax, VERR_VMM_SET_JMP_ABORTED_RESUME 198 198 leave 199 199 ret … … 413 413 .magic_ok: 414 414 %endif 415 mov eax, VERR_ INTERNAL_ERROR_4415 mov eax, VERR_VMM_LONG_JMP_ERROR 416 416 %ifdef RT_OS_WINDOWS 417 417 add rsp, 0a0h ; skip XMM registers since they are unmodified. -
trunk/src/VBox/VMM/VMMR0/VMMR0JmpA-x86.asm
r35334 r39402 179 179 180 180 .entry_error: 181 mov eax, VERR_ INTERNAL_ERROR_2181 mov eax, VERR_VMM_SET_JMP_ERROR 182 182 jmp .proper_return 183 183 184 184 .stack_overflow: 185 mov eax, VERR_ INTERNAL_ERROR_5185 mov eax, VERR_VMM_SET_JMP_STACK_OVERFLOW 186 186 mov edx, ebx 187 187 jmp .proper_return 188 188 189 189 .stack_overflow_almost: 190 mov eax, VERR_ INTERNAL_ERROR190 mov eax, VERR_VMM_SET_JMP_STACK_OVERFLOW 191 191 mov edx, ebx 192 192 jmp .proper_return … … 200 200 mov esi, [xDX + VMMR0JMPBUF.esi] 201 201 mov ebx, [xDX + VMMR0JMPBUF.ebx] 202 mov eax, VERR_ INTERNAL_ERROR_3 ; todo better return code!202 mov eax, VERR_VMM_SET_JMP_ABORTED_RESUME 203 203 ret 204 204 … … 373 373 pop esi 374 374 pop edi 375 mov eax, VERR_ INTERNAL_ERROR_4375 mov eax, VERR_VMM_LONG_JMP_ERROR 376 376 leave 377 377 ret
Note:
See TracChangeset
for help on using the changeset viewer.