- Timestamp:
- Jan 10, 2022 7:59:44 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAllGst.h
r93115 r93160 184 184 else return PGM_GST_NAME(WalkReturnRsvdError)(pVCpu, pWalk, 4); 185 185 186 pWalk->fEffective = fEffective = Pml4e.u & ( X86_PML4E_P | X86_PML4E_RW | X86_PML4E_US | X86_PML4E_PWT 187 | X86_PML4E_PCD | X86_PML4E_A | X86_PML4E_NX); 186 fEffective = Pml4e.u & ( X86_PML4E_P | X86_PML4E_RW | X86_PML4E_US | X86_PML4E_PWT | X86_PML4E_PCD | X86_PML4E_A 187 | X86_PML4E_NX); 188 pWalk->fEffective = fEffective; 188 189 189 190 /* … … 218 219 219 220 # if PGM_GST_TYPE == PGM_TYPE_AMD64 220 pWalk->fEffective =fEffective &= (Pdpe.u & ( X86_PDPE_P | X86_PDPE_RW | X86_PDPE_US221 | X86_PDPE_PWT | X86_PDPE_PCD | X86_PDPE_A))222 | (Pdpe.u & X86_PDPE_LM_NX);221 fEffective &= (Pdpe.u & ( X86_PDPE_P | X86_PDPE_RW | X86_PDPE_US 222 | X86_PDPE_PWT | X86_PDPE_PCD | X86_PDPE_A)); 223 fEffective |= Pdpe.u & X86_PDPE_LM_NX; 223 224 # else 224 /* NX in the legacy-mode PAE PDPE is reserved. The valid check above ensures the NX bit is not set. */ 225 pWalk->fEffective = fEffective = X86_PDPE_P | X86_PDPE_RW | X86_PDPE_US | X86_PDPE_A 226 | (Pdpe.u & (X86_PDPE_PWT | X86_PDPE_PCD)); 227 # endif 225 /* 226 * NX in the legacy-mode PAE PDPE is reserved. The valid check above ensures the NX bit is not set. 227 * The RW, US, A bits MBZ in PAE PDPTE entries but must be 1 the way we compute cumulative (effective) access rights. 228 */ 229 Assert(!(Pdpe.u & X86_PDPE_LM_NX)); 230 fEffective = X86_PDPE_P | X86_PDPE_RW | X86_PDPE_US | X86_PDPE_A 231 | (Pdpe.u & (X86_PDPE_PWT | X86_PDPE_PCD)); 232 # endif 233 pWalk->fEffective = fEffective; 228 234 229 235 /* … … 260 266 */ 261 267 # if PGM_GST_TYPE == PGM_TYPE_32BIT 262 fEffective = 268 fEffective = Pde.u & (X86_PDE4M_P | X86_PDE4M_RW | X86_PDE4M_US | X86_PDE4M_PWT | X86_PDE4M_PCD | X86_PDE4M_A); 263 269 # else 264 fEffective &= (Pde.u & (X86_PDE4M_P | X86_PDE4M_RW | X86_PDE4M_US | X86_PDE4M_PWT | X86_PDE4M_PCD | X86_PDE4M_A))265 | (Pde.u & X86_PDE2M_PAE_NX);270 fEffective &= Pde.u & (X86_PDE4M_P | X86_PDE4M_RW | X86_PDE4M_US | X86_PDE4M_PWT | X86_PDE4M_PCD | X86_PDE4M_A); 271 fEffective |= Pde.u & X86_PDE2M_PAE_NX; 266 272 # endif 267 273 fEffective |= Pde.u & (X86_PDE4M_D | X86_PDE4M_G); … … 286 292 return PGM_GST_NAME(WalkReturnRsvdError)(pVCpu, pWalk, 2); 287 293 # if PGM_GST_TYPE == PGM_TYPE_32BIT 288 pWalk->fEffective = fEffective = Pde.u & ( X86_PDE_P | X86_PDE_RW | X86_PDE_US 289 | X86_PDE_PWT | X86_PDE_PCD | X86_PDE_A); 294 fEffective = Pde.u & (X86_PDE_P | X86_PDE_RW | X86_PDE_US | X86_PDE_PWT | X86_PDE_PCD | X86_PDE_A); 290 295 # else 291 pWalk->fEffective = fEffective &= (Pde.u & ( X86_PDE_P | X86_PDE_RW | X86_PDE_US292 | X86_PDE_PWT | X86_PDE_PCD | X86_PDE_A))293 | (Pde.u & X86_PDE_PAE_NX); 294 # endif 296 fEffective &= Pde.u & (X86_PDE_P | X86_PDE_RW | X86_PDE_US | X86_PDE_PWT | X86_PDE_PCD | X86_PDE_A); 297 fEffective |= Pde.u & X86_PDE_PAE_NX; 298 # endif 299 pWalk->fEffective = fEffective; 295 300 296 301 /* … … 320 325 * We're done. 321 326 */ 322 # if PGM_GST_TYPE == PGM_TYPE_32BIT 323 fEffective &= Pte.u & (X86_PTE_P | X86_PTE_RW | X86_PTE_US | X86_PTE_PWT | X86_PTE_PCD | X86_PTE_A); 324 # else 325 fEffective &= (Pte.u & (X86_PTE_P | X86_PTE_RW | X86_PTE_US | X86_PTE_PWT | X86_PTE_PCD | X86_PTE_A)) 326 | (Pte.u & X86_PTE_PAE_NX); 327 # endif 327 fEffective &= Pte.u & (X86_PTE_P | X86_PTE_RW | X86_PTE_US | X86_PTE_PWT | X86_PTE_PCD | X86_PTE_A); 328 328 fEffective |= Pte.u & (X86_PTE_D | X86_PTE_PAT | X86_PTE_G); 329 # if PGM_GST_TYPE != PGM_TYPE_32BIT 330 fEffective |= Pte.u & X86_PTE_PAE_NX; 331 # endif 329 332 pWalk->fEffective = fEffective; 330 333 Assert(GST_IS_NX_ACTIVE(pVCpu) || !(fEffective & PGM_PTATTRS_NX_MASK));
Note:
See TracChangeset
for help on using the changeset viewer.