VirtualBox

Changeset 8543 in vbox


Ignore:
Timestamp:
May 2, 2008 5:48:42 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
30448
Message:

Corrected the error code for that core code 'allocation' failure.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/err.h

    r8155 r8543  
    396396/** Physical range crosses dynamic ram chunk boundary; translation to HC ptr not safe. */
    397397#define VERR_PGM_GCPHYS_RANGE_CROSSES_BOUNDARY  (-1626)
     398/** Conflict between the core memory and the intermediate paging context, try again.
     399 * There are some very special conditions applying to the intermediate paging context
     400 * (used during the world switches), and some times we continuously run into these
     401 * when asking the host kernel for memory during VM init. Let us know if you run into
     402 * this and we'll adjust the code so it tries harder to avoid it.
     403 */
     404#define VERR_PGM_INTERMEDIATE_PAGING_CONFLICT   (-1627)
     405
    398406/** @} */
    399407
  • trunk/src/VBox/VMM/PGMMap.cpp

    r8155 r8543  
    501501            )
    502502       )
    503     {
    504         AssertMsgFailed(("Addr=%RTptr HCPhys=%VHp cbPages=%d\n", Addr, HCPhys, cbPages));
    505         LogRel(("Addr=%RTptr HCPhys=%VHp cbPages=%d\n", Addr, HCPhys, cbPages));
    506         return VERR_PGM_MAPPINGS_FIX_CONFLICT; /** @todo new error code */
    507     }
     503        AssertLogRelMsgFailedReturn(("Addr=%RTptr HCPhys=%VHp cbPages=%d\n", Addr, HCPhys, cbPages),
     504                                    VERR_PGM_INTERMEDIATE_PAGING_CONFLICT);
    508505
    509506    /* The intermediate mapping must not conflict with our default hypervisor address. */
     
    514511        : pvHyperGC + cbHyper > uAddress
    515512       )
    516     {
    517         AssertMsgFailed(("Addr=%RTptr HyperGC=%VGv cbPages=%zu\n", Addr, pvHyperGC, cbPages));
    518         LogRel(("Addr=%RTptr HyperGC=%VGv cbPages=%zu\n", Addr, pvHyperGC, cbPages));
    519         return VERR_PGM_MAPPINGS_FIX_CONFLICT; /** @todo new error code */
    520     }
     513        AssertLogRelMsgFailedReturn(("Addr=%RTptr HyperGC=%VGv cbPages=%zu\n", Addr, pvHyperGC, cbPages),
     514                                    VERR_PGM_INTERMEDIATE_PAGING_CONFLICT);
    521515
    522516    const unsigned cPages = cbPages >> PAGE_SHIFT;
     
    575569                /** @todo this must be handled with a relocation of the conflicting mapping!
    576570                 * Which of course cannot be done because we're in the middle of the initialization. bad design! */
    577                 AssertMsgFailed(("Conflict between core code and PGMR3Mapping(). uAddress=%VHv\n", uAddress));
    578                 LogRel(("Conflict between core code and PGMR3Mapping(). uAddress=%VHv\n", uAddress));
    579                 return VERR_PGM_MAPPINGS_FIX_CONFLICT; /** @todo error codes! */
     571                AssertLogRelMsgFailedReturn(("Conflict between core code and PGMR3Mapping(). uAddress=%VHv\n", uAddress),
     572                                            VERR_PGM_INTERMEDIATE_PAGING_CONFLICT);
    580573            }
    581574        }
    582575        if (pPT->a[iPTE].u)
    583         {
    584             AssertMsgFailed(("Conflict iPTE=%#x iPDE=%#x uAddress=%VHv pPT->a[iPTE].u=%RX32\n", iPTE, iPDE, uAddress, pPT->a[iPTE].u));
    585             LogRel(("Conflict iPTE=%#x iPDE=%#x uAddress=%VHv pPT->a[iPTE].u=%RX32\n",
    586                     iPTE, iPDE, uAddress, pPT->a[iPTE].u));
    587             return VERR_PGM_MAPPINGS_FIX_CONFLICT; /** @todo error codes! */
    588         }
     576            AssertLogRelMsgFailedReturn(("Conflict iPTE=%#x iPDE=%#x uAddress=%VHv pPT->a[iPTE].u=%RX32\n", iPTE, iPDE, uAddress, pPT->a[iPTE].u),
     577                                        VERR_PGM_INTERMEDIATE_PAGING_CONFLICT);
    589578
    590579        /*
     
    608597                /** @todo this must be handled with a relocation of the conflicting mapping!
    609598                 * Which of course cannot be done because we're in the middle of the initialization. bad design! */
    610                 AssertMsgFailed(("Conflict between core code and PGMR3Mapping(). uAddress=%VHv\n", uAddress));
    611                 LogRel(("Conflict between core code and PGMR3Mapping(). uAddress=%VHv\n", uAddress));
    612                 return VERR_PGM_MAPPINGS_FIX_CONFLICT; /** @todo error codes! */
     599                AssertLogRelMsgFailedReturn(("Conflict between core code and PGMR3Mapping(). uAddress=%VHv\n", uAddress),
     600                                            VERR_PGM_INTERMEDIATE_PAGING_CONFLICT);
    613601            }
    614602        }
    615603        if (pPTPae->a[iPTE].u)
    616         {
    617             AssertMsgFailed(("Conflict iPTE=%#x iPDE=%#x uAddress=%VHv pPTPae->a[iPTE].u=%#RX64\n", iPTE, iPDE, uAddress, pPTPae->a[iPTE].u));
    618             LogRel(("Conflict iPTE=%#x iPDE=%#x uAddress=%VHv pPTPae->a[iPTE].u=%#RX64\n",
    619                     iPTE, iPDE, uAddress, pPTPae->a[iPTE].u));
    620             return VERR_PGM_MAPPINGS_FIX_CONFLICT; /** @todo error codes! */
    621         }
     604            AssertLogRelMsgFailedReturn(("Conflict iPTE=%#x iPDE=%#x uAddress=%VHv pPTPae->a[iPTE].u=%#RX64\n", iPTE, iPDE, uAddress, pPTPae->a[iPTE].u),
     605                                        VERR_PGM_INTERMEDIATE_PAGING_CONFLICT);
    622606
    623607        /* next */
     
    12011185DECLCALLBACK(void) pgmR3MapInfo(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs)
    12021186{
    1203     pHlp->pfnPrintf(pHlp, pVM->pgm.s.fMappingsFixed 
    1204                     ? "\nThe mappings are FIXED.\n" 
     1187    pHlp->pfnPrintf(pHlp, pVM->pgm.s.fMappingsFixed
     1188                    ? "\nThe mappings are FIXED.\n"
    12051189                    : "\nThe mappings are FLOATING.\n");
    12061190    PPGMMAPPING pCur;
  • trunk/src/VBox/VMM/VMM.cpp

    r8542 r8543  
    246246    {
    247247        rc = PGMR3MapIntermediate(pVM, pVM->vmm.s.pvHCCoreCodeR0, pVM->vmm.s.HCPhysCoreCode, cbCoreCode);
    248         if (rc == VERR_PGM_MAPPINGS_FIX_CONFLICT)
     248        if (rc == VERR_PGM_INTERMEDIATE_PAGING_CONFLICT)
    249249        {
    250250            /* try more allocations. */
     
    269269                    break;
    270270                rc = PGMR3MapIntermediate(pVM, pVM->vmm.s.pvHCCoreCodeR0, pVM->vmm.s.HCPhysCoreCode, cbCoreCode);
    271             } while (   rc == VERR_PGM_MAPPINGS_FIX_CONFLICT
    272                      && i < ELEMENTS(aBadTries) - 1);
     271            } while (   rc == VERR_PGM_INTERMEDIATE_PAGING_CONFLICT
     272                     && i < RT_ELEMENTS(aBadTries) - 1);
    273273
    274274            /* cleanup */
Note: See TracChangeset for help on using the changeset viewer.

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