| | 3058 | /** |
|---|
| | 3059 | * Clear references to shadowed pages in a 64-bit level 4 page table. |
|---|
| | 3060 | * |
|---|
| | 3061 | * @param pPool The pool. |
|---|
| | 3062 | * @param pPage The page. |
|---|
| | 3063 | * @param pShwPML4 The shadow page directory pointer table (mapping of the page). |
|---|
| | 3064 | */ |
|---|
| | 3065 | DECLINLINE(void) pgmPoolTrackDerefPML464Bit(PPGMPOOL pPool, PPGMPOOLPAGE pPage, PX86PML4 pShwPML4) |
|---|
| | 3066 | { |
|---|
| | 3067 | for (unsigned i = 0; i < ELEMENTS(pShwPML4->a); i++) |
|---|
| | 3068 | { |
|---|
| | 3069 | if (pShwPML4->a[i].n.u1Present) |
|---|
| | 3070 | { |
|---|
| | 3071 | PPGMPOOLPAGE pSubPage = (PPGMPOOLPAGE)RTAvloHCPhysGet(&pPool->HCPhysTree, pShwPML4->a[i].u & X86_PDPE_PG_MASK); |
|---|
| | 3072 | if (pSubPage) |
|---|
| | 3073 | pgmPoolTrackFreeUser(pPool, pSubPage, pPage->idx, i); |
|---|
| | 3074 | else |
|---|
| | 3075 | AssertFatalMsgFailed(("%RX64\n", pShwPML4->a[i].u & X86_PML4E_PG_MASK)); |
|---|
| | 3076 | /** @todo 64-bit guests: have to ensure that we're not exhausting the dynamic mappings! */ |
|---|
| | 3077 | } |
|---|
| | 3078 | } |
|---|
| | 3079 | } |
|---|
| | 3080 | |
|---|