- Timestamp:
- Jul 7, 2008 3:53:51 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp
r10324 r10334 324 324 && (off & 7) + pgmPoolDisasWriteSize(pCpu) > sizeof(X86PTEPAE)) 325 325 { 326 AssertFailed(); 326 const unsigned iShw2 = (off + pgmPoolDisasWriteSize(pCpu) - 1) / sizeof(X86PTEPAE); 327 AssertReturnVoid(iShw2 < ELEMENTS(uShw.pPTPae->a)); 328 329 # ifdef PGMPOOL_WITH_GCPHYS_TRACKING 330 PCX86PTEPAE pGstPte = (PCX86PTEPAE)pgmPoolMonitorGCPtr2CCPtr(pPool, pvAddress, GCPhysFault, sizeof(*pGstPte)); 331 Log4(("pgmPoolMonitorChainChanging pae_32: deref %VHp GCPhys %VGp\n", uShw.pPTPae->a[iShw2].u & X86_PTE_PAE_PG_MASK, pGstPte->u & X86_PTE_PAE_PG_MASK)); 332 pgmPoolTracDerefGCPhysHint(pPool, pPage, 333 uShw.pPTPae->a[iShw2].u & X86_PTE_PAE_PG_MASK, 334 pGstPte->u & X86_PTE_PAE_PG_MASK); 335 # endif 336 uShw.pPTPae->a[iShw].u = 0; 327 337 } 328 338 … … 342 352 else if ( pCpu 343 353 && (off & 3) 344 && (off & 3) + pgmPoolDisasWriteSize(pCpu) > 4)354 && (off & 3) + pgmPoolDisasWriteSize(pCpu) > sizeof(X86PTE)) 345 355 { 346 356 const unsigned iShw2 = (off + pgmPoolDisasWriteSize(pCpu) - 1) / sizeof(X86PTE); … … 674 684 675 685 /** 676 * Determin whether the page is likely to have been reused.686 * Determine whether the page is likely to have been reused. 677 687 * 678 688 * @returns true if we consider the page as being reused for a different purpose. 679 689 * @returns false if we consider it to still be a paging page. 680 690 * @param pPage The page in question. 691 * @param pRegFrame Trap register frame. 681 692 * @param pCpu The disassembly info for the faulting insturction. 682 693 * @param pvFault The fault address. … … 684 695 * @remark The REP prefix check is left to the caller because of STOSD/W. 685 696 */ 686 DECLINLINE(bool) pgmPoolMonitorIsReused(PPGMPOOLPAGE pPage, P DISCPUSTATE pCpu, RTGCPTR pvFault)697 DECLINLINE(bool) pgmPoolMonitorIsReused(PPGMPOOLPAGE pPage, PCPUMCTXCORE pRegFrame, PDISCPUSTATE pCpu, RTGCPTR pvFault) 687 698 { 688 699 switch (pCpu->pCurInstr->opcode) … … 706 717 Log4(("pgmPoolMonitorIsReused: MOVNTDQ\n")); 707 718 return true; 719 case OP_STOSWD: 720 if ( pRegFrame 721 && pCpu->prefix == PREFIX_REP 722 && pRegFrame->rcx == 0x200 723 && pCpu->mode == CPUMODE_64BIT 724 ) 725 { 726 Log4(("pgmPoolMonitorIsReused: OP_STOSQ\n")); 727 return true; 728 } 729 return false; 708 730 } 709 731 if ( (pCpu->param1.flags & USE_REG_GEN32) … … 927 949 if ( ( pPage->cModifications < 48 /** @todo #define */ /** @todo need to check that it's not mapping EIP. */ /** @todo adjust this! */ 928 950 || pPage->fCR3Mix) 929 && !(fReused = pgmPoolMonitorIsReused(pPage, &Cpu, pvFault))951 && !(fReused = pgmPoolMonitorIsReused(pPage, pRegFrame, &Cpu, pvFault)) 930 952 && !pgmPoolMonitorIsForking(pPool, &Cpu, GCPhysFault & PAGE_OFFSET_MASK)) 931 953 {
Note:
See TracChangeset
for help on using the changeset viewer.