Changeset 31780 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Aug 19, 2010 11:12:18 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 64967
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAll.cpp
r31636 r31780 460 460 pgmUnlock(pVM); 461 461 } 462 if (rc == VINF_PGM_SYNCPAGE_MODIFIED_PDE) 463 rc = VINF_SUCCESS; 462 LogFlow(("PGMTrap0eHandler: uErr=%RGx pvFault=%RGv rc=%Rrc\n", uErr, pvFault, rc)); 463 464 /* 465 * Return code tweaks. 466 */ 467 if (rc != VINF_SUCCESS) 468 { 469 if (rc == VINF_PGM_SYNCPAGE_MODIFIED_PDE) 470 rc = VINF_SUCCESS; 464 471 465 472 # ifdef IN_RING0 466 /* Note: hack alert for difficult to reproduce problem. */467 if ( rc == VERR_PAGE_NOT_PRESENT /* SMP only ; disassembly might fail. */468 || rc == VERR_PAGE_TABLE_NOT_PRESENT /* seen with UNI & SMP */469 || rc == VERR_PAGE_DIRECTORY_PTR_NOT_PRESENT /* seen with SMP */470 || rc == VERR_PAGE_MAP_LEVEL4_NOT_PRESENT) /* precaution */471 {472 Log(("WARNING: Unexpected VERR_PAGE_TABLE_NOT_PRESENT (%d) for page fault at %RGv error code %x (rip=%RGv)\n", rc, pvFault, uErr, pRegFrame->rip));473 /* Some kind of inconsistency in the SMP case; it's safe to just execute the instruction again; not sure about single VCPU VMs though. */474 rc = VINF_SUCCESS;475 }473 /* Note: hack alert for difficult to reproduce problem. */ 474 if ( rc == VERR_PAGE_NOT_PRESENT /* SMP only ; disassembly might fail. */ 475 || rc == VERR_PAGE_TABLE_NOT_PRESENT /* seen with UNI & SMP */ 476 || rc == VERR_PAGE_DIRECTORY_PTR_NOT_PRESENT /* seen with SMP */ 477 || rc == VERR_PAGE_MAP_LEVEL4_NOT_PRESENT) /* precaution */ 478 { 479 Log(("WARNING: Unexpected VERR_PAGE_TABLE_NOT_PRESENT (%d) for page fault at %RGv error code %x (rip=%RGv)\n", rc, pvFault, uErr, pRegFrame->rip)); 480 /* Some kind of inconsistency in the SMP case; it's safe to just execute the instruction again; not sure about single VCPU VMs though. */ 481 rc = VINF_SUCCESS; 482 } 476 483 # endif 484 } 477 485 478 486 STAM_STATS({ if (rc == VINF_EM_RAW_GUEST_TRAP) STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatRZTrap0eGuestPF); }); -
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r31775 r31780 232 232 233 233 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatRZTrap0eHandlersPhysical); 234 if (uErr & X86_TRAP_PF_RSVD) STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatRZTrap0eHandlersPhysical );234 if (uErr & X86_TRAP_PF_RSVD) STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->StatRZTrap0eHandlersPhysicalOpt); 235 235 STAM_STATS({ pVCpu->pgm.s.CTX_SUFF(pStatTrap0eAttribution) = &pVCpu->pgm.s.CTX_SUFF(pStats)->StatRZTrap0eTime2HndPhys; }); 236 236 return rc; … … 514 514 # if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) 515 515 rc = pgmPhysGetPageEx(&pVM->pgm.s, GstWalk.Core.GCPhys, &pPage); 516 if (RT_SUCCESS(rc) && PGM_PAGE_HAS_ACTIVE_ HANDLERS(pPage))516 if (RT_SUCCESS(rc) && PGM_PAGE_HAS_ACTIVE_ALL_HANDLERS(pPage)) 517 517 return VBOXSTRICTRC_TODO(PGM_BTH_NAME(Trap0eHandlerDoAccessHandlers)(pVCpu, uErr, pRegFrame, pvFault, pPage, 518 518 pfLockTaken, &GstWalk)); … … 520 520 # else 521 521 rc = pgmPhysGetPageEx(&pVM->pgm.s, (RTGCPHYS)pvFault, &pPage); 522 if (RT_SUCCESS(rc) && PGM_PAGE_HAS_ACTIVE_ HANDLERS(pPage))522 if (RT_SUCCESS(rc) && PGM_PAGE_HAS_ACTIVE_ALL_HANDLERS(pPage)) 523 523 return VBOXSTRICTRC_TODO(PGM_BTH_NAME(Trap0eHandlerDoAccessHandlers)(pVCpu, uErr, pRegFrame, pvFault, pPage, 524 524 pfLockTaken)); … … 2791 2791 */ 2792 2792 /* Get address and flags from the source PDE. */ 2793 Assert(GST_IS_PDE_VALID(pVCpu, PdeSrc)); 2793 2794 SHWPTE PteDstBase; 2794 2795 SHW_PTE_SET(PteDstBase, PdeSrc.u & ~(GST_PDE_PG_MASK | X86_PTE_AVL_MASK | X86_PTE_PAT | X86_PTE_PCD | X86_PTE_PWT)); … … 2840 2841 2841 2842 if (PGM_PAGE_HAS_ACTIVE_HANDLERS(pPage)) 2842 { 2843 /** @todo call SyncHandlerPte !! 2844 * FIXME FIXME FIXME */ 2845 if (!PGM_PAGE_HAS_ACTIVE_ALL_HANDLERS(pPage)) 2846 { 2847 SHW_PTE_SET(PteDst, PGM_PAGE_GET_HCPHYS(pPage) | SHW_PTE_GET_U(PteDstBase)); 2848 SHW_PTE_SET_RO(PteDst); 2849 } 2850 else 2851 SHW_PTE_SET(PteDst, 0); 2852 } 2843 PGM_BTH_NAME(SyncHandlerPte)(pVM, pPage, SHW_PTE_GET_U(PteDstBase), &PteDst); 2853 2844 else if (PGM_PAGE_IS_BALLOONED(pPage)) 2854 2845 SHW_PTE_SET(PteDst, 0); /* Handle ballooned pages at #PF time. */
Note:
See TracChangeset
for help on using the changeset viewer.