VirtualBox

Changeset 39402 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Nov 23, 2011 4:25:04 PM (13 years ago)
Author:
vboxsync
Message:

VMM: don't use generic IPE status codes, use specific ones. Part 1.

Location:
trunk/src/VBox/VMM
Files:
49 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/EMAll.cpp

    r39078 r39402  
    218218 * @returns VBox status code, see SELMToFlatEx and EMInterpretDisasOneEx for
    219219 *          details.
    220  * @retval  VERR_INTERNAL_ERROR on DISCoreOneEx failure.
     220 * @retval  VERR_EM_INTERNAL_DISAS_ERROR on DISCoreOneEx failure.
    221221 *
    222222 * @param   pVM             The VM handle.
     
    246246 *
    247247 * @returns VBox status code.
    248  * @retval  VERR_INTERNAL_ERROR on DISCoreOneEx failure.
     248 * @retval  VERR_EM_INTERNAL_DISAS_ERROR on DISCoreOneEx failure.
    249249 *
    250250 * @param   pVM             The VM handle.
     
    291291        return VINF_SUCCESS;
    292292    AssertMsgFailed(("DISCoreOne failed to GCPtrInstr=%RGv rc=%Rrc\n", GCPtrInstr, rc));
    293     return VERR_INTERNAL_ERROR;
     293    return VERR_EM_INTERNAL_DISAS_ERROR;
    294294}
    295295
  • trunk/src/VBox/VMM/VMMAll/IEMAll.cpp

    r39302 r39402  
    154154/** Used to shut up GCC warnings about variables that 'may be used uninitialized'
    155155 * due to GCC lacking knowledge about the value range of a switch. */
    156 #define IEM_NOT_REACHED_DEFAULT_CASE_RET() default: AssertFailedReturn(VERR_INTERNAL_ERROR_4)
     156#define IEM_NOT_REACHED_DEFAULT_CASE_RET() default: AssertFailedReturn(VERR_IPE_NOT_REACHED_DEFAULT_CASE)
    157157
    158158/**
  • trunk/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp

    r39178 r39402  
    9595    AssertReturn(   (pRange->fFlags & IOMMMIO_FLAGS_WRITE_MODE) != IOMMMIO_FLAGS_WRITE_PASSTHRU
    9696                 || (pRange->fFlags & IOMMMIO_FLAGS_WRITE_MODE) <= IOMMMIO_FLAGS_WRITE_DWORD_QWORD_READ_MISSING,
    97                  VERR_INTERNAL_ERROR_5);
    98     AssertReturn(cbValue != 0 && cbValue <= 16, VERR_INTERNAL_ERROR_4);
     97                 VERR_IOM_MMIO_IPE_1);
     98    AssertReturn(cbValue != 0 && cbValue <= 16, VERR_IOM_MMIO_IPE_2);
    9999    RTGCPHYS const GCPhysStart  = GCPhys; NOREF(GCPhysStart);
    100100    bool const     fReadMissing = (pRange->fFlags & IOMMMIO_FLAGS_WRITE_MODE) >= IOMMMIO_FLAGS_WRITE_DWORD_READ_MISSING;
     
    189189                break;
    190190            default:
    191                 AssertFailedReturn(VERR_INTERNAL_ERROR_3);
     191                AssertFailedReturn(VERR_IOM_MMIO_IPE_3);
    192192        }
    193193        if (offAccess)
     
    296296    AssertReturn(   (pRange->fFlags & IOMMMIO_FLAGS_READ_MODE) == IOMMMIO_FLAGS_READ_DWORD
    297297                 || (pRange->fFlags & IOMMMIO_FLAGS_READ_MODE) == IOMMMIO_FLAGS_READ_DWORD_QWORD,
    298                  VERR_INTERNAL_ERROR_5);
    299     AssertReturn(cbValue != 0 && cbValue <= 16, VERR_INTERNAL_ERROR_4);
     298                 VERR_IOM_MMIO_IPE_1);
     299    AssertReturn(cbValue != 0 && cbValue <= 16, VERR_IOM_MMIO_IPE_2);
    300300    RTGCPHYS const GCPhysStart = GCPhys; NOREF(GCPhysStart);
    301301
     
    17881788     */
    17891789    PIOMMMIORANGE pRange = iomMmioGetRange(pVM, GCPhys);
    1790     AssertMsg(pRange, ("Handlers and page tables are out of sync or something! GCPhys=%RGp cbValue=%d\n", GCPhys, cbValue));
    17911790    if (!pRange)
    17921791    {
     1792        AssertMsgFailed(("Handlers and page tables are out of sync or something! GCPhys=%RGp cbValue=%d\n", GCPhys, cbValue));
    17931793        IOM_UNLOCK(pVM);
    1794         return VERR_INTERNAL_ERROR;
     1794        return VERR_IOM_MMIO_RANGE_NOT_FOUND;
    17951795    }
    17961796#ifdef VBOX_WITH_STATISTICS
     
    19171917     */
    19181918    PIOMMMIORANGE pRange = iomMmioGetRange(pVM, GCPhys);
    1919     AssertMsg(pRange, ("Handlers and page tables are out of sync or something! GCPhys=%RGp cbValue=%d\n", GCPhys, cbValue));
    19201919    if (!pRange)
    19211920    {
     1921        AssertMsgFailed(("Handlers and page tables are out of sync or something! GCPhys=%RGp cbValue=%d\n", GCPhys, cbValue));
    19221922        IOM_UNLOCK(pVM);
    1923         return VERR_INTERNAL_ERROR;
     1923        return VERR_IOM_MMIO_RANGE_NOT_FOUND;
    19241924    }
    19251925#ifdef VBOX_WITH_STATISTICS
  • trunk/src/VBox/VMM/VMMAll/PDMAll.cpp

    r39060 r39402  
    352352{
    353353#ifdef IN_RING3
    354     int rc = PDMCritSectEnter(&pVM->pdm.s.CritSect, VERR_INTERNAL_ERROR);
     354    int rc = PDMCritSectEnter(&pVM->pdm.s.CritSect, VERR_IGNORED);
    355355#else
    356356    int rc = PDMCritSectEnter(&pVM->pdm.s.CritSect, VERR_GENERAL_FAILURE);
     
    402402        Log(("PDMVMMDevHeapR3ToGCPhys: pv=%p pvVMMDevHeap=%p cbVMMDevHeap=%#x\n",
    403403             pv, pVM->pdm.s.pvVMMDevHeap, pVM->pdm.s.cbVMMDevHeap));
    404         return VERR_INTERNAL_ERROR_3;
     404        return VERR_PDM_DEV_HEAP_R3_TO_GCPHYS;
    405405    }
    406406
  • trunk/src/VBox/VMM/VMMAll/PDMAllCritSect.cpp

    r39078 r39402  
    482482VMMR3DECL(int) PDMR3CritSectEnterEx(PPDMCRITSECT pCritSect, bool fCallRing3)
    483483{
    484     int rc = PDMCritSectEnter(pCritSect, VERR_INTERNAL_ERROR);
     484    int rc = PDMCritSectEnter(pCritSect, VERR_IGNORED);
    485485    if (    rc == VINF_SUCCESS
    486486        &&  fCallRing3
  • trunk/src/VBox/VMM/VMMAll/PGMAll.cpp

    r39078 r39402  
    996996    {
    997997        pShwPage = pgmPoolGetPage(pPool, pPdpe->u & X86_PDPE_PG_MASK);
    998         AssertReturn(pShwPage, VERR_INTERNAL_ERROR);
     998        AssertReturn(pShwPage, VERR_PGM_POOL_GET_PAGE_FAILED);
    999999        Assert((pPdpe->u & X86_PDPE_PG_MASK) == pShwPage->Core.Key);
    10001000
     
    10321032    /* Fetch the pgm pool shadow descriptor. */
    10331033    PPGMPOOLPAGE pShwPde = pgmPoolGetPage(pVM->pgm.s.CTX_SUFF(pPool), pPdpt->a[iPdPt].u & X86_PDPE_PG_MASK);
    1034     AssertReturn(pShwPde, VERR_INTERNAL_ERROR);
     1034    AssertReturn(pShwPde, VERR_PGM_POOL_GET_PAGE_FAILED);
    10351035
    10361036    *ppShwPde = pShwPde;
     
    10951095    {
    10961096        pShwPage = pgmPoolGetPage(pPool, pPml4e->u & X86_PML4E_PG_MASK);
    1097         AssertReturn(pShwPage, VERR_INTERNAL_ERROR);
     1097        AssertReturn(pShwPage, VERR_PGM_POOL_GET_PAGE_FAILED);
    10981098
    10991099        pgmPoolCacheUsed(pPool, pShwPage);
     
    11321132    {
    11331133        pShwPage = pgmPoolGetPage(pPool, pPdpe->u & X86_PDPE_PG_MASK);
    1134         AssertReturn(pShwPage, VERR_INTERNAL_ERROR);
     1134        AssertReturn(pShwPage, VERR_PGM_POOL_GET_PAGE_FAILED);
    11351135
    11361136        pgmPoolCacheUsed(pPool, pShwPage);
     
    11601160    PGM_LOCK_ASSERT_OWNER(pVCpu->CTX_SUFF(pVM));
    11611161
    1162     AssertReturn(pPml4e, VERR_INTERNAL_ERROR);
     1162    AssertReturn(pPml4e, VERR_PGM_PML4_MAPPING);
    11631163    if (ppPml4e)
    11641164        *ppPml4e = (PX86PML4E)pPml4e;
     
    11721172    PPGMPOOL        pPool    = pVM->pgm.s.CTX_SUFF(pPool);
    11731173    PPGMPOOLPAGE    pShwPage = pgmPoolGetPage(pPool, pPml4e->u & X86_PML4E_PG_MASK);
    1174     AssertReturn(pShwPage, VERR_INTERNAL_ERROR);
     1174    AssertReturn(pShwPage, VERR_PGM_POOL_GET_PAGE_FAILED);
    11751175
    11761176    const unsigned  iPdPt = (GCPtr >> X86_PDPT_SHIFT) & X86_PDPT_MASK_AMD64;
     
    11801180
    11811181    pShwPage = pgmPoolGetPage(pPool, pPdpt->a[iPdPt].u & X86_PDPE_PG_MASK);
    1182     AssertReturn(pShwPage, VERR_INTERNAL_ERROR);
     1182    AssertReturn(pShwPage, VERR_PGM_POOL_GET_PAGE_FAILED);
    11831183
    11841184    *ppPD = (PX86PDPAE)PGMPOOL_PAGE_2_PTR_V2(pVM, pVCpu, pShwPage);
     
    12281228    {
    12291229        pShwPage = pgmPoolGetPage(pPool, pPml4e->u & EPT_PML4E_PG_MASK);
    1230         AssertReturn(pShwPage, VERR_INTERNAL_ERROR);
     1230        AssertReturn(pShwPage, VERR_PGM_POOL_GET_PAGE_FAILED);
    12311231
    12321232        pgmPoolCacheUsed(pPool, pShwPage);
     
    12571257    {
    12581258        pShwPage = pgmPoolGetPage(pPool, pPdpe->u & EPT_PDPTE_PG_MASK);
    1259         AssertReturn(pShwPage, VERR_INTERNAL_ERROR);
     1259        AssertReturn(pShwPage, VERR_PGM_POOL_GET_PAGE_FAILED);
    12601260
    12611261        pgmPoolCacheUsed(pPool, pShwPage);
     
    13231323
    13241324        default:
    1325             AssertMsgFailedReturn(("%d\n", enmShwPagingMode), VERR_INTERNAL_ERROR_5);
     1325            AssertMsgFailedReturn(("%d\n", enmShwPagingMode), VERR_IPE_NOT_REACHED_DEFAULT_CASE);
    13261326    }
    13271327    return rc;
     
    20542054        }
    20552055        AssertRCReturn(rc, rc);
    2056         AssertRCSuccessReturn(rc, VERR_INTERNAL_ERROR);
     2056        AssertRCSuccessReturn(rc, VERR_IPE_UNEXPECTED_INFO_STATUS);
    20572057    }
    20582058
  • trunk/src/VBox/VMM/VMMAll/PGMAllBth.h

    r39301 r39402  
    588588    rc = pgmShwSyncPaePDPtr(pVCpu, pvFault, X86_PDPE_P, &pPDDst);       /* RW, US and A are reserved in PAE mode. */
    589589#   endif
    590     AssertMsgReturn(rc == VINF_SUCCESS, ("rc=%Rrc\n", rc), RT_FAILURE_NP(rc) ? rc : VERR_INTERNAL_ERROR_4);
     590    AssertMsgReturn(rc == VINF_SUCCESS, ("rc=%Rrc\n", rc), RT_FAILURE_NP(rc) ? rc : VERR_IPE_UNEXPECTED_INFO_STATUS);
    591591
    592592#  elif PGM_SHW_TYPE == PGM_TYPE_AMD64
     
    599599    rc = pgmShwSyncLongModePDPtr(pVCpu, pvFault, GstWalk.Pml4e.u, GstWalk.Pdpe.u, &pPDDst);
    600600#   endif
    601     AssertMsgReturn(rc == VINF_SUCCESS, ("rc=%Rrc\n", rc), RT_FAILURE_NP(rc) ? rc : VERR_INTERNAL_ERROR_4);
     601    AssertMsgReturn(rc == VINF_SUCCESS, ("rc=%Rrc\n", rc), RT_FAILURE_NP(rc) ? rc : VERR_IPE_UNEXPECTED_INFO_STATUS);
    602602
    603603#  elif PGM_SHW_TYPE == PGM_TYPE_EPT
     
    605605    PEPTPD          pPDDst;
    606606    rc = pgmShwGetEPTPDPtr(pVCpu, pvFault, NULL, &pPDDst);
    607     AssertMsgReturn(rc == VINF_SUCCESS, ("rc=%Rrc\n", rc), RT_FAILURE_NP(rc) ? rc : VERR_INTERNAL_ERROR_4);
     607    AssertMsgReturn(rc == VINF_SUCCESS, ("rc=%Rrc\n", rc), RT_FAILURE_NP(rc) ? rc : VERR_IPE_UNEXPECTED_INFO_STATUS);
    608608#  endif
    609609    Assert(pPDDst);
     
    10911091    NOREF(uErr); NOREF(pRegFrame); NOREF(pvFault);
    10921092    AssertReleaseMsgFailed(("Shw=%d Gst=%d is not implemented!\n", PGM_GST_TYPE, PGM_SHW_TYPE));
    1093     return VERR_INTERNAL_ERROR;
     1093    return VERR_PGM_NOT_USED_IN_MODE;
    10941094# endif
    10951095}
     
    22762276    NOREF(PdeSrc);
    22772277    AssertReleaseMsgFailed(("Shw=%d Gst=%d is not implemented!\n", PGM_GST_TYPE, PGM_SHW_TYPE));
    2278     return VERR_INTERNAL_ERROR;
     2278    return VERR_PGM_NOT_USED_IN_MODE;
    22792279#endif
    22802280}
     
    27412741        }
    27422742        else
    2743             AssertMsgFailedReturn(("rc=%Rrc\n", rc), VERR_INTERNAL_ERROR);
     2743            AssertMsgFailedReturn(("rc=%Rrc\n", rc), RT_FAILURE_NP(rc) ? rc : VERR_IPE_UNEXPECTED_INFO_STATUS);
    27442744        /** @todo Why do we bother preserving X86_PDE_AVL_MASK here?
    27452745         * Both PGM_PDFLAGS_MAPPING and PGM_PDFLAGS_TRACK_DIRTY should be
     
    31703170    {
    31713171       STAM_PROFILE_STOP(&pVCpu->pgm.s.CTX_SUFF(pStats)->CTX_MID_Z(Stat,SyncPT), a);
    3172        AssertMsgFailedReturn(("rc=%Rrc\n", rc), VERR_INTERNAL_ERROR);
     3172       AssertMsgFailedReturn(("rc=%Rrc\n", rc), RT_FAILURE_NP(rc) ? rc : VERR_IPE_UNEXPECTED_INFO_STATUS);
    31733173    }
    31743174
     
    32193219    NOREF(iPDSrc); NOREF(pPDSrc);
    32203220    AssertReleaseMsgFailed(("Shw=%d Gst=%d is not implemented!\n", PGM_SHW_TYPE, PGM_GST_TYPE));
    3221     return VERR_INTERNAL_ERROR;
     3221    return VERR_PGM_NOT_USED_IN_MODE;
    32223222#endif
    32233223}
     
    35533553
    35543554    AssertReleaseMsgFailed(("Shw=%d Gst=%d is not implemented!\n", PGM_GST_TYPE, PGM_SHW_TYPE));
    3555     return VERR_INTERNAL_ERROR;
     3555    return VERR_PGM_NOT_USED_IN_MODE;
    35563556#endif /* PGM_SHW_TYPE == PGM_TYPE_EPT || PGM_SHW_TYPE == PGM_TYPE_NESTED */
    35573557}
     
    44354435    pgmLock(pVM);
    44364436    PPGMPAGE    pPageCR3 = pgmPhysGetPage(pVM, GCPhysCR3);
    4437     AssertReturn(pPageCR3, VERR_INTERNAL_ERROR_2);
     4437    AssertReturn(pPageCR3, VERR_PGM_INVALID_CR3_ADDR);
    44384438    HCPhysGuestCR3 = PGM_PAGE_GET_HCPHYS(pPageCR3);
    44394439    /** @todo this needs some reworking wrt. locking?  */
     
    44844484                    pgmLock(pVM);
    44854485                    PPGMPAGE    pPage  = pgmPhysGetPage(pVM, GCPhys);
    4486                     AssertReturn(pPage, VERR_INTERNAL_ERROR_2);
     4486                    AssertReturn(pPage, VERR_PGM_INVALID_PDPE_ADDR);
    44874487                    HCPhys = PGM_PAGE_GET_HCPHYS(pPage);
    44884488#  if defined(IN_RC) || defined(VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0)
  • trunk/src/VBox/VMM/VMMAll/PGMAllHandler.cpp

    r39078 r39402  
    727727            }
    728728            AssertMsgFailed(("whu?\n"));
    729             rc = VERR_INTERNAL_ERROR;
     729            rc = VERR_PGM_PHYS_HANDLER_IPE;
    730730        }
    731731        else
     
    792792
    793793                    Assert(pCur3 == pCur2);
    794                     rc = VERR_INTERNAL_ERROR;
     794                    rc = VERR_PGM_PHYS_HANDLER_IPE;
    795795                }
    796796                else
     
    915915            default:
    916916                AssertMsgFailed(("Invalid type %d! Corruption!\n",  pCur->enmType));
    917                 rc = VERR_INTERNAL_ERROR;
     917                rc = VERR_PGM_PHYS_HANDLER_IPE;
    918918                break;
    919919        }
  • trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp

    r39294 r39402  
    116116                }
    117117            }
    118             else if (RT_UNLIKELY(rc == VERR_INTERNAL_ERROR))
     118            else if (RT_UNLIKELY(rc == VERR_EM_INTERNAL_DISAS_ERROR))
    119119                return rc;
    120120            break;
     
    135135            AssertMsgFailedReturn(("enmProt=%d iPage=%d GCPhysFault=%RGp\n",
    136136                                   pRom->aPages[iPage].enmProt, iPage, GCPhysFault),
    137                                   VERR_INTERNAL_ERROR);
     137                                  VERR_IPE_NOT_REACHED_DEFAULT_CASE);
    138138    }
    139139
     
    513513                            &&  pVM->pgm.s.cHandyPages <= RT_ELEMENTS(pVM->pgm.s.aHandyPages),
    514514                            ("%u\n", pVM->pgm.s.cHandyPages),
    515                             VERR_INTERNAL_ERROR);
     515                            VERR_PGM_HANDY_PAGE_IPE);
    516516        }
    517517        else
     
    10291029    if (idChunk == NIL_GMM_CHUNKID)
    10301030    {
    1031         AssertMsgReturn(PGM_PAGE_GET_PAGEID(pPage) == NIL_GMM_PAGEID, ("pPage=%R[pgmpage]\n", pPage), VERR_INTERNAL_ERROR_2);
     1031        AssertMsgReturn(PGM_PAGE_GET_PAGEID(pPage) == NIL_GMM_PAGEID, ("pPage=%R[pgmpage]\n", pPage), VERR_PGM_PHYS_PAGE_MAP_IPE_1);
    10321032        if (PGM_PAGE_GET_TYPE(pPage) == PGMPAGETYPE_MMIO2)
    10331033        {
    10341034            /* Lookup the MMIO2 range and use pvR3 to calc the address. */
    10351035            PPGMRAMRANGE pRam = pgmPhysGetRange(pVM, GCPhys);
    1036             AssertMsgReturn(pRam || !pRam->pvR3, ("pRam=%p pPage=%R[pgmpage]\n", pRam, pPage), VERR_INTERNAL_ERROR_2);
     1036            AssertMsgReturn(pRam || !pRam->pvR3, ("pRam=%p pPage=%R[pgmpage]\n", pRam, pPage), VERR_PGM_PHYS_PAGE_MAP_IPE_2);
    10371037            *ppv = (void *)((uintptr_t)pRam->pvR3 + (uintptr_t)((GCPhys & ~(RTGCPHYS)PAGE_OFFSET_MASK) - pRam->GCPhys));
    10381038        }
     
    10431043             * them, that would also avoid this mess. It would actually be kind of
    10441044             * elegant... */
    1045             AssertLogRelMsgFailedReturn(("%RGp\n", GCPhys), VERR_INTERNAL_ERROR_3);
     1045            AssertLogRelMsgFailedReturn(("%RGp\n", GCPhys), VERR_PGM_MAP_MMIO2_ALIAS_MMIO);
    10461046        }
    10471047        else
    10481048        {
    10491049            /** @todo handle MMIO2 */
    1050             AssertMsgReturn(PGM_PAGE_IS_ZERO(pPage), ("pPage=%R[pgmpage]\n", pPage), VERR_INTERNAL_ERROR_2);
     1050            AssertMsgReturn(PGM_PAGE_IS_ZERO(pPage), ("pPage=%R[pgmpage]\n", pPage), VERR_PGM_PHYS_PAGE_MAP_IPE_3);
    10511051            AssertMsgReturn(PGM_PAGE_GET_HCPHYS(pPage) == pVM->pgm.s.HCPhysZeroPg,
    10521052                            ("pPage=%R[pgmpage]\n", pPage),
    1053                             VERR_INTERNAL_ERROR_2);
     1053                            VERR_PGM_PHYS_PAGE_MAP_IPE_4);
    10541054            *ppv = pVM->pgm.s.CTXALLSUFF(pvZeroPg);
    10551055        }
     
    13061306{
    13071307    int rc;
    1308     AssertReturn(pPage, VERR_INTERNAL_ERROR);
     1308    AssertReturn(pPage, VERR_PGM_PHYS_NULL_PAGE_PARAM);
    13091309    PGM_LOCK_ASSERT_OWNER(pVM);
    13101310    pVM->pgm.s.cDeprecatedPageLocks++;
     
    14361436{
    14371437    int rc;
    1438     AssertReturn(pPage, VERR_INTERNAL_ERROR);
     1438    AssertReturn(pPage, VERR_PGM_PHYS_NULL_PAGE_PARAM);
    14391439    PGM_LOCK_ASSERT_OWNER(pVM);
    14401440
     
    14991499int pgmPhysGCPhys2CCPtrInternalReadOnly(PVM pVM, PPGMPAGE pPage, RTGCPHYS GCPhys, const void **ppv, PPGMPAGEMAPLOCK pLock)
    15001500{
    1501     AssertReturn(pPage, VERR_INTERNAL_ERROR);
     1501    AssertReturn(pPage, VERR_PGM_PHYS_NULL_PAGE_PARAM);
    15021502    PGM_LOCK_ASSERT_OWNER(pVM);
    15031503    Assert(PGM_PAGE_GET_HCPHYS(pPage) != 0);
  • trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp

    r39078 r39402  
    20302030        LogFlow(("pgmPoolCacheFreeOne: refuse CR3 mapping\n"));
    20312031        pgmPoolCacheUsed(pPool, pPage);
    2032         AssertLogRelReturn(iLoop < 8192, VERR_INTERNAL_ERROR);
     2032        AssertLogRelReturn(iLoop < 8192, VERR_PGM_POOL_TOO_MANY_LOOPS);
    20332033    }
    20342034
     
    49984998        }
    49994999        iNew = pPool->iFreeHead;
    5000         AssertReleaseReturn(iNew != NIL_PGMPOOL_IDX, VERR_INTERNAL_ERROR);
     5000        AssertReleaseReturn(iNew != NIL_PGMPOOL_IDX, VERR_PGM_POOL_IPE);
    50015001    }
    50025002
  • trunk/src/VBox/VMM/VMMAll/PGMAllShw.h

    r39078 r39402  
    306306
    307307        PPGMMAPPING pMap = pgmGetMapping(pVM, (RTGCPTR)GCPtr);
    308         AssertMsgReturn(pMap, ("GCPtr=%RGv\n", GCPtr), VERR_INTERNAL_ERROR);
     308        AssertMsgReturn(pMap, ("GCPtr=%RGv\n", GCPtr), VERR_PGM_MAPPING_IPE);
    309309#  if PGM_SHW_TYPE == PGM_TYPE_32BIT
    310310        pPT = pMap->aPTs[(GCPtr - pMap->GCPtr) >> X86_PD_SHIFT].CTX_SUFF(pPT);
  • trunk/src/VBox/VMM/VMMAll/TMAll.cpp

    r39078 r39402  
    13471347    AssertMsgFailed(("Failed waiting for stable state. state=%d (%s)\n", pTimer->enmState, R3STRING(pTimer->pszDesc)));
    13481348    STAM_PROFILE_STOP(&pVM->tm.s.CTX_SUFF_Z(StatTimerSet), a);
    1349     return VERR_INTERNAL_ERROR;
     1349    return VERR_TM_TIMER_UNSTABLE_STATE;
    13501350}
    13511351
     
    16931693        {
    16941694            AssertMsgFailed(("Failed waiting for stable state. state=%d (%s)\n", pTimer->enmState, R3STRING(pTimer->pszDesc)));
    1695             rc = VERR_INTERNAL_ERROR;
     1695            rc = VERR_TM_TIMER_UNSTABLE_STATE;
    16961696            tmTimerSetRelativeNowWorker(pVM, enmClock, pu64Now);
    16971697            break;
     
    19221922    AssertMsgFailed(("Failed waiting for stable state. state=%d (%s)\n", pTimer->enmState, R3STRING(pTimer->pszDesc)));
    19231923    STAM_PROFILE_STOP(&pVM->tm.s.CTX_SUFF_Z(StatTimerStop), a);
    1924     return VERR_INTERNAL_ERROR;
     1924    return VERR_TM_TIMER_UNSTABLE_STATE;
    19251925}
    19261926
     
    21192119        default:
    21202120            AssertMsgFailed(("Invalid enmClock=%d\n", pTimer->enmClock));
    2121             return VERR_INTERNAL_ERROR;
     2121            return VERR_TM_TIMER_BAD_CLOCK;
    21222122    }
    21232123}
     
    21492149        default:
    21502150            AssertMsgFailed(("Invalid enmClock=%d\n", pTimer->enmClock));
    2151             return VERR_INTERNAL_ERROR;
     2151            return VERR_TM_TIMER_BAD_CLOCK;
    21522152    }
    21532153}
     
    21792179        default:
    21802180            AssertMsgFailed(("Invalid enmClock=%d\n", pTimer->enmClock));
    2181             return VERR_INTERNAL_ERROR;
     2181            return VERR_TM_TIMER_BAD_CLOCK;
    21822182    }
    21832183}
  • trunk/src/VBox/VMM/VMMAll/TMAllCpu.cpp

    r39078 r39402  
    7676    }
    7777    AssertFailed();
    78     return VERR_INTERNAL_ERROR;
     78    return VERR_TM_TSC_ALREADY_TICKING;
    7979}
    8080
     
    9696    }
    9797    AssertFailed();
    98     return VERR_INTERNAL_ERROR;
     98    return VERR_TM_TSC_ALREADY_PAUSED;
    9999}
    100100
  • trunk/src/VBox/VMM/VMMAll/TMAllVirtual.cpp

    r39078 r39402  
    964964 * Worker for TMR3PauseClocks.
    965965 *
    966  * @returns VINF_SUCCESS or VERR_INTERNAL_ERROR (asserted).
     966 * @returns VINF_SUCCESS or VERR_TM_VIRTUAL_TICKING_IPE (asserted).
    967967 * @param   pVM     The VM handle.
    968968 */
     
    970970{
    971971    uint32_t c = ASMAtomicDecU32(&pVM->tm.s.cVirtualTicking);
    972     AssertMsgReturn(c < pVM->cCpus, ("%u vs %u\n", c, pVM->cCpus), VERR_INTERNAL_ERROR);
     972    AssertMsgReturn(c < pVM->cCpus, ("%u vs %u\n", c, pVM->cCpus), VERR_TM_VIRTUAL_TICKING_IPE);
    973973    if (c == 0)
    974974    {
     
    984984 * Worker for TMR3ResumeClocks.
    985985 *
    986  * @returns VINF_SUCCESS or VERR_INTERNAL_ERROR (asserted).
     986 * @returns VINF_SUCCESS or VERR_TM_VIRTUAL_TICKING_IPE (asserted).
    987987 * @param   pVM     The VM handle.
    988988 */
     
    990990{
    991991    uint32_t c = ASMAtomicIncU32(&pVM->tm.s.cVirtualTicking);
    992     AssertMsgReturn(c <= pVM->cCpus, ("%u vs %u\n", c, pVM->cCpus), VERR_INTERNAL_ERROR);
     992    AssertMsgReturn(c <= pVM->cCpus, ("%u vs %u\n", c, pVM->cCpus), VERR_TM_VIRTUAL_TICKING_IPE);
    993993    if (c == 1)
    994994    {
  • trunk/src/VBox/VMM/VMMR0/GMMR0.cpp

    r39084 r39402  
    595595
    596596/** 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.
    598600 *
    599601 * @param   pGMM    The name of the pGMM variable.
    600  * @param   rc      The return value on failure. Use VERR_INTERNAL_ERROR for
    601  *                  VBox status codes.
     602 * @param   rc      The return value on failure. Use VERR_GMM_INSTANCE for VBox
     603 *                  status codes.
    602604 */
    603605#define GMM_GET_VALID_INSTANCE(pGMM, rc) \
     
    608610    } while (0)
    609611
    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.
    612616 *
    613617 * @param   pGMM    The name of the pGMM variable.
     
    10971101static int gmmR0ChunkMutexDropGiant(PGMMR0CHUNKMTXSTATE pMtxState)
    10981102{
    1099     AssertReturn(pMtxState->fFlags == GMMR0CHUNK_MTX_KEEP_GIANT, VERR_INTERNAL_ERROR_2);
     1103    AssertReturn(pMtxState->fFlags == GMMR0CHUNK_MTX_KEEP_GIANT, VERR_GMM_MTX_FLAGS);
    11001104    Assert(pMtxState->pGMM->hMtxOwner == RTThreadNativeSelf());
    11011105    pMtxState->fFlags = GMMR0CHUNK_MTX_RETAKE_GIANT;
     
    14581462     */
    14591463    PGMM pGMM;
    1460     GMM_GET_VALID_INSTANCE(pGMM, VERR_INTERNAL_ERROR);
     1464    GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE);
    14611465    PGVM pGVM;
    14621466    int rc = GVMMR0ByVMAndEMT(pVM, idCpu, &pGVM);
     
    15021506    }
    15031507    else
    1504         rc = VERR_INTERNAL_ERROR_5;
     1508        rc = VERR_GMM_IS_NOT_SANE;
    15051509    gmmR0MutexRelease(pGMM);
    15061510    LogFlow(("GMMR0InitialReservation: returns %Rrc\n", rc));
     
    15551559     */
    15561560    PGMM pGMM;
    1557     GMM_GET_VALID_INSTANCE(pGMM, VERR_INTERNAL_ERROR);
     1561    GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE);
    15581562    PGVM pGVM;
    15591563    int rc = GVMMR0ByVMAndEMT(pVM, idCpu, &pGVM);
     
    15961600    }
    15971601    else
    1598         rc = VERR_INTERNAL_ERROR_5;
     1602        rc = VERR_GMM_IS_NOT_SANE;
    15991603    gmmR0MutexRelease(pGMM);
    16001604    LogFlow(("GMMR0UpdateReservation: returns %Rrc\n", rc));
     
    20702074
    20712075                /* bail out */
    2072                 rc = VERR_INTERNAL_ERROR;
     2076                rc = VERR_GMM_CHUNK_INSERT;
    20732077            }
    20742078            else
    2075                 rc = VERR_INTERNAL_ERROR_5;
     2079                rc = VERR_GMM_IS_NOT_SANE;
    20762080            gmmR0MutexRelease(pGMM);
    20772081        }
     
    24152419            break;
    24162420        default:
    2417             AssertMsgFailedReturn(("enmAccount=%d\n", enmAccount), VERR_INTERNAL_ERROR);
     2421            AssertMsgFailedReturn(("enmAccount=%d\n", enmAccount), VERR_IPE_NOT_REACHED_DEFAULT_CASE);
    24182422    }
    24192423
     
    24392443        case GMMACCOUNT_SHADOW: pGVM->gmm.s.Allocated.cShadowPages += cPages; break;
    24402444        case GMMACCOUNT_FIXED:  pGVM->gmm.s.Allocated.cFixedPages  += cPages; break;
    2441         default:                AssertMsgFailedReturn(("enmAccount=%d\n", enmAccount), VERR_INTERNAL_ERROR);
     2445        default:                AssertMsgFailedReturn(("enmAccount=%d\n", enmAccount), VERR_IPE_NOT_REACHED_DEFAULT_CASE);
    24422446    }
    24432447    pGVM->gmm.s.cPrivatePages += cPages;
     
    24512455    {
    24522456        iPage = gmmR0AllocatePagesInBoundMode(pGVM, iPage, cPages, paPages);
    2453         AssertReleaseReturn(iPage == cPages, VERR_INTERNAL_ERROR_3);
     2457        AssertReleaseReturn(iPage == cPages, VERR_GMM_ALLOC_PAGES_IPE);
    24542458        return VINF_SUCCESS;
    24552459    }
     
    25282532            case GMMACCOUNT_SHADOW: pGVM->gmm.s.Allocated.cShadowPages -= cPages; break;
    25292533            case GMMACCOUNT_FIXED:  pGVM->gmm.s.Allocated.cFixedPages  -= cPages; break;
    2530             default:                AssertMsgFailedReturn(("enmAccount=%d\n", enmAccount), VERR_INTERNAL_ERROR);
     2534            default:                AssertMsgFailedReturn(("enmAccount=%d\n", enmAccount), VERR_IPE_NOT_REACHED_DEFAULT_CASE);
    25312535        }
    25322536
     
    25992603     */
    26002604    PGMM pGMM;
    2601     GMM_GET_VALID_INSTANCE(pGMM, VERR_INTERNAL_ERROR);
     2605    GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE);
    26022606    PGVM pGVM;
    26032607    int rc = GVMMR0ByVMAndEMT(pVM, idCpu, &pGVM);
     
    27552759    }
    27562760    else
    2757         rc = VERR_INTERNAL_ERROR_5;
     2761        rc = VERR_GMM_IS_NOT_SANE;
    27582762    gmmR0MutexRelease(pGMM);
    27592763    LogFlow(("GMMR0AllocateHandyPages: returns %Rrc\n", rc));
     
    27932797     */
    27942798    PGMM pGMM;
    2795     GMM_GET_VALID_INSTANCE(pGMM, VERR_INTERNAL_ERROR);
     2799    GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE);
    27962800    PGVM pGVM;
    27972801    int rc = GVMMR0ByVMAndEMT(pVM, idCpu, &pGVM);
     
    28302834    }
    28312835    else
    2832         rc = VERR_INTERNAL_ERROR_5;
     2836        rc = VERR_GMM_IS_NOT_SANE;
    28332837    gmmR0MutexRelease(pGMM);
    28342838    LogFlow(("GMMR0AllocatePages: returns %Rrc\n", rc));
     
    28922896     */
    28932897    PGMM pGMM;
    2894     GMM_GET_VALID_INSTANCE(pGMM, VERR_INTERNAL_ERROR);
     2898    GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE);
    28952899    PGVM pGVM;
    28962900    int rc = GVMMR0ByVMAndEMT(pVM, idCpu, &pGVM);
     
    29692973    {
    29702974        gmmR0MutexRelease(pGMM);
    2971         rc = VERR_INTERNAL_ERROR_5;
     2975        rc = VERR_GMM_IS_NOT_SANE;
    29722976    }
    29732977
     
    29932997     */
    29942998    PGMM pGMM;
    2995     GMM_GET_VALID_INSTANCE(pGMM, VERR_INTERNAL_ERROR);
     2999    GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE);
    29963000    PGVM pGVM;
    29973001    int rc = GVMMR0ByVMAndEMT(pVM, idCpu, &pGVM);
     
    30363040    }
    30373041    else
    3038         rc = VERR_INTERNAL_ERROR_5;
     3042        rc = VERR_GMM_IS_NOT_SANE;
    30393043
    30403044    gmmR0MutexRelease(pGMM);
     
    33103314            break;
    33113315        default:
    3312             AssertMsgFailedReturn(("enmAccount=%d\n", enmAccount), VERR_INTERNAL_ERROR);
     3316            AssertMsgFailedReturn(("enmAccount=%d\n", enmAccount), VERR_IPE_NOT_REACHED_DEFAULT_CASE);
    33133317    }
    33143318
     
    33813385        case GMMACCOUNT_FIXED:  pGVM->gmm.s.Allocated.cFixedPages  -= iPage; break;
    33823386        default:
    3383             AssertMsgFailedReturn(("enmAccount=%d\n", enmAccount), VERR_INTERNAL_ERROR);
     3387            AssertMsgFailedReturn(("enmAccount=%d\n", enmAccount), VERR_IPE_NOT_REACHED_DEFAULT_CASE);
    33843388    }
    33853389
     
    34153419     */
    34163420    PGMM pGMM;
    3417     GMM_GET_VALID_INSTANCE(pGMM, VERR_INTERNAL_ERROR);
     3421    GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE);
    34183422    PGVM pGVM;
    34193423    int rc = GVMMR0ByVMAndEMT(pVM, idCpu, &pGVM);
     
    34403444    }
    34413445    else
    3442         rc = VERR_INTERNAL_ERROR_5;
     3446        rc = VERR_GMM_IS_NOT_SANE;
    34433447    gmmR0MutexRelease(pGMM);
    34443448    LogFlow(("GMMR0FreePages: returns %Rrc\n", rc));
     
    35073511     */
    35083512    PGMM pGMM;
    3509     GMM_GET_VALID_INSTANCE(pGMM, VERR_INTERNAL_ERROR);
     3513    GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE);
    35103514    PGVM pGVM;
    35113515    int rc = GVMMR0ByVMAndEMT(pVM, idCpu, &pGVM);
     
    36063610    }
    36073611    else
    3608         rc = VERR_INTERNAL_ERROR_5;
     3612        rc = VERR_GMM_IS_NOT_SANE;
    36093613
    36103614    gmmR0MutexRelease(pGMM);
     
    36583662     */
    36593663    PGMM pGMM;
    3660     GMM_GET_VALID_INSTANCE(pGMM, VERR_INTERNAL_ERROR);
     3664    GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE);
    36613665    pReq->cAllocPages     = pGMM->cAllocatedPages;
    36623666    pReq->cFreePages      = (pGMM->cChunks << (GMM_CHUNK_SHIFT- PAGE_SHIFT)) - pGMM->cAllocatedPages;
     
    36923696     */
    36933697    PGMM pGMM;
    3694     GMM_GET_VALID_INSTANCE(pGMM, VERR_INTERNAL_ERROR);
     3698    GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE);
    36953699    PGVM pGVM;
    36963700    int rc = GVMMR0ByVMAndEMT(pVM, idCpu, &pGVM);
     
    37103714    }
    37113715    else
    3712         rc = VERR_INTERNAL_ERROR_5;
     3716        rc = VERR_GMM_IS_NOT_SANE;
    37133717
    37143718    gmmR0MutexRelease(pGMM);
     
    39773981     */
    39783982    PGMM pGMM;
    3979     GMM_GET_VALID_INSTANCE(pGMM, VERR_INTERNAL_ERROR);
     3983    GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE);
    39803984    PGVM pGVM;
    39813985    int rc = GVMMR0ByVM(pVM, &pGVM);
     
    40424046    }
    40434047    else
    4044         rc = VERR_INTERNAL_ERROR_5;
     4048        rc = VERR_GMM_IS_NOT_SANE;
    40454049    gmmR0MutexRelease(pGMM);
    40464050
     
    40874091     */
    40884092    PGMM pGMM;
    4089     GMM_GET_VALID_INSTANCE(pGMM, VERR_INTERNAL_ERROR);
     4093    GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE);
    40904094    PGVM pGVM;
    40914095    int rc = GVMMR0ByVMAndEMT(pVM, idCpu, &pGVM);
     
    41744178     */
    41754179    PGMM pGMM;
    4176     GMM_GET_VALID_INSTANCE(pGMM, VERR_INTERNAL_ERROR);
     4180    GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE);
    41774181    PGVM pGVM;
    41784182    int rc = GVMMR0ByVMAndEMT(pVM, idCpu, &pGVM);
     
    43224326    }
    43234327    else
    4324         rc = VERR_INTERNAL_ERROR_5;
     4328        rc = VERR_GMM_IS_NOT_SANE;
    43254329
    43264330end:
     
    43784382     */
    43794383    PGMM pGMM;
    4380     GMM_GET_VALID_INSTANCE(pGMM, VERR_INTERNAL_ERROR);
     4384    GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE);
    43814385    PGVM pGVM;
    43824386    int rc = GVMMR0ByVMAndEMT(pVM, idCpu, &pGVM);
     
    44434447    }
    44444448    else
    4445         rc = VERR_INTERNAL_ERROR_5;
     4449        rc = VERR_GMM_IS_NOT_SANE;
    44464450
    44474451    gmmR0MutexRelease(pGMM);
     
    45534557    int rc = VINF_SUCCESS;
    45544558    PGMM pGMM;
    4555     GMM_GET_VALID_INSTANCE(pGMM, VERR_INTERNAL_ERROR);
     4559    GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE);
    45564560    unsigned cPages = pModule->aRegions[idxRegion].cbRegion >> PAGE_SHIFT;
    45574561
     
    47014705 * RTAvlGCPtrDestroy callback.
    47024706 *
    4703  * @returns 0 or VERR_INTERNAL_ERROR.
     4707 * @returns 0 or VERR_GMM_INSTANCE.
    47044708 * @param   pNode   The node to destroy.
    47054709 * @param   pvGVM   The GVM handle.
     
    47274731            /* Remove from the tree and free memory. */
    47284732            PGMM pGMM;
    4729             GMM_GET_VALID_INSTANCE(pGMM, VERR_INTERNAL_ERROR);
     4733            GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE);
    47304734            RTAvlGCPtrRemove(&pGMM->pGlobalSharedModuleTree, pRec->Core.Key);
    47314735            RTMemFree(pRec);
     
    47724776     */
    47734777    PGMM pGMM;
    4774     GMM_GET_VALID_INSTANCE(pGMM, VERR_INTERNAL_ERROR);
     4778    GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE);
    47754779    PGVM pGVM;
    47764780    int rc = GVMMR0ByVMAndEMT(pVM, idCpu, &pGVM);
     
    47914795    }
    47924796    else
    4793         rc = VERR_INTERNAL_ERROR_5;
     4797        rc = VERR_GMM_IS_NOT_SANE;
    47944798
    47954799    gmmR0MutexRelease(pGMM);
     
    48454849     */
    48464850    PGMM pGMM;
    4847     GMM_GET_VALID_INSTANCE(pGMM, VERR_INTERNAL_ERROR);
     4851    GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE);
    48484852
    48494853    /*
     
    48524856    gmmR0MutexAcquire(pGMM);
    48534857    if (!GMM_CHECK_SANITY_UPON_ENTERING(pGMM))
    4854         rc = VERR_INTERNAL_ERROR_5;
     4858        rc = VERR_GMM_IS_NOT_SANE;
    48554859    else
    48564860        rc = VINF_SUCCESS;
     
    48714875     */
    48724876    PGMM pGMM;
    4873     GMM_GET_VALID_INSTANCE(pGMM, VERR_INTERNAL_ERROR);
     4877    GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE);
    48744878
    48754879    gmmR0MutexRelease(pGMM);
     
    48934897     */
    48944898    PGMM pGMM;
    4895     GMM_GET_VALID_INSTANCE(pGMM, VERR_INTERNAL_ERROR);
     4899    GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE);
    48964900    PGVM pGVM;
    48974901    int rc = GVMMR0ByVMAndEMT(pVM, pVCpu->idCpu, &pGVM);
     
    49234927    }
    49244928    else
    4925         rc = VERR_INTERNAL_ERROR_5;
     4929        rc = VERR_GMM_IS_NOT_SANE;
    49264930
    49274931# ifndef DEBUG_sandervl
     
    50075011
    50085012    PGMM pGMM;
    5009     GMM_GET_VALID_INSTANCE(pGMM, VERR_INTERNAL_ERROR);
     5013    GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE);
    50105014
    50115015    PGVM pGVM;
     
    50525056    }
    50535057    else
    5054         rc = VERR_INTERNAL_ERROR_5;
     5058        rc = VERR_GMM_IS_NOT_SANE;
    50555059
    50565060    gmmR0MutexRelease(pGMM);
  • trunk/src/VBox/VMM/VMMR0/GVMMR0.cpp

    r39303 r39402  
    272272 *
    273273 * @param   pGVMM   The name of the pGVMM variable.
    274  * @param   rc      The return value on failure. Use VERR_INTERNAL_ERROR for
    275  *                  VBox status codes.
     274 * @param   rc      The return value on failure. Use VERR_GVMM_INSTANCE for VBox
     275 *                  status codes.
    276276 */
    277277#define GVMM_GET_VALID_INSTANCE(pGVMM, rc) \
     
    322322     */
    323323    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);
    325325
    326326    PGVMM pGVMM = (PGVMM)RTMemAllocZ(RT_UOFFSETOF(GVMM, aHostCpus[cHostCpus]));
     
    535535     */
    536536    PGVMM pGVMM;
    537     GVMM_GET_VALID_INSTANCE(pGVMM, VERR_INTERNAL_ERROR);
     537    GVMM_GET_VALID_INSTANCE(pGVMM, VERR_GVMM_INSTANCE);
    538538    AssertPtrReturn(pSession, VERR_INVALID_HANDLE);
    539539    AssertPtrReturn(pszName, VERR_INVALID_POINTER);
     
    602602     */
    603603    PGVMM pGVMM;
    604     GVMM_GET_VALID_INSTANCE(pGVMM, VERR_INTERNAL_ERROR);
     604    GVMM_GET_VALID_INSTANCE(pGVMM, VERR_GVMM_INSTANCE);
    605605    AssertPtrReturn(pSession, VERR_INVALID_HANDLE);
    606606    AssertPtrReturn(pszName, VERR_INVALID_POINTER);
     
    740740    LogFlow(("GVMMR0CreateVM: pSession=%p\n", pSession));
    741741    PGVMM pGVMM;
    742     GVMM_GET_VALID_INSTANCE(pGVMM, VERR_INTERNAL_ERROR);
     742    GVMM_GET_VALID_INSTANCE(pGVMM, VERR_GVMM_INSTANCE);
    743743
    744744    AssertPtrReturn(ppVM, VERR_INVALID_POINTER);
     
    750750
    751751    RTNATIVETHREAD hEMT0 = RTThreadNativeSelf();
    752     AssertReturn(hEMT0 != NIL_RTNATIVETHREAD, VERR_INTERNAL_ERROR);
     752    AssertReturn(hEMT0 != NIL_RTNATIVETHREAD, VERR_GVMM_BROKEN_IPRT);
    753753    RTNATIVETHREAD ProcId = RTProcSelf();
    754     AssertReturn(ProcId != NIL_RTPROCESS, VERR_INTERNAL_ERROR);
     754    AssertReturn(ProcId != NIL_RTPROCESS, VERR_GVMM_BROKEN_IPRT);
    755755
    756756    /*
     
    927927        }
    928928        else
    929             rc = VERR_INTERNAL_ERROR;
     929            rc = VERR_GVMM_IPE_1;
    930930    }
    931931    else
     
    10661066    LogFlow(("GVMMR0DestroyVM: pVM=%p\n", pVM));
    10671067    PGVMM pGVMM;
    1068     GVMM_GET_VALID_INSTANCE(pGVMM, VERR_INTERNAL_ERROR);
     1068    GVMM_GET_VALID_INSTANCE(pGVMM, VERR_GVMM_INSTANCE);
    10691069
    10701070
     
    11181118                    pHandle, pHandle->pVM, pHandle->hEMT0, pHandle->ProcId, pHandle->pvObj, pVM, hSelf);
    11191119        gvmmR0CreateDestroyUnlock(pGVMM);
    1120         rc = VERR_INTERNAL_ERROR;
     1120        rc = VERR_GVMM_IPE_2;
    11211121    }
    11221122
     
    13911391    RTPROCESS ProcId = RTProcSelf();
    13921392    PGVMM pGVMM;
    1393     GVMM_GET_VALID_INSTANCE(pGVMM, VERR_INTERNAL_ERROR);
     1393    GVMM_GET_VALID_INSTANCE(pGVMM, VERR_GVMM_INSTANCE);
    13941394
    13951395    /*
     
    14841484{
    14851485    PGVMM pGVMM;
    1486     GVMM_GET_VALID_INSTANCE(pGVMM, VERR_INTERNAL_ERROR);
     1486    GVMM_GET_VALID_INSTANCE(pGVMM, VERR_GVMM_INSTANCE);
    14871487
    14881488    /*
     
    15031503    RTPROCESS ProcId = RTProcSelf();
    15041504    AssertReturn(pHandle->ProcId == ProcId, VERR_NOT_OWNER);
    1505     AssertPtrReturn(pHandle->pvObj, VERR_INTERNAL_ERROR);
     1505    AssertPtrReturn(pHandle->pvObj, VERR_NOT_OWNER);
    15061506
    15071507    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);
    15101510    RTNATIVETHREAD hAllegedEMT = RTThreadNativeSelf();
    15111511    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);
    15131513
    15141514    *ppGVM = pGVM;
     
    23522352    else
    23532353    {
    2354         GVMM_GET_VALID_INSTANCE(pGVMM, VERR_INTERNAL_ERROR);
     2354        GVMM_GET_VALID_INSTANCE(pGVMM, VERR_GVMM_INSTANCE);
    23552355        memset(&pStats->SchedVM, 0, sizeof(pStats->SchedVM));
    23562356
     
    25012501    else
    25022502    {
    2503         GVMM_GET_VALID_INSTANCE(pGVMM, VERR_INTERNAL_ERROR);
     2503        GVMM_GET_VALID_INSTANCE(pGVMM, VERR_GVMM_INSTANCE);
    25042504
    25052505        int rc = gvmmR0UsedLock(pGVMM);
  • trunk/src/VBox/VMM/VMMR0/HWACCMR0.cpp

    r39078 r39402  
    926926     *       notification.  Kind of unlikely though, so ignored for now.
    927927     */
    928     AssertReturn(!g_HvmR0.fEnabled, VERR_INTERNAL_ERROR_3);
     928    AssertReturn(!g_HvmR0.fEnabled, VERR_HM_ALREADY_ENABLED_IPE);
    929929    ASMAtomicWriteBool(&g_HvmR0.fEnabled, true);
    930930
  • trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp

    r39078 r39402  
    280280        SVM_VMCB *pVMCB = (SVM_VMCB *)pVM->aCpus[i].hwaccm.s.svm.pVMCB;
    281281
    282         AssertMsgReturn(pVMCB, ("Invalid pVMCB\n"), VERR_EM_INTERNAL_ERROR);
     282        AssertMsgReturn(pVMCB, ("Invalid pVMCB\n"), VERR_HMSVM_INVALID_PVMCB);
    283283
    284284        /* Program the control fields. Most of them never have to be changed again. */
     
    661661
    662662    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);
    664664
    665665    /* Guest CPU context: ES, CS, SS, DS, FS, GS. */
     
    979979
    980980    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);
    982982
    983983    /* We can jump to this point to resume execution after determining that a VM-exit is innocent.
     
    18501850        default:
    18511851            AssertMsgFailed(("Unexpected vm-exit caused by exception %x\n", vector));
    1852             rc = VERR_EM_INTERNAL_ERROR;
     1852            rc = VERR_HMSVM_UNEXPECTED_XCPT_EXIT;
    18531853            break;
    18541854
     
    25162516    default:
    25172517        /* Unexpected exit codes. */
    2518         rc = VERR_EM_INTERNAL_ERROR;
     2518        rc = VERR_HMSVM_UNEXPECTED_EXIT;
    25192519        AssertMsgFailed(("Unexpected exit code %x\n", exitCode));                 /* Can't happen. */
    25202520        break;
     
    26202620            break;
    26212621        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);
    26232623        }
    26242624    }
     
    27932793
    27942794        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);
    27962796
    27972797#if HC_ARCH_BITS == 32
  • trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp

    r39078 r39402  
    21382138        default:
    21392139            AssertFailed();
    2140             return VERR_INTERNAL_ERROR;
     2140            return VERR_HM_UNEXPECTED_LD_ST_MSR;
    21412141        }
    21422142    }
     
    48174817    RTHCUINTREG     uOldEFlags;
    48184818
    4819     AssertReturn(pVM->hwaccm.s.pfnHost32ToGuest64R0, VERR_INTERNAL_ERROR);
     4819    AssertReturn(pVM->hwaccm.s.pfnHost32ToGuest64R0, VERR_HM_NO_32_TO_64_SWITCHER);
    48204820    Assert(pfnHandler);
    48214821    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  
    8080     */
    8181    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);
    8383    uint32_t cPages = RT_ELEMENTS(pVM->pgm.s.aHandyPages) - iFirst;
    8484    if (!cPages)
     
    589589#else
    590590    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  
    2121%include "VBox/asmdefs.mac"
    2222%include "VMMInternal.mac"
    23 %include "iprt/err.mac"
     23%include "VBox/err.mac"
    2424%include "VBox/param.mac"
    2525
     
    173173
    174174.entry_error:
    175     mov     eax, VERR_INTERNAL_ERROR_2
     175    mov     eax, VERR_VMM_SET_JMP_ERROR
    176176    jmp     .proper_return
    177177
    178178.stack_overflow:
    179     mov     eax, VERR_INTERNAL_ERROR_5
     179    mov     eax, VERR_VMM_SET_JMP_STACK_OVERFLOW
    180180    jmp     .proper_return
    181181
     
    195195    mov     r14, [xDX + VMMR0JMPBUF.r14]
    196196    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
    198198    leave
    199199    ret
     
    413413.magic_ok:
    414414%endif
    415     mov     eax, VERR_INTERNAL_ERROR_4
     415    mov     eax, VERR_VMM_LONG_JMP_ERROR
    416416%ifdef RT_OS_WINDOWS
    417417    add     rsp, 0a0h                   ; skip XMM registers since they are unmodified.
  • trunk/src/VBox/VMM/VMMR0/VMMR0JmpA-x86.asm

    r35334 r39402  
    179179
    180180.entry_error:
    181     mov     eax, VERR_INTERNAL_ERROR_2
     181    mov     eax, VERR_VMM_SET_JMP_ERROR
    182182    jmp     .proper_return
    183183
    184184.stack_overflow:
    185     mov     eax, VERR_INTERNAL_ERROR_5
     185    mov     eax, VERR_VMM_SET_JMP_STACK_OVERFLOW
    186186    mov     edx, ebx
    187187    jmp     .proper_return
    188188
    189189.stack_overflow_almost:
    190     mov     eax, VERR_INTERNAL_ERROR
     190    mov     eax, VERR_VMM_SET_JMP_STACK_OVERFLOW
    191191    mov     edx, ebx
    192192    jmp     .proper_return
     
    200200    mov     esi, [xDX + VMMR0JMPBUF.esi]
    201201    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
    203203    ret
    204204
     
    373373    pop     esi
    374374    pop     edi
    375     mov     eax, VERR_INTERNAL_ERROR_4
     375    mov     eax, VERR_VMM_LONG_JMP_ERROR
    376376    leave
    377377    ret
  • trunk/src/VBox/VMM/VMMR3/HWACCM.cpp

    r39078 r39402  
    25612561
    25622562    default:
    2563         AssertFailed();
    2564         return VERR_INTERNAL_ERROR;
     2563        AssertLogRelFailedReturn(VERR_INTERNAL_ERROR);
    25652564    }
    25662565
  • trunk/src/VBox/VMM/VMMR3/IOM.cpp

    r39111 r39402  
    952952                    AssertMsgFailed(("This cannot happen!\n"));
    953953                    MMHyperFree(pVM, pRangeNew);
    954                     rc = VERR_INTERNAL_ERROR;
     954                    rc = VERR_IOM_IOPORT_IPE_1;
    955955                }
    956956                break;
     
    10351035                    AssertMsgFailed(("This cannot happen!\n"));
    10361036                    MMHyperFree(pVM, pRangeNew);
    1037                     rc = VERR_INTERNAL_ERROR;
     1037                    rc = VERR_IOM_IOPORT_IPE_1;
    10381038                }
    10391039                break;
     
    11171117                    AssertMsgFailed(("This cannot happen!\n"));
    11181118                    MMHyperFree(pVM, pRangeNew);
    1119                     rc = VERR_INTERNAL_ERROR;
     1119                    rc = VERR_IOM_IOPORT_IPE_1;
    11201120                }
    11211121                break;
     
    11531153        default:
    11541154            AssertReleaseMsgFailed(("cb=%d\n", cb));
    1155             return VERR_INTERNAL_ERROR;
     1155            return VERR_IOM_IOPORT_IPE_2;
    11561156    }
    11571157    return VINF_SUCCESS;
     
    14891489            DBGFR3Info(pVM, "mmio", NULL, NULL);
    14901490            AssertMsgFailed(("This cannot happen!\n"));
    1491             rc = VERR_INTERNAL_ERROR;
     1491            rc = VERR_IOM_IOPORT_IPE_3;
    14921492        }
    14931493        else
  • trunk/src/VBox/VMM/VMMR3/MMHyper.cpp

    r39078 r39402  
    582582                RTHCPHYS HCPhys;
    583583                rc = PGMR3PhysMMIO2GetHCPhys(pVM, pDevIns, iRegion, offCur, &HCPhys);
    584                 AssertRCReturn(rc, VERR_INTERNAL_ERROR);
     584                AssertRCReturn(rc, rc);
    585585                rc = PGMMap(pVM, GCPtr + (offCur - off), HCPhys, PAGE_SIZE, 0);
    586586                if (RT_FAILURE(rc))
  • trunk/src/VBox/VMM/VMMR3/PDM.cpp

    r39078 r39402  
    739739{
    740740    LogFlow(("pdmR3LiveExec:\n"));
    741     AssertReturn(uPass == 0, VERR_INTERNAL_ERROR_4);
     741    AssertReturn(uPass == 0, VERR_SSM_UNEXPECTED_PASS);
    742742    pdmR3SaveBoth(pVM, pSSM);
    743743    return VINF_SSM_DONT_CALL_AGAIN;
  • trunk/src/VBox/VMM/VMMR3/PDMCritSect.cpp

    r37466 r39402  
    429429    PVM             pVM   = pCritSect->s.pVMR3;
    430430    PUVM            pUVM  = pVM->pUVM;
    431     AssertReleaseReturn(pVM, VERR_INTERNAL_ERROR);
     431    AssertReleaseReturn(pVM, VERR_PDM_CRITSECT_IPE);
    432432    PPDMCRITSECTINT pPrev = NULL;
    433433    RTCritSectEnter(&pUVM->pdm.s.ListCritSect);
     
    448448    RTCritSectLeave(&pUVM->pdm.s.ListCritSect);
    449449    AssertReleaseMsgFailed(("pCritSect=%p wasn't found!\n", pCritSect));
    450     return VERR_INTERNAL_ERROR;
     450    return VERR_PDM_CRITSECT_NOT_FOUND;
    451451}
    452452
     
    518518
    519519#ifdef PDMCRITSECT_STRICT
    520     int rc = PDMCritSectEnterDebug(pCritSect, VERR_INTERNAL_ERROR,
     520    int rc = PDMCritSectEnterDebug(pCritSect, VERR_IGNORED,
    521521                                   SrcPos.uId, SrcPos.pszFile, SrcPos.uLine, SrcPos.pszFunction);
    522522#else
    523     int rc = PDMCritSectEnter(pCritSect, VERR_INTERNAL_ERROR);
     523    int rc = PDMCritSectEnter(pCritSect, VERR_IGNORED);
    524524#endif
    525525    AssertLogRelRC(rc);
  • trunk/src/VBox/VMM/VMMR3/PDMDevHlp.cpp

    r39136 r39402  
    10931093         */
    10941094        AssertMsgFailed(("Only one PCI device per device is currently implemented!\n"));
    1095         return VERR_INTERNAL_ERROR;
     1095        return VERR_PDM_ONE_PCI_FUNCTION_PER_DEVICE;
    10961096    }
    10971097
     
    11361136        if (RT_SUCCESS(rc))
    11371137        {
    1138             if (u8Device > 31)
    1139             {
    1140                 AssertMsgFailed(("Configuration error: PCIDeviceNo=%d, max is 31. (%s/%d)\n",
    1141                                  u8Device, pDevIns->pReg->szName, pDevIns->iInstance));
    1142                 return VERR_INTERNAL_ERROR;
    1143             }
    1144 
    1145             uint8_t     u8Function;
     1138            AssertMsgReturn(u8Device <= 31,
     1139                            ("Configuration error: PCIDeviceNo=%d, max is 31. (%s/%d)\n",
     1140                             u8Device, pDevIns->pReg->szName, pDevIns->iInstance),
     1141                            VERR_PDM_BAD_PCI_CONFIG);
     1142
     1143            uint8_t u8Function;
    11461144            rc = CFGMR3QueryU8(pDevIns->Internal.s.pCfgHandle, "PCIFunctionNo", &u8Function);
    1147             if (RT_FAILURE(rc))
    1148             {
    1149                 AssertMsgFailed(("Configuration error: PCIDeviceNo, but PCIFunctionNo query failed with rc=%Rrc (%s/%d)\n",
    1150                                  rc, pDevIns->pReg->szName, pDevIns->iInstance));
    1151                 return rc;
    1152             }
    1153             if (u8Function > 7)
    1154             {
    1155                 AssertMsgFailed(("Configuration error: PCIFunctionNo=%d, max is 7. (%s/%d)\n",
    1156                                  u8Function, pDevIns->pReg->szName, pDevIns->iInstance));
    1157                 return VERR_INTERNAL_ERROR;
    1158             }
     1145            AssertMsgRCReturn(rc, ("Configuration error: PCIDeviceNo, but PCIFunctionNo query failed with rc=%Rrc (%s/%d)\n",
     1146                                   rc, pDevIns->pReg->szName, pDevIns->iInstance),
     1147                              rc);
     1148            AssertMsgReturn(u8Function <= 7,
     1149                            ("Configuration error: PCIFunctionNo=%d, max is 7. (%s/%d)\n",
     1150                             u8Function, pDevIns->pReg->szName, pDevIns->iInstance),
     1151                            VERR_PDM_BAD_PCI_CONFIG);
     1152
    11591153            iDev = (u8Device << 3) | u8Function;
    11601154        }
     
    16101604    VM_ASSERT_STATE_RETURN(pVM, VMSTATE_CREATING, VERR_WRONG_ORDER);
    16111605
    1612     AssertReturn(pDevIns->pCritSectRoR3, VERR_INTERNAL_ERROR_4);
     1606    AssertReturn(pDevIns->pCritSectRoR3, VERR_PDM_DEV_IPE_1);
    16131607    AssertReturn(pDevIns->pCritSectRoR3->s.fAutomaticDefaultCritsect, VERR_WRONG_ORDER);
    16141608    AssertReturn(!pDevIns->pCritSectRoR3->s.fUsedByTimerOrSimilar, VERR_WRONG_ORDER);
  • trunk/src/VBox/VMM/VMMR3/PDMDevMiscHlp.cpp

    r36820 r39402  
    579579        {
    580580            PPDMIHPETLEGACYNOTIFY pPort = PDMIBASE_QUERY_INTERFACE(pBase, PDMIHPETLEGACYNOTIFY);
    581             AssertLogRelMsgBreakStmt(pPort, ("%s\n", s_apszDevsToNotify[i]), rc = VERR_INTERNAL_ERROR_3);
     581            AssertLogRelMsgBreakStmt(pPort, ("%s\n", s_apszDevsToNotify[i]), rc = VERR_PDM_HPET_LEGACY_NOTIFY_MISSING);
    582582            pPort->pfnModeChanged(pPort, fActivated);
    583583        }
  • trunk/src/VBox/VMM/VMMR3/PDMThread.cpp

    r36437 r39402  
    8686        default:
    8787            AssertMsgFailed(("%d\n", pThread->Internal.s.enmType));
    88             rc = VERR_INTERNAL_ERROR;
     88            rc = VERR_PDM_THREAD_IPE_1;
    8989            break;
    9090    }
     
    156156                if (    RT_SUCCESS(rc)
    157157                    &&  pThread->enmState != PDMTHREADSTATE_SUSPENDED)
    158                     rc = VERR_INTERNAL_ERROR;
     158                    rc = VERR_PDM_THREAD_IPE_2;
    159159                if (RT_SUCCESS(rc))
    160160                {
     
    409409                default:
    410410                    AssertMsgFailed(("enmState=%d\n", enmState));
    411                     rc = VERR_INTERNAL_ERROR;
     411                    rc = VERR_PDM_THREAD_IPE_2;
    412412                    break;
    413413            }
     
    668668
    669669            if (RT_SUCCESS(rc))
    670                 rc = VERR_INTERNAL_ERROR;
     670                rc = VERR_PDM_THREAD_IPE_2;
    671671        }
    672672    }
     
    732732     * Assert sanity.
    733733     */
    734     AssertReturn(pThread->enmState > PDMTHREADSTATE_INVALID && pThread->enmState < PDMTHREADSTATE_TERMINATED, VERR_INTERNAL_ERROR);
    735     AssertReturn(pThread->Thread == RTThreadSelf(), VERR_INTERNAL_ERROR);
     734    AssertReturn(pThread->enmState > PDMTHREADSTATE_INVALID && pThread->enmState < PDMTHREADSTATE_TERMINATED, VERR_PDM_THREAD_IPE_2);
     735    AssertReturn(pThread->Thread == RTThreadSelf(), VERR_PDM_THREAD_INVALID_CALLER);
    736736
    737737    /*
     
    798798            default:
    799799                AssertMsgFailed(("%d\n", pThread->Internal.s.enmType));
    800                 rc = VERR_INTERNAL_ERROR;
     800                rc = VERR_PDM_THREAD_IPE_1;
    801801                break;
    802802        }
     
    947947                    if (    RT_SUCCESS(rc)
    948948                        &&  pThread->enmState != PDMTHREADSTATE_SUSPENDED)
    949                         rc = VERR_INTERNAL_ERROR;
     949                        rc = VERR_PDM_THREAD_IPE_2;
    950950                    if (RT_SUCCESS(rc))
    951951                        return rc;
     
    10401040                if (    RT_SUCCESS(rc)
    10411041                    &&  pThread->enmState != PDMTHREADSTATE_RUNNING)
    1042                     rc = VERR_INTERNAL_ERROR;
     1042                    rc = VERR_PDM_THREAD_IPE_2;
    10431043                if (RT_SUCCESS(rc))
    10441044                    return rc;
  • trunk/src/VBox/VMM/VMMR3/PGM.cpp

    r39084 r39402  
    22162216            }
    22172217#else
    2218             AssertLogRelReturn(!pVM->pgm.s.fPciPassthrough, VERR_INTERNAL_ERROR_5);
     2218            AssertLogRelReturn(!pVM->pgm.s.fPciPassthrough, VERR_PGM_PCI_PASSTHRU_MISCONFIG);
    22192219#endif
    22202220            break;
  • trunk/src/VBox/VMM/VMMR3/PGMMap.cpp

    r39078 r39402  
    551551    AssertMsgReturn(cb && !(cb & X86_PAGE_4M_OFFSET_MASK), ("cb (%#x) is 0 or not aligned on a 4MB address!\n", cb),
    552552                    VERR_INVALID_PARAMETER);
    553     AssertReturn(pgmMapAreMappingsEnabled(pVM), VERR_INTERNAL_ERROR_3);
    554     AssertReturn(pVM->cCpus == 1, VERR_INTERNAL_ERROR_4);
     553    AssertReturn(pgmMapAreMappingsEnabled(pVM), VERR_PGM_MAPPINGS_DISABLED);
     554    AssertReturn(pVM->cCpus == 1, VERR_PGM_MAPPINGS_SMP);
    555555
    556556    /*
     
    684684VMMR3DECL(int) PGMR3MappingsDisable(PVM pVM)
    685685{
    686     AssertReturn(!pVM->pgm.s.fMappingsFixed,            VERR_INTERNAL_ERROR_4);
    687     AssertReturn(!pVM->pgm.s.fMappingsFixedRestored,    VERR_INTERNAL_ERROR_4);
     686    AssertReturn(!pVM->pgm.s.fMappingsFixed,            VERR_PGM_MAPPINGS_FIXED);
     687    AssertReturn(!pVM->pgm.s.fMappingsFixedRestored,    VERR_PGM_MAPPINGS_FIXED);
    688688    if (pVM->pgm.s.fMappingsDisabled)
    689689        return VINF_SUCCESS;
  • trunk/src/VBox/VMM/VMMR3/PGMPhys.cpp

    r39084 r39402  
    33943394                AssertMsgFailedReturn(("enmProt=%d iPage=%d GCPhys=%RGp\n",
    33953395                                       pRom->aPages[iPage].enmProt, iPage, GCPhys),
    3396                                       VERR_INTERNAL_ERROR);
     3396                                      VERR_IPE_NOT_REACHED_DEFAULT_CASE);
    33973397        }
    33983398    }
     
    34323432                {
    34333433                    pShadowPage = pgmPhysGetPage(pVM, GCPhys);
    3434                     AssertLogRelReturn(pShadowPage, VERR_INTERNAL_ERROR);
     3434                    AssertLogRelReturn(pShadowPage, VERR_PGM_PHYS_PAGE_GET_IPE);
    34353435                }
    34363436
     
    34503450                AssertMsgFailedReturn(("enmProt=%d iPage=%d GCPhys=%RGp\n",
    34513451                                       pRom->aPages[iPage].enmProt, iPage, GCPhys),
    3452                                       VERR_INTERNAL_ERROR);
     3452                                      VERR_IPE_NOT_REACHED_DEFAULT_CASE);
    34533453        }
    34543454    }
     
    42404240     */
    42414241    uint32_t iClear = pVM->pgm.s.cHandyPages;
    4242     AssertMsgReturn(iClear <= RT_ELEMENTS(pVM->pgm.s.aHandyPages), ("%d", iClear), VERR_INTERNAL_ERROR);
     4242    AssertMsgReturn(iClear <= RT_ELEMENTS(pVM->pgm.s.aHandyPages), ("%d", iClear), VERR_PGM_HANDY_PAGE_IPE);
    42434243    Log(("PGMR3PhysAllocateHandyPages: %d -> %d\n", iClear, RT_ELEMENTS(pVM->pgm.s.aHandyPages)));
    42444244    int rcAlloc = VINF_SUCCESS;
  • trunk/src/VBox/VMM/VMMR3/PGMPool.cpp

    r39078 r39402  
    459459{
    460460    PPGMPOOL pPool = pVM->pgm.s.pPoolR3;
    461     AssertReturn(pPool->cCurPages < pPool->cMaxPages, VERR_INTERNAL_ERROR);
     461    AssertReturn(pPool->cCurPages < pPool->cMaxPages, VERR_PGM_POOL_MAXED_OUT_ALREADY);
    462462
    463463    pgmLock(pVM);
  • trunk/src/VBox/VMM/VMMR3/PGMSavedState.cpp

    r39082 r39402  
    19981998    {
    19991999        pgmUnlock(pVM);
    2000         AssertLogRelFailedReturn(VERR_INTERNAL_ERROR_2);
     2000        AssertLogRelFailedReturn(VERR_PGM_WRITE_MONITOR_ENGAGED);
    20012001    }
    20022002    pVM->pgm.s.fPhysWriteMonitoringEngaged = true;
     
    22662266        rc = pgmR3LoadPageBitsOld(pVM, pSSM, uType, pPage, GCPhys, pRam);
    22672267    else
    2268         rc = VERR_INTERNAL_ERROR;
     2268        rc = VERR_PGM_INVALID_SAVED_PAGE_STATE;
    22692269    AssertLogRelMsgRCReturn(rc, ("pPage=%R[pgmpage] uState=%d uType=%d GCPhys=%RGp %s rc=%Rrc\n",
    22702270                                 pPage, uState, uType, GCPhys, pRam->pszDesc, rc),
     
    22912291     */
    22922292    PPGMROMPAGE pRomPage = pgmR3GetRomPage(pVM, GCPhys);
    2293     AssertLogRelMsgReturn(pRomPage, ("GCPhys=%RGp %s\n", GCPhys, pRam->pszDesc), VERR_INTERNAL_ERROR);
     2293    AssertLogRelMsgReturn(pRomPage, ("GCPhys=%RGp %s\n", GCPhys, pRam->pszDesc), VERR_PGM_SAVED_ROM_PAGE_NOT_FOUND);
    22942294
    22952295    uint8_t uProt;
     
    23062306        rc = PGMR3PhysRomProtect(pVM, GCPhys, PAGE_SIZE, enmProt);
    23072307        AssertLogRelRCReturn(rc, rc);
    2308         AssertLogRelReturn(pRomPage->enmProt == enmProt, VERR_INTERNAL_ERROR);
     2308        AssertLogRelReturn(pRomPage->enmProt == enmProt, VERR_PGM_SAVED_ROM_PAGE_PROT);
    23092309    }
    23102310
     
    26772677                        }
    26782678
    2679                         AssertLogRelMsgReturn(PGM_PAGE_GET_STATE(pPage) == PGM_PAGE_STATE_ALLOCATED, ("GCPhys=%RGp %R[pgmpage]\n", GCPhys, pPage), VERR_INTERNAL_ERROR_5);
     2679                        AssertLogRelMsgReturn(PGM_PAGE_GET_STATE(pPage) == PGM_PAGE_STATE_ALLOCATED, ("GCPhys=%RGp %R[pgmpage]\n", GCPhys, pPage), VERR_PGM_UNEXPECTED_PAGE_STATE);
    26802680
    26812681                        /* If this is a ROM page, we must clear it and not try
     
    27172717                            AssertLogRelMsgReturn(   PGM_PAGE_GET_PDE_TYPE(pPage) != PGM_PAGE_PDE_TYPE_PDE
    27182718                                                  && PGM_PAGE_GET_PDE_TYPE(pPage) != PGM_PAGE_PDE_TYPE_PDE_DISABLED,
    2719                                                      ("GCPhys=%RGp %R[pgmpage]\n", GCPhys, pPage), VERR_INTERNAL_ERROR_5);
     2719                                                     ("GCPhys=%RGp %R[pgmpage]\n", GCPhys, pPage), VERR_PGM_LOAD_UNEXPECTED_PAGE_TYPE);
    27202720
    27212721                            rc = pgmPhysFreePage(pVM, pReq, &cPendingPages, pPage, GCPhys);
     
    27412741
    27422742                    default:
    2743                         AssertMsgFailedReturn(("%#x\n", u8), VERR_INTERNAL_ERROR);
     2743                        AssertMsgFailedReturn(("%#x\n", u8), VERR_PGM_SAVED_REC_TYPE);
    27442744                }
    27452745                id = UINT8_MAX;
     
    27712771                        if (pMmio2->idSavedState == id)
    27722772                            break;
    2773                     AssertLogRelMsgReturn(pMmio2, ("id=%#u iPage=%#x\n", id, iPage), VERR_INTERNAL_ERROR);
     2773                    AssertLogRelMsgReturn(pMmio2, ("id=%#u iPage=%#x\n", id, iPage), VERR_PGM_SAVED_MMIO2_RANGE_NOT_FOUND);
    27742774                }
    2775                 AssertLogRelMsgReturn(iPage < (pMmio2->RamRange.cb >> PAGE_SHIFT), ("iPage=%#x cb=%RGp %s\n", iPage, pMmio2->RamRange.cb, pMmio2->RamRange.pszDesc), VERR_INTERNAL_ERROR);
     2775                AssertLogRelMsgReturn(iPage < (pMmio2->RamRange.cb >> PAGE_SHIFT), ("iPage=%#x cb=%RGp %s\n", iPage, pMmio2->RamRange.cb, pMmio2->RamRange.pszDesc), VERR_PGM_SAVED_MMIO2_PAGE_NOT_FOUND);
    27762776                void *pvDstPage = (uint8_t *)pMmio2->RamRange.pvR3 + ((size_t)iPage << PAGE_SHIFT);
    27772777
     
    28172817                        if (pRom->idSavedState == id)
    28182818                            break;
    2819                     AssertLogRelMsgReturn(pRom, ("id=%#u iPage=%#x\n", id, iPage), VERR_INTERNAL_ERROR);
     2819                    AssertLogRelMsgReturn(pRom, ("id=%#u iPage=%#x\n", id, iPage), VERR_PGM_SAVED_ROM_RANGE_NOT_FOUND);
    28202820                }
    2821                 AssertLogRelMsgReturn(iPage < (pRom->cb >> PAGE_SHIFT), ("iPage=%#x cb=%RGp %s\n", iPage, pRom->cb, pRom->pszDesc), VERR_INTERNAL_ERROR);
     2821                AssertLogRelMsgReturn(iPage < (pRom->cb >> PAGE_SHIFT), ("iPage=%#x cb=%RGp %s\n", iPage, pRom->cb, pRom->pszDesc), VERR_PGM_SAVED_ROM_PAGE_NOT_FOUND);
    28222822                PPGMROMPAGE pRomPage = &pRom->aPages[iPage];
    28232823                GCPhys = pRom->GCPhys + ((RTGCPHYS)iPage << PAGE_SHIFT);
     
    28312831                    return rc;
    28322832                PGMROMPROT enmProt = (PGMROMPROT)u8Prot;
    2833                 AssertLogRelMsgReturn(enmProt > PGMROMPROT_INVALID && enmProt < PGMROMPROT_END, ("GCPhys=%RGp enmProt=%d\n", GCPhys, enmProt), VERR_INTERNAL_ERROR);
     2833                AssertLogRelMsgReturn(enmProt > PGMROMPROT_INVALID && enmProt < PGMROMPROT_END, ("GCPhys=%RGp enmProt=%d\n", GCPhys, enmProt), VERR_PGM_SAVED_ROM_PAGE_PROT);
    28342834
    28352835                if (enmProt != pRomPage->enmProt)
     
    28412841                    rc = PGMR3PhysRomProtect(pVM, GCPhys, PAGE_SIZE, enmProt);
    28422842                    AssertLogRelMsgRCReturn(rc, ("GCPhys=%RGp rc=%Rrc\n", GCPhys, rc), rc);
    2843                     AssertLogRelReturn(pRomPage->enmProt == enmProt, VERR_INTERNAL_ERROR);
     2843                    AssertLogRelReturn(pRomPage->enmProt == enmProt, VERR_PGM_SAVED_ROM_PAGE_PROT);
    28442844                }
    28452845                if ((u8 & ~PGM_STATE_REC_FLAG_ADDR) == PGM_STATE_REC_ROM_PROT)
     
    28712871                        break;
    28722872
    2873                     default: AssertLogRelFailedReturn(VERR_INTERNAL_ERROR); /* shut up gcc */
     2873                    default: AssertLogRelFailedReturn(VERR_IPE_NOT_REACHED_DEFAULT_CASE); /* shut up gcc */
    28742874                }
    28752875                if (!pRealPage)
     
    29252925             */
    29262926            default:
    2927                 AssertLogRelMsgFailedReturn(("%#x\n", u8), VERR_INTERNAL_ERROR);
     2927                AssertLogRelMsgFailedReturn(("%#x\n", u8), VERR_PGM_SAVED_REC_TYPE);
    29282928        }
    29292929    } /* forever */
  • trunk/src/VBox/VMM/VMMR3/SELM.cpp

    r39078 r39402  
    17191719    {
    17201720        Log(("SELMR3DebugCheck: ldt is out of bound SelLdt=%#x\n", SelLdt));
    1721         return VERR_INTERNAL_ERROR;
     1721        return VERR_SELM_LDT_OUT_OF_BOUNDS;
    17221722    }
    17231723    X86DESC    LDTDesc;
     
    17451745    {
    17461746        Log(("SELmR3DebugCheck: Invalid LDT %04x!\n", SelLdt));
    1747         return VERR_INTERNAL_ERROR;
     1747        return VERR_SELM_INVALID_LDT;
    17481748    }
    17491749
  • trunk/src/VBox/VMM/VMMR3/SSM.cpp

    r39368 r39402  
    964964    }
    965965    AssertFailed();
    966     return VERR_INTERNAL_ERROR_3;
     966    return VERR_SSM_UNEXPECTED_PASS;
    967967}
    968968
     
    27692769    {
    27702770        uint64_t offCur = ssmR3StrmTell(pStrm);
    2771         AssertReturn(offCur <= offDst, VERR_INTERNAL_ERROR_4);
     2771        AssertReturn(offCur <= offDst, VERR_SSM_SKIP_BACKWARDS);
    27722772        if (offCur == offDst)
    27732773            return VINF_SUCCESS;
     
    31883188    }
    31893189    else
    3190         AssertLogRelMsgFailedReturn(("cb=%#x\n", cb), pSSM->rc = VERR_INTERNAL_ERROR);
     3190        AssertLogRelMsgFailedReturn(("cb=%#x\n", cb), pSSM->rc = VERR_SSM_MEM_TOO_BIG);
    31913191
    31923192    Log3(("ssmR3DataWriteRecHdr: %08llx|%08llx/%08x: Type=%02x fImportant=%RTbool cbHdr=%u\n",
     
    42574257                    break;
    42584258                default:
    4259                     rc = VERR_INTERNAL_ERROR;
     4259                    rc = VERR_SSM_IPE_1;
    42604260                    break;
    42614261            }
     
    46054605                break;
    46064606            default:
    4607                 rc = VERR_INTERNAL_ERROR;
     4607                rc = VERR_SSM_IPE_1;
    46084608                break;
    46094609        }
     
    46924692                    break;
    46934693                default:
    4694                     rc = VERR_INTERNAL_ERROR;
     4694                    rc = VERR_SSM_IPE_1;
    46954695                    break;
    46964696            }
     
    50325032                    break;
    50335033                default:
    5034                     rc = VERR_INTERNAL_ERROR;
     5034                    rc = VERR_SSM_IPE_1;
    50355035                    break;
    50365036            }
     
    51705170                break;
    51715171            default:
    5172                 rc = VERR_INTERNAL_ERROR;
     5172                rc = VERR_SSM_IPE_1;
    51735173                break;
    51745174        }
     
    53275327                    break;
    53285328                default:
    5329                     rc = VERR_INTERNAL_ERROR;
     5329                    rc = VERR_SSM_IPE_1;
    53305330                    break;
    53315331            }
     
    59045904                break;
    59055905            default:
    5906                 return VERR_INTERNAL_ERROR;
     5906                return VERR_IPE_NOT_REACHED_DEFAULT_CASE;
    59075907        }
    59085908
     
    59525952                break;
    59535953            default:
    5954                 return VERR_INTERNAL_ERROR;
     5954                return VERR_IPE_NOT_REACHED_DEFAULT_CASE;
    59555955        }
    59565956
     
    60726072
    60736073            default:
    6074                 AssertMsgFailedReturn(("%x\n", pSSM->u.Read.u8TypeAndFlags), VERR_INTERNAL_ERROR_5);
     6074                AssertMsgFailedReturn(("%x\n", pSSM->u.Read.u8TypeAndFlags), VERR_SSM_BAD_REC_TYPE);
    60756075        }
    60766076
     
    61736173
    61746174            default:
    6175                 AssertMsgFailedReturn(("%x\n", pSSM->u.Read.u8TypeAndFlags), VERR_INTERNAL_ERROR_5);
     6175                AssertMsgFailedReturn(("%x\n", pSSM->u.Read.u8TypeAndFlags), VERR_SSM_BAD_REC_TYPE);
    61766176        }
    61776177        /*pSSM->u.Read.offDataBuffer = 0;*/
     
    74837483        }
    74847484        else
    7485             AssertFailedReturn(VERR_INTERNAL_ERROR);
     7485            AssertFailedReturn(VERR_SSM_IPE_2);
    74867486        if (!pSSM->u.Read.fStreamCrc32)
    74877487            ssmR3StrmDisableChecksumming(&pSSM->Strm);
     
    75817581        }
    75827582        else
    7583             AssertFailedReturn(VERR_INTERNAL_ERROR);
     7583            AssertFailedReturn(VERR_SSM_IPE_1);
    75847584
    75857585        /*
     
    78947894                                break;
    78957895                            default:
    7896                                 rc = VERR_INTERNAL_ERROR;
     7896                                rc = VERR_SSM_IPE_1;
    78977897                                break;
    78987898                        }
     
    81568156                    break;
    81578157                default:
    8158                     rc = VERR_INTERNAL_ERROR;
     8158                    rc = VERR_SSM_IPE_1;
    81598159                    break;
    81608160            }
     
    83238323                        break;
    83248324                    default:
    8325                         rc = VERR_INTERNAL_ERROR;
     8325                        rc = VERR_SSM_IPE_1;
    83268326                        break;
    83278327                }
     
    83948394                        break;
    83958395                    default:
    8396                         rc = VERR_INTERNAL_ERROR;
     8396                        rc = VERR_SSM_IPE_1;
    83978397                        break;
    83988398                }
     
    91219121        {
    91229122            AssertLogRelMsgFailed(("fCancelled=%RX32 enmOp=%d\n", u32Old, pSSM->enmOp));
    9123             rc = VERR_INTERNAL_ERROR_2;
     9123            rc = VERR_SSM_IPE_3;
    91249124        }
    91259125    }
  • trunk/src/VBox/VMM/VMMR3/TM.cpp

    r39078 r39402  
    224224     */
    225225    pVM->tm.s.pvGIPR3 = (void *)g_pSUPGlobalInfoPage;
    226     AssertMsgReturn(pVM->tm.s.pvGIPR3, ("GIP support is now required!\n"), VERR_INTERNAL_ERROR);
     226    AssertMsgReturn(pVM->tm.s.pvGIPR3, ("GIP support is now required!\n"), VERR_TM_GIP_REQUIRED);
    227227    AssertMsgReturn((g_pSUPGlobalInfoPage->u32Version >> 16) == (SUPGLOBALINFOPAGE_VERSION >> 16),
    228                     ("Unsupported GIP version!\n"), VERR_INTERNAL_ERROR);
     228                    ("Unsupported GIP version!\n"), VERR_TM_GIP_VERSION);
    229229
    230230    RTHCPHYS HCPhysGIP;
     
    251251    if (    g_pSUPGlobalInfoPage->u32Magic == SUPGLOBALINFOPAGE_MAGIC
    252252        &&  g_pSUPGlobalInfoPage->u32UpdateIntervalNS >= 250000000 /* 0.25s */)
    253         return VMSetError(pVM, VERR_INTERNAL_ERROR, RT_SRC_POS,
     253        return VMSetError(pVM, VERR_TM_GIP_UPDATE_INTERVAL_TOO_BIG, RT_SRC_POS,
    254254                          N_("The GIP update interval is too big. u32UpdateIntervalNS=%RU32 (u32UpdateHz=%RU32)"),
    255255                          g_pSUPGlobalInfoPage->u32UpdateIntervalNS, g_pSUPGlobalInfoPage->u32UpdateHz);
     
    282282    pVM->tm.s.VirtualGetRawDataRC.pu64Prev = MMHyperR3ToRC(pVM, (void *)&pVM->tm.s.u64VirtualRawPrev);
    283283    pVM->tm.s.VirtualGetRawDataR0.pu64Prev = MMHyperR3ToR0(pVM, (void *)&pVM->tm.s.u64VirtualRawPrev);
    284     AssertReturn(pVM->tm.s.VirtualGetRawDataR0.pu64Prev, VERR_INTERNAL_ERROR);
     284    AssertRelease(pVM->tm.s.VirtualGetRawDataR0.pu64Prev);
    285285    /* The rest is done in TMR3InitFinalize since it's too early to call PDM. */
    286286
     
    19941994        PPDMCRITSECT    pCritSect = pTimer->pCritSect;
    19951995        if (pCritSect)
    1996             PDMCritSectEnter(pCritSect, VERR_INTERNAL_ERROR);
     1996            PDMCritSectEnter(pCritSect, VERR_IGNORED);
    19971997        Log2(("tmR3TimerQueueRun: %p:{.enmState=%s, .enmClock=%d, .enmType=%d, u64Expire=%llx (now=%llx) .pszDesc=%s}\n",
    19981998              pTimer, tmTimerState(pTimer->enmState), pTimer->enmClock, pTimer->enmType, pTimer->u64Expire, u64Now, pTimer->pszDesc));
     
    21812181        PPDMCRITSECT pCritSect = pTimer->pCritSect;
    21822182        if (pCritSect)
    2183             PDMCritSectEnter(pCritSect, VERR_INTERNAL_ERROR);
     2183            PDMCritSectEnter(pCritSect, VERR_IGNORED);
    21842184
    21852185        Log2(("tmR3TimerQueueRun: %p:{.enmState=%s, .enmClock=%d, .enmType=%d, u64Expire=%llx (now=%llx) .pszDesc=%s}\n",
  • trunk/src/VBox/VMM/VMMR3/VM.cpp

    r39078 r39402  
    12181218    AssertMsgReturn(enmVMState == VMSTATE_POWERING_ON,
    12191219                    ("%s\n", VMR3GetStateName(enmVMState)),
    1220                     VERR_INTERNAL_ERROR_4);
     1220                    VERR_VM_UNEXPECTED_UNSTABLE_STATE);
    12211221
    12221222    /*
     
    13111311                    ||  enmVMState == VMSTATE_SUSPENDING_EXT_LS,
    13121312                    ("%s\n", VMR3GetStateName(enmVMState)),
    1313                     VERR_INTERNAL_ERROR_4);
     1313                    VERR_VM_UNEXPECTED_UNSTABLE_STATE);
    13141314
    13151315    /*
     
    13251325                                 VMSTATE_SUSPENDED_EXT_LS, VMSTATE_SUSPENDING_EXT_LS);
    13261326        if (RT_FAILURE(rc))
    1327             return VERR_INTERNAL_ERROR_3;
     1327            return VERR_VM_UNEXPECTED_UNSTABLE_STATE;
    13281328    }
    13291329
     
    13891389    AssertMsgReturn(enmVMState == VMSTATE_RESUMING,
    13901390                    ("%s\n", VMR3GetStateName(enmVMState)),
    1391                     VERR_INTERNAL_ERROR_4);
     1391                    VERR_VM_UNEXPECTED_UNSTABLE_STATE);
    13921392
    13931393#if 0
     
    15041504            default:
    15051505                AssertMsgFailed(("%s\n", VMR3GetStateName(enmVMState)));
    1506                 rc = VERR_INTERNAL_ERROR_3;
     1506                rc = VERR_VM_UNEXPECTED_VM_STATE;
    15071507                break;
    15081508        }
     
    15181518    AssertMsgReturn(enmVMState == VMSTATE_SUSPENDING_LS,
    15191519                    ("%s\n", VMR3GetStateName(enmVMState)),
    1520                     VERR_INTERNAL_ERROR_4);
     1520                    VERR_VM_UNEXPECTED_UNSTABLE_STATE);
    15211521
    15221522    /*
     
    15291529                                 VMSTATE_SUSPENDED_LS, VMSTATE_SUSPENDING_LS);
    15301530        if (RT_FAILURE(rc))
    1531             return VERR_INTERNAL_ERROR_3;
     1531            return VERR_VM_UNEXPECTED_UNSTABLE_STATE;
    15321532
    15331533        *pfSuspended = true;
     
    25512551        for (PVMREQ pReq = pReqHead; pReq; pReq = pReq->pNext)
    25522552        {
    2553             ASMAtomicUoWriteS32(&pReq->iStatus, VERR_INTERNAL_ERROR);
     2553            ASMAtomicUoWriteS32(&pReq->iStatus, VERR_VM_REQUEST_KILLED);
    25542554            ASMAtomicWriteSize(&pReq->enmState, VMREQSTATE_INVALID);
    25552555            RTSemEventSignal(pReq->EventSem);
     
    25812581            for (PVMREQ pReq = pReqHead; pReq; pReq = pReq->pNext)
    25822582            {
    2583                 ASMAtomicUoWriteS32(&pReq->iStatus, VERR_INTERNAL_ERROR);
     2583                ASMAtomicUoWriteS32(&pReq->iStatus, VERR_VM_REQUEST_KILLED);
    25842584                ASMAtomicWriteSize(&pReq->enmState, VMREQSTATE_INVALID);
    25852585                RTSemEventSignal(pReq->EventSem);
     
    27972797                          || enmVMState == VMSTATE_RESETTING_LS,
    27982798                          ("%s\n", VMR3GetStateName(enmVMState)),
    2799                           VERR_INTERNAL_ERROR_4);
     2799                          VERR_VM_UNEXPECTED_UNSTABLE_STATE);
    28002800
    28012801    /*
  • trunk/src/VBox/VMM/VMMR3/VMEmt.cpp

    r39078 r39402  
    307307    if (pUVCpu->pVM)
    308308        VM_FF_SET(pUVCpu->pVM, VM_FF_CHECK_VM_STATE);
    309     return VERR_INTERNAL_ERROR;
     309    return VERR_VM_FATAL_WAIT_ERROR;
    310310}
    311311
  • trunk/src/VBox/VMM/VMMR3/VMM.cpp

    r39303 r39402  
    526526        LogRel(("R0 init failed, rc=%Rra\n", rc));
    527527        if (RT_SUCCESS(rc))
    528             rc = VERR_INTERNAL_ERROR;
     528            rc = VERR_IPE_UNEXPECTED_INFO_STATUS;
    529529    }
    530530    return rc;
     
    602602            VMMR3FatalDump(pVM, pVCpu, rc);
    603603            if (rc >= VINF_EM_FIRST && rc <= VINF_EM_LAST)
    604                 rc = VERR_INTERNAL_ERROR;
     604                rc = VERR_IPE_UNEXPECTED_INFO_STATUS;
    605605        }
    606606        AssertRC(rc);
     
    736736        LogRel(("VMMR3Term: R0 term failed, rc=%Rra. (warning)\n", rc));
    737737        if (RT_SUCCESS(rc))
    738             rc = VERR_INTERNAL_ERROR;
     738            rc = VERR_IPE_UNEXPECTED_INFO_STATUS;
    739739    }
    740740
     
    19721972    AssertLogRelMsgReturn(rc == VINF_SUCCESS || RT_FAILURE(rc),
    19731973                          ("uOperation=%u rc=%Rrc\n", uOperation, rc),
    1974                           VERR_INTERNAL_ERROR);
     1974                          VERR_IPE_UNEXPECTED_INFO_STATUS);
    19751975    return rc;
    19761976}
     
    21942194        default:
    21952195            AssertMsgFailed(("enmCallRing3Operation=%d\n", pVCpu->vmm.s.enmCallRing3Operation));
    2196             return VERR_INTERNAL_ERROR;
     2196            return VERR_VMM_UNKNOWN_RING3_CALL;
    21972197    }
    21982198
  • trunk/src/VBox/VMM/VMMR3/VMMSwitcher.cpp

    r39078 r39402  
    992992/** @todo r=bird: I would suggest that we create a dummy switcher which just does something like:
    993993 * @code
    994  *       mov eax, VERR_INTERNAL_ERROR
     994 *       mov eax, VERR_VMM_DUMMY_SWITCHER
    995995 *       ret
    996996 * @endcode
  • trunk/src/VBox/VMM/VMMR3/VMReq.cpp

    r39327 r39402  
    11861186                default:
    11871187                    AssertReleaseMsgFailed(("cArgs=%d\n", pReq->u.Internal.cArgs));
    1188                     rcRet = rcReq = VERR_INTERNAL_ERROR;
     1188                    rcRet = rcReq = VERR_VM_REQUEST_TOO_MANY_ARGS_IPE;
    11891189                    break;
    11901190            }
  • trunk/src/VBox/VMM/VMMRC/IOMRC.cpp

    r35346 r39402  
    8787        default:
    8888            AssertMsgFailed(("Unknown I/O port access opcode %d.\n", pCpu->pCurInstr->opcode));
    89             return VERR_INTERNAL_ERROR;
     89            return VERR_IOM_IOPORT_UNKNOWN_OPCODE;
    9090    }
    9191}
  • trunk/src/VBox/VMM/VMMRC/MMRamRC.cpp

    r35346 r39402  
    143143    {
    144144        /* Must be a read violation. */
    145         AssertReturn(!(TRPMGetErrorCode(VMMGetCpu0(pVM)) & X86_TRAP_PF_RW), VERR_INTERNAL_ERROR);
     145        AssertReturn(!(TRPMGetErrorCode(VMMGetCpu0(pVM)) & X86_TRAP_PF_RW), VERR_MM_BAD_TRAP_TYPE_IPE);
    146146        pRegFrame->eip = (uintptr_t)&MMGCRamRead_Error;
    147147        return VINF_SUCCESS;
     
    155155    {
    156156        /* Must be a write violation. */
    157         AssertReturn(TRPMGetErrorCode(VMMGetCpu0(pVM)) & X86_TRAP_PF_RW, VERR_INTERNAL_ERROR);
     157        AssertReturn(TRPMGetErrorCode(VMMGetCpu0(pVM)) & X86_TRAP_PF_RW, VERR_MM_BAD_TRAP_TYPE_IPE);
    158158        pRegFrame->eip = (uintptr_t)&MMGCRamWrite_Error;
    159159        return VINF_SUCCESS;
  • trunk/src/VBox/VMM/VMMRC/TRPMRCHandlers.cpp

    r39078 r39402  
    344344     */
    345345    int rc = DBGFRZTrap01Handler(pVM, pVCpu, pRegFrame, uDr6);
    346     AssertStmt(rc != VINF_EM_RAW_GUEST_TRAP, rc = VERR_INTERNAL_ERROR_3);
     346    AssertStmt(rc != VINF_EM_RAW_GUEST_TRAP, rc = VERR_TRPM_IPE_1);
    347347
    348348    Log6(("TRPMGCHyper01: %Rrc (%04x:%08x %RTreg)\n", rc, pRegFrame->cs, pRegFrame->eip, uDr6));
     
    462462     */
    463463    int rc = DBGFRZTrap03Handler(pVM, pVCpu, pRegFrame);
    464     AssertStmt(rc != VINF_EM_RAW_GUEST_TRAP, rc = VERR_INTERNAL_ERROR_3);
     464    AssertStmt(rc != VINF_EM_RAW_GUEST_TRAP, rc = VERR_TRPM_IPE_2);
    465465
    466466    Log6(("TRPMGCHyper03: %Rrc (%04x:%08x)\n", rc, pRegFrame->cs, pRegFrame->eip));
     
    13171317            default:
    13181318                AssertMsgFailed(("Invalid uUser=%#x\n", uUser));
    1319                 return VERR_INTERNAL_ERROR;
     1319                return VERR_TRPM_BAD_TRAP_IN_OP;
    13201320        }
    13211321    }
     
    13791379            default:
    13801380                AssertMsgFailed(("Invalid uUser=%#x\n", uUser));
    1381                 return VERR_INTERNAL_ERROR;
     1381                return VERR_TRPM_BAD_TRAP_IN_OP;
    13821382        }
    13831383
     
    13881388
    13891389    AssertMsgFailed(("Impossible!\n"));
    1390     return VERR_INTERNAL_ERROR;
    1391 }
    1392 
     1390    return VERR_TRPM_IPE_3;
     1391}
     1392
  • trunk/src/VBox/VMM/VMMRZ/PGMRZDynMap.cpp

    r39078 r39402  
    338338 * Initializes the auto mapping sets for a VM.
    339339 *
    340  * @returns VINF_SUCCESS on success, VERR_INTERNAL_ERROR on failure.
     340 * @returns VINF_SUCCESS on success, VERR_PGM_DYNMAP_IPE on failure.
    341341 * @param   pVM         The VM in question.
    342342 */
     
    344344{
    345345    VMCPUID idCpu = pVM->cCpus;
    346     AssertReturn(idCpu > 0 && idCpu <= VMM_MAX_CPU_COUNT, VERR_INTERNAL_ERROR);
     346    AssertReturn(idCpu > 0 && idCpu <= VMM_MAX_CPU_COUNT, VERR_PGM_DYNMAP_IPE);
    347347    while (idCpu-- > 0)
    348348    {
     
    400400            break;
    401401        default:
    402             rc = VERR_INTERNAL_ERROR;
     402            rc = VERR_PGM_DYNMAP_IPE;
    403403            break;
    404404    }
     
    489489     */
    490490    PPGMRZDYNMAP pThis = g_pPGMR0DynMap;
    491     AssertPtrReturn(pThis, VERR_INTERNAL_ERROR);
     491    AssertPtrReturn(pThis, VERR_PGM_DYNMAP_IPE);
    492492    rc = RTSemFastMutexRequest(pThis->hInitLock);
    493493    AssertLogRelRCReturn(rc, rc);
     
    819819            ASMIntEnable();
    820820            if (i + 1 == pPgLvl->cLevels)
    821                 AssertReturn(pSeg->cPTs < cMaxPTs, VERR_INTERNAL_ERROR);
     821                AssertReturn(pSeg->cPTs < cMaxPTs, VERR_PGM_DYNMAP_IPE);
    822822            else
    823823            {
     
    872872                    i, pPgLvl->cLevels, uEntry, pPgLvl->a[i].fAndMask, pPgLvl->a[i].fResMask, uEntry & pPgLvl->a[i].fAndMask,
    873873                    pPgLvl->a[i].u.pv, pvPage, iEntry, pThis->fLegacyMode));
    874             return VERR_INTERNAL_ERROR;
     874            return VERR_PGM_DYNMAP_IPE;
    875875        }
    876876        /*Log(("#%d: iEntry=%4d uEntry=%#llx pvEntry=%p HCPhys=%RHp \n", i, iEntry, uEntry, pvEntry, pPgLvl->a[i].HCPhys));*/
     
    10071007                LogRel(("pgmR0DynMapAddSeg: internal error - page #%u HCPhysPage=%RHp HCPhysPte=%RHp pbPage=%p pvPte=%p\n",
    10081008                        iPage - pSeg->iPage, HCPhysPage, HCPhysPte, pbPage, pThis->paPages[iPage].uPte.pv));
    1009                 rc = VERR_INTERNAL_ERROR;
     1009                rc = VERR_PGM_DYNMAP_IPE;
    10101010                break;
    10111011            }
     
    10891089    uint32_t cMinPages;
    10901090    uint32_t cPages = pgmR0DynMapCalcNewSize(pThis, &cMinPages);
    1091     AssertReturn(cPages, VERR_INTERNAL_ERROR);
     1091    AssertReturn(cPages, VERR_PGM_DYNMAP_IPE);
    10921092    int rc = pgmR0DynMapAddSeg(pThis, cPages);
    10931093    if (rc == VERR_NO_MEMORY)
     
    11321132    uint32_t cMinPages;
    11331133    uint32_t cPages = pgmR0DynMapCalcNewSize(pThis, &cMinPages);
    1134     AssertReturn(cPages, VERR_INTERNAL_ERROR);
     1134    AssertReturn(cPages, VERR_PGM_DYNMAP_IPE);
    11351135    if (pThis->cPages >= cPages)
    11361136        return VINF_SUCCESS;
     
    15781578            RTAssertMsg1Weak(#expr, __LINE__, __FILE__, __PRETTY_FUNCTION__); \
    15791579            RTAssertMsg2Weak a; \
    1580             return VERR_INTERNAL_ERROR; \
     1580            return VERR_PGM_DYNMAP_IPE; \
    15811581        } \
    15821582    } while (0)
     
    25292529        {
    25302530            LogRel(("failed(%d): rc=%Rrc; pv=%p pv2=%p i=%p\n", __LINE__, rc, pv, pv2, i));
    2531             if (RT_SUCCESS(rc)) rc = VERR_INTERNAL_ERROR;
     2531            if (RT_SUCCESS(rc)) rc = VERR_PGM_DYNMAP_IPE;
    25322532        }
    25332533        else if (pSet->cEntries != 5)
    25342534        {
    25352535            LogRel(("failed(%d): cEntries=%d expected %d\n", __LINE__, pSet->cEntries, RT_ELEMENTS(pSet->aEntries) / 2));
    2536             rc = VERR_INTERNAL_ERROR;
     2536            rc = VERR_PGM_DYNMAP_IPE;
    25372537        }
    25382538        else if (   pSet->aEntries[4].cRefs != UINT16_MAX - 1
     
    25462546                LogRel(("[%d]=%d, ", i, pSet->aEntries[i].cRefs));
    25472547            LogRel(("\n"));
    2548             rc = VERR_INTERNAL_ERROR;
     2548            rc = VERR_PGM_DYNMAP_IPE;
    25492549        }
    25502550        if (RT_SUCCESS(rc))
     
    25682568            {
    25692569                LogRel(("failed(%d): rc=%Rrc; pv=%p pv2=%p i=%d\n", __LINE__, rc, pv, pv2, i));
    2570                 if (RT_SUCCESS(rc)) rc = VERR_INTERNAL_ERROR;
     2570                if (RT_SUCCESS(rc)) rc = VERR_PGM_DYNMAP_IPE;
    25712571            }
    25722572            else if (pSet->cEntries != RT_ELEMENTS(pSet->aEntries))
    25732573            {
    25742574                LogRel(("failed(%d): cEntries=%d expected %d\n", __LINE__, pSet->cEntries, RT_ELEMENTS(pSet->aEntries)));
    2575                 rc = VERR_INTERNAL_ERROR;
     2575                rc = VERR_PGM_DYNMAP_IPE;
    25762576            }
    25772577            LogRel(("Load=%u/%u/%u Set=%u/%u\n", pThis->cLoad, pThis->cMaxLoad, pThis->cPages - pThis->cPages, pSet->cEntries, RT_ELEMENTS(pSet->aEntries)));
     
    26112611                    LogRel(("failed(%d): rc=%Rrc, wanted %d ; pv2=%p Set=%u/%u; i=%d\n", __LINE__,
    26122612                            rc, VERR_PGM_DYNMAP_FULL_SET, pv2, pSet->cEntries, RT_ELEMENTS(pSet->aEntries), i));
    2613                     if (RT_SUCCESS(rc)) rc = VERR_INTERNAL_ERROR;
     2613                    if (RT_SUCCESS(rc)) rc = VERR_PGM_DYNMAP_IPE;
    26142614                }
    26152615            }
     
    26492649                LogRel(("failed(%d): cFailures=%d pu32Real=%p pu32=%p u32Expect=%#x *pu32=%#x\n", __LINE__,
    26502650                        Test.cFailures, pu32Real, Test.pu32, Test.u32Expect, *Test.pu32));
    2651                 rc = VERR_INTERNAL_ERROR;
     2651                rc = VERR_PGM_DYNMAP_IPE;
    26522652            }
    26532653            else
  • trunk/src/VBox/VMM/VMMRZ/VMMRZ.cpp

    r35346 r39402  
    8080    pVCpu->vmm.s.enmCallRing3Operation = enmOperation;
    8181    pVCpu->vmm.s.u64CallRing3Arg = uArg;
    82     pVCpu->vmm.s.rcCallRing3 = VERR_INTERNAL_ERROR;
     82    pVCpu->vmm.s.rcCallRing3 = VERR_VMM_RING3_CALL_NO_RC;
    8383#ifdef IN_RC
    8484    pVM->vmm.s.pfnGuestToHostRC(VINF_VMM_CALL_HOST);
  • trunk/src/VBox/VMM/testcase/tstIEMCheckMc.cpp

    r39127 r39402  
    7575    static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu, a_Type0 a_Name0, a_Type1 a_Name1) RT_NO_THROW
    7676
    77 #define IEM_NOT_REACHED_DEFAULT_CASE_RET()                  default: return VERR_INTERNAL_ERROR_4
     77#define IEM_NOT_REACHED_DEFAULT_CASE_RET()                  default: return VERR_IPE_NOT_REACHED_DEFAULT_CASE
    7878
    7979#define IEM_OPCODE_GET_NEXT_U8(a_pu8)                       do { *(a_pu8)  = g_bRandom; CHK_PTYPE(uint8_t  *, a_pu8);  } while (0)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette