Changeset 17316 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Mar 3, 2009 8:04:53 PM (16 years ago)
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAll.cpp
r17305 r17316 2357 2357 if (VALID_PTR(pPage)) 2358 2358 { 2359 char szTmp[80]; 2360 switch (PGM_PAGE_GET_TYPE(pPage)) 2361 { 2362 case PGMPAGETYPE_RAM: 2363 cch = RTStrPrintf(szTmp, sizeof(szTmp), "%RHp-RAM", PGM_PAGE_GET_HCPHYS(pPage)); 2364 break; 2365 case PGMPAGETYPE_MMIO2: 2366 cch = RTStrPrintf(szTmp, sizeof(szTmp), "%RHp-MMIO2", PGM_PAGE_GET_HCPHYS(pPage)); 2367 break; 2368 case PGMPAGETYPE_MMIO2_ALIAS_MMIO: 2369 cch = RTStrPrintf(szTmp, sizeof(szTmp), "%RHp-M2ALI", PGM_PAGE_GET_HCPHYS(pPage)); 2370 break; 2371 case PGMPAGETYPE_ROM_SHADOW: 2372 cch = RTStrPrintf(szTmp, sizeof(szTmp), "%RHp-ROMSH", PGM_PAGE_GET_HCPHYS(pPage)); 2373 break; 2374 case PGMPAGETYPE_ROM: 2375 cch = RTStrPrintf(szTmp, sizeof(szTmp), "%RHp-ROM", PGM_PAGE_GET_HCPHYS(pPage)); 2376 break; 2377 case PGMPAGETYPE_MMIO: 2378 cch = RTStrPrintf(szTmp, sizeof(szTmp), "%RHp-MMIO", PGM_PAGE_GET_HCPHYS(pPage)); 2379 break; 2380 default: 2381 cch = RTStrPrintf(szTmp, sizeof(szTmp), "%RHp-%d", PGM_PAGE_GET_HCPHYS(pPage), PGM_PAGE_GET_TYPE(pPage)); 2382 break; 2383 } 2359 char szTmp[64+80]; 2360 2361 cch = 0; 2362 2363 /* The single char state stuff. */ 2364 static const char s_achPageStates[4] = { 'Z', 'A', 'W', 'S' }; 2365 szTmp[cch++] = s_achPageStates[PGM_PAGE_GET_STATE(pPage)]; 2366 2367 #define IS_PART_INCLUDED(lvl) ( !(fFlags & RTSTR_F_PRECISION) || cchPrecision == (lvl) || cchPrecision >= (lvl)+10 ) 2368 if (IS_PART_INCLUDED(5)) 2369 { 2370 static const char s_achHandlerStates[4] = { '-', 't', 'w', 'a' }; 2371 szTmp[cch++] = s_achHandlerStates[PGM_PAGE_GET_HNDL_PHYS_STATE(pPage)]; 2372 szTmp[cch++] = s_achHandlerStates[PGM_PAGE_GET_HNDL_VIRT_STATE(pPage)]; 2373 } 2374 2375 /* The type. */ 2376 if (IS_PART_INCLUDED(4)) 2377 { 2378 szTmp[cch++] = ':'; 2379 static const char s_achPageTypes[8][4] = { "RAM", "MI2", "M2A", "SHA", "ROM", "MIO", "BAD" }; 2380 szTmp[cch++] = s_achPageTypes[PGM_PAGE_GET_TYPE(pPage)][0]; 2381 szTmp[cch++] = s_achPageTypes[PGM_PAGE_GET_TYPE(pPage)][1]; 2382 szTmp[cch++] = s_achPageTypes[PGM_PAGE_GET_TYPE(pPage)][2]; 2383 } 2384 2385 /* The numbers. */ 2386 if (IS_PART_INCLUDED(3)) 2387 { 2388 szTmp[cch++] = ':'; 2389 cch += RTStrFormatNumber(&szTmp[cch], PGM_PAGE_GET_HCPHYS(pPage), 16, 12, 0, RTSTR_F_ZEROPAD | RTSTR_F_64BIT); 2390 } 2391 2392 if (IS_PART_INCLUDED(2)) 2393 { 2394 szTmp[cch++] = ':'; 2395 cch += RTStrFormatNumber(&szTmp[cch], PGM_PAGE_GET_PAGEID(pPage), 16, 7, 0, RTSTR_F_ZEROPAD | RTSTR_F_32BIT); 2396 } 2397 2398 if (IS_PART_INCLUDED(6)) 2399 { 2400 szTmp[cch++] = ':'; 2401 static const char s_achRefs[4] = { '-', 'U', '!', 'L' }; 2402 szTmp[cch++] = s_achRefs[PGM_PAGE_GET_TD_CREFS(pPage)]; 2403 cch += RTStrFormatNumber(&szTmp[cch], PGM_PAGE_GET_TD_IDX(pPage), 16, 4, 0, RTSTR_F_ZEROPAD | RTSTR_F_16BIT); 2404 } 2405 #undef IS_PART_INCLUDED 2406 2384 2407 cch = pfnOutput(pvArgOutput, szTmp, cch); 2385 2408 } -
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r17294 r17316 440 440 AssertMsg( pCur->enmType != PGMPHYSHANDLERTYPE_PHYSICAL_WRITE 441 441 || (pCur->enmType == PGMPHYSHANDLERTYPE_PHYSICAL_WRITE && (uErr & X86_TRAP_PF_RW)), 442 ("Unexpected trap for physical handler: %08X (phys=%08x) HCPhys=%X uErr=%X, enum=%d\n", pvFault, GCPhys, pPage->HCPhys, uErr, pCur->enmType));442 ("Unexpected trap for physical handler: %08X (phys=%08x) pPage=%R[pgmpage] uErr=%X, enum=%d\n", pvFault, GCPhys, pPage, uErr, pCur->enmType)); 443 443 444 444 # if defined(IN_RC) || defined(IN_RING0) … … 500 500 || !(uErr & X86_TRAP_PF_P) 501 501 || (pCur->enmType == PGMVIRTHANDLERTYPE_WRITE && (uErr & X86_TRAP_PF_RW))), 502 ("Unexpected trap for virtual handler: %RGv (phys=%RGp) HCPhys=%HGp uErr=%X, enum=%d\n", pvFault, GCPhys, pPage->HCPhys, uErr, pCur->enmType));502 ("Unexpected trap for virtual handler: %RGv (phys=%RGp) pPage=%R[pgmpage] uErr=%X, enum=%d\n", pvFault, GCPhys, pPage, uErr, pCur->enmType)); 503 503 504 504 if ( pvFault - pCur->Core.Key < pCur->cb … … 581 581 */ 582 582 rc = PGMInterpretInstruction(pVM, pRegFrame, pvFault); 583 LogFlow(("PGM: PGMInterpretInstruction -> rc=%d HCPhys=%RHp%s%s\n", 584 rc, pPage->HCPhys, 585 PGM_PAGE_HAS_ANY_PHYSICAL_HANDLERS(pPage) ? " phys" : "", 586 PGM_PAGE_HAS_ANY_VIRTUAL_HANDLERS(pPage) ? " virt" : "")); 583 LogFlow(("PGM: PGMInterpretInstruction -> rc=%d pPage=%R[pgmpage]\n", rc, pPage)); 587 584 STAM_PROFILE_STOP(&pVM->pgm.s.StatRZTrap0eTimeHandlers, b); 588 585 STAM_STATS({ pVM->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVM->pgm.s.StatRZTrap0eTime2HndUnhandled; }); … … 607 604 || !(uErr & X86_TRAP_PF_P) 608 605 || (pCur->enmType == PGMVIRTHANDLERTYPE_WRITE && (uErr & X86_TRAP_PF_RW))), 609 ("Unexpected trap for virtual handler: %08X (phys=%08x) HCPhys=%X uErr=%X, enum=%d\n", pvFault, GCPhys, pPage->HCPhys, uErr, pCur->enmType));606 ("Unexpected trap for virtual handler: %08X (phys=%08x) %R[pgmpage] uErr=%X, enum=%d\n", pvFault, GCPhys, pPage, uErr, pCur->enmType)); 610 607 611 608 if ( pvFault - pCur->Core.Key < pCur->cb … … 4172 4169 fIgnoreFlags |= X86_PTE_RW; 4173 4170 } 4174 else if (HCPhysShw != (PGM_PAGE_GET_HCPHYS(pPhysPage) & SHW_PTE_PG_MASK))4171 else if (HCPhysShw != PGM_PAGE_GET_HCPHYS(pPhysPage)) 4175 4172 { 4176 AssertMsgFailed(("Out of sync (phys) at %RGv! HCPhysShw=%RHp HCPhys=%RHpGCPhysGst=%RGp PteSrc=%#RX64 PteDst=%#RX64\n",4177 GCPtr + off, HCPhysShw, pPhysPage ->HCPhys, GCPhysGst, (uint64_t)PteSrc.u, (uint64_t)PteDst.u));4173 AssertMsgFailed(("Out of sync (phys) at %RGv! HCPhysShw=%RHp pPhysPage:%R[pgmpage] GCPhysGst=%RGp PteSrc=%#RX64 PteDst=%#RX64\n", 4174 GCPtr + off, HCPhysShw, pPhysPage, GCPhysGst, (uint64_t)PteSrc.u, (uint64_t)PteDst.u)); 4178 4175 cErrors++; 4179 4176 continue; … … 4187 4184 if (PteDst.n.u1Write) 4188 4185 { 4189 AssertMsgFailed(("WRITE access flagged at %RGv but the page is writable! HCPhys=%RHpPteSrc=%#RX64 PteDst=%#RX64\n",4190 GCPtr + off, pPhysPage ->HCPhys, (uint64_t)PteSrc.u, (uint64_t)PteDst.u));4186 AssertMsgFailed(("WRITE access flagged at %RGv but the page is writable! pPhysPage=%R[pgmpage] PteSrc=%#RX64 PteDst=%#RX64\n", 4187 GCPtr + off, pPhysPage, (uint64_t)PteSrc.u, (uint64_t)PteDst.u)); 4191 4188 cErrors++; 4192 4189 continue; … … 4198 4195 if (PteDst.n.u1Present) 4199 4196 { 4200 AssertMsgFailed(("ALL access flagged at %RGv but the page is present! HCPhys=%RHpPteSrc=%#RX64 PteDst=%#RX64\n",4201 GCPtr + off, pPhysPage ->HCPhys, (uint64_t)PteSrc.u, (uint64_t)PteDst.u));4197 AssertMsgFailed(("ALL access flagged at %RGv but the page is present! pPhysPage=%R[pgmpage] PteSrc=%#RX64 PteDst=%#RX64\n", 4198 GCPtr + off, pPhysPage, (uint64_t)PteSrc.u, (uint64_t)PteDst.u)); 4202 4199 cErrors++; 4203 4200 continue; … … 4400 4397 fIgnoreFlags |= X86_PTE_RW; 4401 4398 } 4402 else if (HCPhysShw != (pPhysPage->HCPhys & X86_PTE_PAE_PG_MASK))4399 else if (HCPhysShw != PGM_PAGE_GET_HCPHYS(pPhysPage)) 4403 4400 { 4404 AssertMsgFailed(("Out of sync (phys) at %RGv! HCPhysShw=%RHp HCPhys=%RHpGCPhysGst=%RGp PdeSrc=%#RX64 PteDst=%#RX64\n",4405 GCPtr + off, HCPhysShw, pPhysPage ->HCPhys, GCPhysGst, (uint64_t)PdeSrc.u, (uint64_t)PteDst.u));4401 AssertMsgFailed(("Out of sync (phys) at %RGv! HCPhysShw=%RHp pPhysPage=%R[pgmpage] GCPhysGst=%RGp PdeSrc=%#RX64 PteDst=%#RX64\n", 4402 GCPtr + off, HCPhysShw, pPhysPage, GCPhysGst, (uint64_t)PdeSrc.u, (uint64_t)PteDst.u)); 4406 4403 cErrors++; 4407 4404 continue; … … 4417 4414 if (PteDst.n.u1Write) 4418 4415 { 4419 AssertMsgFailed(("WRITE access flagged at %RGv but the page is writable! HCPhys=%RHpPdeSrc=%#RX64 PteDst=%#RX64\n",4420 GCPtr + off, pPhysPage ->HCPhys, (uint64_t)PdeSrc.u, (uint64_t)PteDst.u));4416 AssertMsgFailed(("WRITE access flagged at %RGv but the page is writable! pPhysPage=%R[pgmpage] PdeSrc=%#RX64 PteDst=%#RX64\n", 4417 GCPtr + off, pPhysPage, (uint64_t)PdeSrc.u, (uint64_t)PteDst.u)); 4421 4418 cErrors++; 4422 4419 continue; … … 4429 4426 if (PteDst.n.u1Present) 4430 4427 { 4431 AssertMsgFailed(("ALL access flagged at %RGv but the page is present! HCPhys=%RHpPdeSrc=%#RX64 PteDst=%#RX64\n",4432 GCPtr + off, pPhysPage ->HCPhys, (uint64_t)PdeSrc.u, (uint64_t)PteDst.u));4428 AssertMsgFailed(("ALL access flagged at %RGv but the page is present! pPhysPage=%R[pgmpage] PdeSrc=%#RX64 PteDst=%#RX64\n", 4429 GCPtr + off, pPhysPage, (uint64_t)PdeSrc.u, (uint64_t)PteDst.u)); 4433 4430 cErrors++; 4434 4431 continue; -
trunk/src/VBox/VMM/VMMAll/PGMAllHandler.cpp
r17285 r17316 952 952 * GCPhysPageRemap to be a MMIO2 page might help matters because those 953 953 * pages aren't managed dynamically (at least not yet). 954 * VBOX_WITH_NEW_PHYS_CODE TODO! */ 954 * VBOX_WITH_NEW_PHYS_CODE TODO! 955 * 956 * A solution to this would be to temporarily change the page into a MMIO2 one 957 * and record that we've changed it. Only the physical page address would 958 * need to be copied over. The aliased page would have to be MMIO2 ofc, since 959 * RAM or ROM pages would require write sharing which is something we don't 960 * intend to implement just yet... */ 955 961 956 962 PPGMPAGE pPageRemap; … … 973 979 #endif 974 980 975 LogFlow(("PGMHandlerPhysicalPageAlias %RGp -> %RGp - %RHp\n", GCPhysPage, GCPhysPageRemap, pPageRemap->HCPhys)); 981 LogFlow(("PGMHandlerPhysicalPageAlias %RGp alias for %RGp (%R[pgmpage]) -> %R[pgmpage]\n", 982 GCPhysPage, GCPhysPageRemap, pPageRemap, pPage)); 976 983 PGM_PAGE_SET_HNDL_PHYS_STATE(pPage, PGM_PAGE_HNDL_PHYS_STATE_DISABLED); 977 984 #ifndef IN_RC … … 1451 1458 if (PGM_PAGE_GET_HNDL_VIRT_STATE(pPage) < uState) 1452 1459 { 1453 AssertMsgFailed(("virt handler state mismatch. HCPhys=%RHpGCPhysGst=%RGp iPage=%#x %RGv state=%d expected>=%d %s\n",1454 pPage ->HCPhys, GCPhysGst, iPage, GCPtr, PGM_PAGE_GET_HNDL_VIRT_STATE(pPage), uState, R3STRING(pVirt->pszDesc)));1460 AssertMsgFailed(("virt handler state mismatch. pPage=%R[pgmpage] GCPhysGst=%RGp iPage=%#x %RGv state=%d expected>=%d %s\n", 1461 pPage, GCPhysGst, iPage, GCPtr, PGM_PAGE_GET_HNDL_VIRT_STATE(pPage), uState, R3STRING(pVirt->pszDesc))); 1455 1462 pState->cErrors++; 1456 1463 continue; -
trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp
r17286 r17316 2798 2798 static void pgmPoolTrackFlushGCPhysPTInt(PVM pVM, PCPGMPAGE pPhysPage, uint16_t iShw, uint16_t cRefs) 2799 2799 { 2800 LogFlow(("pgmPoolTrackFlushGCPhysPT: HCPhys=%RHp iShw=%d cRefs=%d\n", pPhysPage->HCPhys, iShw, cRefs));2800 LogFlow(("pgmPoolTrackFlushGCPhysPT: pPhysPage=%R[pgmpage] iShw=%d cRefs=%d\n", pPhysPage, iShw, cRefs)); 2801 2801 PPGMPOOL pPool = pVM->pgm.s.CTX_SUFF(pPool); 2802 2802 … … 2914 2914 { 2915 2915 PPGMPOOL pPool = pVM->pgm.s.CTX_SUFF(pPool); NOREF(pPool); 2916 LogFlow(("pgmPoolTrackFlushGCPhysPT: HCPhys=%RHp iShw=%d cRefs=%d\n", pPhysPage->HCPhys, iShw, cRefs));2916 LogFlow(("pgmPoolTrackFlushGCPhysPT: pPhysPage=%R[pgmpage] iShw=%d cRefs=%d\n", pPhysPage, iShw, cRefs)); 2917 2917 STAM_PROFILE_START(&pPool->StatTrackFlushGCPhysPT, f); 2918 2918 pgmPoolTrackFlushGCPhysPTInt(pVM, pPhysPage, iShw, cRefs); … … 2933 2933 PPGMPOOL pPool = pVM->pgm.s.CTX_SUFF(pPool); 2934 2934 STAM_PROFILE_START(&pPool->StatTrackFlushGCPhysPTs, f); 2935 LogFlow(("pgmPoolTrackFlushGCPhysPTs: HCPhys=%RHp iPhysExt\n", pPhysPage->HCPhys, iPhysExt));2935 LogFlow(("pgmPoolTrackFlushGCPhysPTs: pPhysPage=%R[pgmpage] iPhysExt\n", pPhysPage, iPhysExt)); 2936 2936 2937 2937 const uint16_t iPhysExtStart = iPhysExt; … … 2980 2980 PPGMPOOL pPool = pVM->pgm.s.CTX_SUFF(pPool); 2981 2981 STAM_PROFILE_START(&pPool->StatTrackFlushGCPhysPTsSlow, s); 2982 LogFlow(("pgmPoolTrackFlushGCPhysPTsSlow: cUsedPages=%d cPresent=%d HCPhys=%RHp\n",2983 pPool->cUsedPages, pPool->cPresent, pPhysPage ->HCPhys));2982 LogFlow(("pgmPoolTrackFlushGCPhysPTsSlow: cUsedPages=%d cPresent=%d pPhysPage=%R[pgmpage]\n", 2983 pPool->cUsedPages, pPool->cPresent, pPhysPage)); 2984 2984 2985 2985 #if 1 … … 3453 3453 { 3454 3454 const unsigned cRefs = PGM_PAGE_GET_TD_CREFS(pPhysPage); 3455 AssertFatalMsg(cRefs == PGMPOOL_TD_CREFS_PHYSEXT, ("cRefs=%d HCPhys=%RHp pPage=%p:{.idx=%d}\n", cRefs, pPhysPage->HCPhys, pPage, pPage->idx));3455 AssertFatalMsg(cRefs == PGMPOOL_TD_CREFS_PHYSEXT, ("cRefs=%d pPhysPage=%R[pgmpage] pPage=%p:{.idx=%d}\n", cRefs, pPhysPage, pPage, pPage->idx)); 3456 3456 3457 3457 uint16_t iPhysExt = PGM_PAGE_GET_TD_IDX(pPhysPage); … … 3476 3476 if (paPhysExts[iPhysExt].aidx[i] != NIL_PGMPOOL_IDX) 3477 3477 { 3478 Log2(("pgmPoolTrackPhysExtDerefGCPhys: HCPhys=%RX64 idx=%d\n", pPhysPage->HCPhys, pPage->idx));3478 Log2(("pgmPoolTrackPhysExtDerefGCPhys: pPhysPage=%R[pgmpage] idx=%d\n", pPhysPage, pPage->idx)); 3479 3479 return; 3480 3480 } … … 3488 3488 /* lonely node */ 3489 3489 pgmPoolTrackPhysExtFree(pVM, iPhysExt); 3490 Log2(("pgmPoolTrackPhysExtDerefGCPhys: HCPhys=%RX64 idx=%d lonely\n", pPhysPage->HCPhys, pPage->idx));3490 Log2(("pgmPoolTrackPhysExtDerefGCPhys: pPhysPage=%R[pgmpage] idx=%d lonely\n", pPhysPage, pPage->idx)); 3491 3491 PGM_PAGE_SET_TRACKING(pPhysPage, 0); 3492 3492 } … … 3494 3494 { 3495 3495 /* head */ 3496 Log2(("pgmPoolTrackPhysExtDerefGCPhys: HCPhys=%RX64 idx=%d head\n", pPhysPage->HCPhys, pPage->idx));3496 Log2(("pgmPoolTrackPhysExtDerefGCPhys: pPhysPage=%R[pgmpage] idx=%d head\n", pPhysPage, pPage->idx)); 3497 3497 PGM_PAGE_SET_TRACKING(pPhysPage, PGMPOOL_TD_MAKE(PGMPOOL_TD_CREFS_PHYSEXT, iPhysExtNext)); 3498 3498 pgmPoolTrackPhysExtFree(pVM, iPhysExt); … … 3501 3501 { 3502 3502 /* in list */ 3503 Log2(("pgmPoolTrackPhysExtDerefGCPhys: HCPhys=%RX64 idx=%d\n", pPhysPage->HCPhys, pPage->idx));3503 Log2(("pgmPoolTrackPhysExtDerefGCPhys: pPhysPage=%R[pgmpage] idx=%d\n", pPhysPage, pPage->idx)); 3504 3504 paPhysExts[iPhysExtPrev].iNext = iPhysExtNext; 3505 3505 pgmPoolTrackPhysExtFree(pVM, iPhysExt); … … 3515 3515 } while (iPhysExt != NIL_PGMPOOL_PHYSEXT_INDEX); 3516 3516 3517 AssertFatalMsgFailed(("not-found! cRefs=%d HCPhys=%RHp pPage=%p:{.idx=%d}\n", cRefs, pPhysPage->HCPhys, pPage, pPage->idx));3517 AssertFatalMsgFailed(("not-found! cRefs=%d pPhysPage=%R[pgmpage] pPage=%p:{.idx=%d}\n", cRefs, pPhysPage, pPage, pPage->idx)); 3518 3518 } 3519 3519 else /* nothing to do */ 3520 Log2(("pgmPoolTrackPhysExtDerefGCPhys: HCPhys=%RX64\n", pPhysPage->HCPhys));3520 Log2(("pgmPoolTrackPhysExtDerefGCPhys: pPhysPage=%R[pgmpage]\n", pPhysPage)); 3521 3521 } 3522 3522
Note:
See TracChangeset
for help on using the changeset viewer.