Changeset 92331 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Nov 10, 2021 4:55:00 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAllGst.h
r92319 r92331 149 149 # endif 150 150 151 uint64_t fEffective = X86_PTE_RW | X86_PTE_US | X86_PTE_PWT | X86_PTE_PCD | X86_PTE_A | 1; /** @todo can this default assignment be removed? */151 uint64_t fEffective; 152 152 { 153 153 # if PGM_GST_TYPE == PGM_TYPE_AMD64 … … 170 170 else return PGM_GST_NAME(WalkReturnRsvdError)(pVCpu, pWalk, 4); 171 171 172 pWalk->Core.fEffective = fEffective = Pml4e.u & ( X86_PML4E_ RW| X86_PML4E_US | X86_PML4E_PWT172 pWalk->Core.fEffective = fEffective = Pml4e.u & ( X86_PML4E_P | X86_PML4E_RW | X86_PML4E_US | X86_PML4E_PWT 173 173 | X86_PML4E_PCD | X86_PML4E_A | X86_PML4E_NX); 174 174 … … 204 204 205 205 # if PGM_GST_TYPE == PGM_TYPE_AMD64 206 pWalk->Core.fEffective = fEffective &= (Pdpe.u & (X86_PDPE_RW | X86_PDPE_US | X86_PDPE_PWT | X86_PDPE_PCD | X86_PDPE_A)) 206 pWalk->Core.fEffective = fEffective &= (Pdpe.u & ( X86_PDPE_P | X86_PDPE_RW | X86_PDPE_US 207 | X86_PDPE_PWT | X86_PDPE_PCD | X86_PDPE_A)) 207 208 | (Pdpe.u & X86_PDPE_LM_NX); 208 209 # else 209 210 /* NX in the legacy-mode PAE PDPE is reserved. The valid check above ensures the NX bit is not set. */ 210 pWalk->Core.fEffective = fEffective = X86_PDPE_ RW | X86_PDPE_US | X86_PDPE_A211 pWalk->Core.fEffective = fEffective = X86_PDPE_P | X86_PDPE_RW | X86_PDPE_US | X86_PDPE_A 211 212 | (Pdpe.u & (X86_PDPE_PWT | X86_PDPE_PCD)); 212 213 # endif … … 245 246 */ 246 247 # if PGM_GST_TYPE == PGM_TYPE_32BIT 247 fEffective &= Pde.u & (X86_PDE4M_RW | X86_PDE4M_US | X86_PDE4M_PWT | X86_PDE4M_PCD | X86_PDE4M_A);248 fEffective = Pde.u & (X86_PDE4M_P | X86_PDE4M_RW | X86_PDE4M_US | X86_PDE4M_PWT | X86_PDE4M_PCD | X86_PDE4M_A); 248 249 # else 249 fEffective &= (Pde.u & (X86_PDE4M_ RW | X86_PDE4M_US | X86_PDE4M_PWT | X86_PDE4M_PCD | X86_PDE4M_A))250 fEffective &= (Pde.u & (X86_PDE4M_P | X86_PDE4M_RW | X86_PDE4M_US | X86_PDE4M_PWT | X86_PDE4M_PCD | X86_PDE4M_A)) 250 251 | (Pde.u & X86_PDE2M_PAE_NX); 251 252 # endif … … 254 255 pWalk->Core.fEffective = fEffective; 255 256 Assert(GST_IS_NX_ACTIVE(pVCpu) || !(fEffective & PGM_PTATTRS_NX_MASK)); 257 Assert(fEffective & PGM_PTATTRS_R_MASK); 256 258 257 259 pWalk->Core.fEffectiveRW = !!(fEffective & X86_PTE_RW); … … 273 275 return PGM_GST_NAME(WalkReturnRsvdError)(pVCpu, pWalk, 2); 274 276 # if PGM_GST_TYPE == PGM_TYPE_32BIT 275 pWalk->Core.fEffective = fEffective &= Pde.u & (X86_PDE_RW | X86_PDE_US | X86_PDE_PWT | X86_PDE_PCD | X86_PDE_A); 277 pWalk->Core.fEffective = fEffective = Pde.u & ( X86_PDE_P | X86_PDE_RW | X86_PDE_US 278 | X86_PDE_PWT | X86_PDE_PCD | X86_PDE_A); 276 279 # else 277 pWalk->Core.fEffective = fEffective &= (Pde.u & (X86_PDE_RW | X86_PDE_US | X86_PDE_PWT | X86_PDE_PCD | X86_PDE_A)) 280 pWalk->Core.fEffective = fEffective &= (Pde.u & ( X86_PDE_P | X86_PDE_RW | X86_PDE_US 281 | X86_PDE_PWT | X86_PDE_PCD | X86_PDE_A)) 278 282 | (Pde.u & X86_PDE_PAE_NX); 279 283 # endif … … 306 310 */ 307 311 # if PGM_GST_TYPE == PGM_TYPE_32BIT 308 fEffective &= Pte.u & (X86_PTE_RW | X86_PTE_US | X86_PTE_PWT | X86_PTE_PCD | X86_PTE_A);312 fEffective &= Pte.u & (X86_PTE_P | X86_PTE_RW | X86_PTE_US | X86_PTE_PWT | X86_PTE_PCD | X86_PTE_A); 309 313 # else 310 fEffective &= (Pte.u & (X86_PTE_ RW | X86_PTE_US | X86_PTE_PWT | X86_PTE_PCD | X86_PTE_A))314 fEffective &= (Pte.u & (X86_PTE_P | X86_PTE_RW | X86_PTE_US | X86_PTE_PWT | X86_PTE_PCD | X86_PTE_A)) 311 315 | (Pte.u & X86_PTE_PAE_NX); 312 316 # endif … … 314 318 pWalk->Core.fEffective = fEffective; 315 319 Assert(GST_IS_NX_ACTIVE(pVCpu) || !(fEffective & PGM_PTATTRS_NX_MASK)); 320 Assert(fEffective & PGM_PTATTRS_R_MASK); 316 321 317 322 pWalk->Core.fEffectiveRW = !!(fEffective & X86_PTE_RW); … … 376 381 if (!Walk.Core.fBigPage) 377 382 *pfFlags = (Walk.Pte.u & ~(GST_PTE_PG_MASK | X86_PTE_RW | X86_PTE_US)) /* NX not needed */ 378 | (Walk.Core.fEffective & ( PGM_PTATTRS_ RW_MASK383 | (Walk.Core.fEffective & ( PGM_PTATTRS_W_MASK 379 384 | PGM_PTATTRS_US_MASK)) 380 385 # if PGM_WITH_NX(PGM_GST_TYPE, PGM_GST_TYPE) … … 385 390 { 386 391 *pfFlags = (Walk.Pde.u & ~(GST_PTE_PG_MASK | X86_PDE4M_RW | X86_PDE4M_US | X86_PDE4M_PS)) /* NX not needed */ 387 | (Walk.Core.fEffective & ( PGM_PTATTRS_ RW_MASK392 | (Walk.Core.fEffective & ( PGM_PTATTRS_W_MASK 388 393 | PGM_PTATTRS_US_MASK 389 394 | PGM_PTATTRS_PAT_MASK))
Note:
See TracChangeset
for help on using the changeset viewer.