Changeset 16800 in vbox for trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
- Timestamp:
- Feb 16, 2009 4:42:17 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r16798 r16800 3429 3429 # endif 3430 3430 { 3431 # ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY3432 3431 if (pVM->pgm.s.fMappingsFixed) 3433 3432 { … … 3436 3435 Assert(PGM_GST_TYPE == PGM_TYPE_32BIT || (iPD + cPTs - 1) / X86_PG_PAE_ENTRIES == iPD / X86_PG_PAE_ENTRIES); 3437 3436 iPD += cPTs - 1; 3438 # 3437 # if PGM_SHW_TYPE != PGM_GST_TYPE /* SHW==PAE && GST==32BIT */ 3439 3438 pPDEDst = pgmShwGetPaePDEPtr(&pVM->pgm.s, (uint32_t)(iPD + 1) << GST_PD_SHIFT); 3440 # 3439 # else 3441 3440 pPDEDst += cPTs; 3442 # 3441 # endif 3443 3442 pMapping = pMapping->CTX_SUFF(pNext); 3444 3443 iPdNoMapping = pMapping ? pMapping->GCPtr >> GST_PD_SHIFT : ~0U; 3445 3444 continue; 3446 3445 } 3447 # endif /* !VBOX_WITH_PGMPOOL_PAGING_ONLY */3448 3446 # ifdef IN_RING3 3449 3447 # if PGM_GST_TYPE == PGM_TYPE_32BIT … … 3471 3469 # endif /* (PGM_GST_TYPE != PGM_TYPE_32BIT && PGM_GST_TYPE != PGM_TYPE_PAE) || PGM_WITHOUT_MAPPINGS */ 3472 3470 3473 # ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY 3471 # ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY 3472 /* advance */ 3473 # if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE == PGM_TYPE_32BIT 3474 pPDEDst += 2; 3475 # else 3476 pPDEDst++; 3477 # endif 3478 # else 3474 3479 /* 3475 3480 * Sync page directory entry. … … 3479 3484 * it's actually used. 3480 3485 */ 3481 # if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE == PGM_TYPE_32BIT3486 # if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE == PGM_TYPE_32BIT 3482 3487 for (unsigned i = 0, iPdShw = iPD * 2; i < 2; i++, iPdShw++) /* pray that the compiler unrolls this */ 3483 # elif PGM_GST_TYPE == PGM_TYPE_PAE3488 # elif PGM_GST_TYPE == PGM_TYPE_PAE 3484 3489 const unsigned iPdShw = iPD + iPdpt * X86_PG_PAE_ENTRIES; NOREF(iPdShw); 3485 # else3490 # else 3486 3491 const unsigned iPdShw = iPD; NOREF(iPdShw); 3487 # endif3492 # endif 3488 3493 { 3489 3494 SHWPDE PdeDst = *pPDEDst; … … 3496 3501 { 3497 3502 GCPhys = PdeSrc.u & GST_PDE_PG_MASK; 3498 # if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE == PGM_TYPE_32BIT3503 # if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE == PGM_TYPE_32BIT 3499 3504 /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. */ 3500 3505 GCPhys |= i * (PAGE_SIZE / 2); 3501 # endif3506 # endif 3502 3507 } 3503 3508 else 3504 3509 { 3505 3510 GCPhys = GST_GET_PDE_BIG_PG_GCPHYS(PdeSrc); 3506 # if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE == PGM_TYPE_32BIT3511 # if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE == PGM_TYPE_32BIT 3507 3512 /* Select the right PDE as we're emulating a 4MB page directory with two 2 MB shadow PDEs.*/ 3508 3513 GCPhys |= i * X86_PAGE_2M_SIZE; 3509 # endif3514 # endif 3510 3515 } 3511 3516 … … 3515 3520 || ( !fGlobal 3516 3521 && ( false 3517 # ifdef PGM_SKIP_GLOBAL_PAGEDIRS_ON_NONGLOBAL_FLUSH3522 # ifdef PGM_SKIP_GLOBAL_PAGEDIRS_ON_NONGLOBAL_FLUSH 3518 3523 || ( (PdeSrc.u & (X86_PDE4M_PS | X86_PDE4M_G)) == (X86_PDE4M_PS | X86_PDE4M_G) 3519 3524 && (cr4 & (X86_CR4_PGE | X86_CR4_PSE)) == (X86_CR4_PGE | X86_CR4_PSE)) /* global 2/4MB page. */ 3520 3525 || ( !pShwPage->fSeenNonGlobal 3521 3526 && (cr4 & X86_CR4_PGE)) 3522 # endif3527 # endif 3523 3528 ) 3524 3529 ) … … 3531 3536 ) 3532 3537 { 3533 # ifdef VBOX_WITH_STATISTICS3538 # ifdef VBOX_WITH_STATISTICS 3534 3539 if ( !fGlobal 3535 3540 && (PdeSrc.u & (X86_PDE4M_PS | X86_PDE4M_G)) == (X86_PDE4M_PS | X86_PDE4M_G) … … 3540 3545 else 3541 3546 MY_STAM_COUNTER_INC(&pVM->pgm.s.CTX_MID_Z(Stat,SyncCR3DstCacheHit)); 3542 # endif /* VBOX_WITH_STATISTICS */3547 # endif /* VBOX_WITH_STATISTICS */ 3543 3548 /** @todo a replacement strategy isn't really needed unless we're using a very small pool < 512 pages. 3544 3549 * The whole ageing stuff should be put in yet another set of #ifdefs. For now, let's just skip it. */ … … 3568 3573 # endif 3569 3574 { 3570 # ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY3571 3575 /* 3572 3576 * Check if there is any page directory to mark not present here. 3573 3577 */ 3578 # ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY 3579 /* advance */ 3580 # if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE == PGM_TYPE_32BIT 3581 pPDEDst += 2; 3582 # else 3583 pPDEDst++; 3584 # endif 3585 # else 3574 3586 # if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE == PGM_TYPE_32BIT 3575 3587 for (unsigned i = 0, iPdShw = iPD * 2; i < 2; i++, iPdShw++) /* pray that the compiler unrolls this */ … … 3607 3619 } 3608 3620 else 3609 # endif 3621 # endif /* !VBOX_WITH_PGMPOOL_PAGING_ONLY */ 3610 3622 { 3611 3623 /*
Note:
See TracChangeset
for help on using the changeset viewer.