Changeset 92257 in vbox for trunk/src/VBox/VMM/VMMAll/PGMAllGst.h
- Timestamp:
- Nov 8, 2021 9:04:38 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAllGst.h
r92186 r92257 149 149 # endif 150 150 151 uint 32_t fEffective = X86_PTE_RW | X86_PTE_US | X86_PTE_PWT | X86_PTE_PCD | X86_PTE_A | 1;151 uint64_t fEffective = X86_PTE_RW | X86_PTE_US | X86_PTE_PWT | X86_PTE_PCD | X86_PTE_A | 1; 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 = ( (uint32_t)Pml4e.u & (X86_PML4E_RW| X86_PML4E_US | X86_PML4E_PWT | X86_PML4E_PCD | X86_PML4E_A))173 | (( uint32_t)(Pml4e.u >> 63) ^ 1) /*NX */;172 pWalk->Core.fEffective = fEffective = (Pml4e.u & (X86_PML4E_RW | X86_PML4E_US | X86_PML4E_PWT | X86_PML4E_PCD | X86_PML4E_A)) 173 | ((Pml4e.u >> 63) ^ 1) /*NX */; 174 174 175 175 /* … … 204 204 205 205 # if PGM_GST_TYPE == PGM_TYPE_AMD64 206 pWalk->Core.fEffective = fEffective &= ( (uint32_t)Pdpe.u & (X86_PDPE_RW| X86_PDPE_US | X86_PDPE_PWT | X86_PDPE_PCD | X86_PDPE_A))207 | (( uint32_t)(Pdpe.u >> 63) ^ 1) /*NX */;206 pWalk->Core.fEffective = fEffective &= (Pdpe.u & (X86_PDPE_RW | X86_PDPE_US | X86_PDPE_PWT | X86_PDPE_PCD | X86_PDPE_A)) 207 | ((Pdpe.u >> 63) ^ 1) /*NX */; 208 208 # else 209 209 pWalk->Core.fEffective = fEffective = X86_PDPE_RW | X86_PDPE_US | X86_PDPE_A 210 | ( (uint32_t)Pdpe.u & (X86_PDPE_PWT | X86_PDPE_PCD))211 | (( uint32_t)(Pdpe.u >> 63) ^ 1) /*NX */;210 | (Pdpe.u & (X86_PDPE_PWT | X86_PDPE_PCD)) 211 | ((Pdpe.u >> 63) ^ 1) /*NX */; 212 212 # endif 213 213 … … 245 245 */ 246 246 # 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 # else 249 fEffective &= ( (uint32_t)Pde.u & (X86_PDE4M_RW| X86_PDE4M_US | X86_PDE4M_PWT | X86_PDE4M_PCD | X86_PDE4M_A))250 | (( uint32_t)(Pde.u >> 63) ^ 1) /*NX */;251 # endif 252 fEffective |= (uint32_t)Pde.u & (X86_PDE4M_D | X86_PDE4M_G);253 fEffective |= ( uint32_t)(Pde.u & X86_PDE4M_PAT) >> X86_PDE4M_PAT_SHIFT;247 fEffective &= Pde.u & (X86_PDE4M_RW | X86_PDE4M_US | X86_PDE4M_PWT | X86_PDE4M_PCD | X86_PDE4M_A); 248 # else 249 fEffective &= (Pde.u & (X86_PDE4M_RW | X86_PDE4M_US | X86_PDE4M_PWT | X86_PDE4M_PCD | X86_PDE4M_A)) 250 | ((Pde.u >> 63) ^ 1) /*NX */; 251 # endif 252 fEffective |= Pde.u & (X86_PDE4M_D | X86_PDE4M_G); 253 fEffective |= (Pde.u & X86_PDE4M_PAT) >> X86_PDE4M_PAT_SHIFT; 254 254 pWalk->Core.fEffective = fEffective; 255 255 … … 277 277 return PGM_GST_NAME(WalkReturnRsvdError)(pVCpu, pWalk, 2); 278 278 # if PGM_GST_TYPE == PGM_TYPE_32BIT 279 pWalk->Core.fEffective = fEffective &= Pde.u & (X86_PDE_RW 280 # else 281 pWalk->Core.fEffective = fEffective &= ( (uint32_t)Pde.u & (X86_PDE_RW| X86_PDE_US | X86_PDE_PWT | X86_PDE_PCD | X86_PDE_A))282 | (( uint32_t)(Pde.u >> 63) ^ 1) /*NX */;279 pWalk->Core.fEffective = fEffective &= Pde.u & (X86_PDE_RW | X86_PDE_US | X86_PDE_PWT | X86_PDE_PCD | X86_PDE_A); 280 # else 281 pWalk->Core.fEffective = fEffective &= (Pde.u & (X86_PDE_RW | X86_PDE_US | X86_PDE_PWT | X86_PDE_PCD | X86_PDE_A)) 282 | ((Pde.u >> 63) ^ 1) /*NX */; 283 283 # endif 284 284 … … 310 310 */ 311 311 # if PGM_GST_TYPE == PGM_TYPE_32BIT 312 fEffective &= Pte.u & (X86_PTE_RW 313 # else 314 fEffective &= ( (uint32_t)Pte.u & (X86_PTE_RW| X86_PTE_US | X86_PTE_PWT | X86_PTE_PCD | X86_PTE_A))315 | ((uint32_t)(Pte.u >> 63) ^ 1) /*NX */;316 # endif 317 fEffective |= (uint32_t)Pte.u & (X86_PTE_D | X86_PTE_PAT | X86_PTE_G);312 fEffective &= Pte.u & (X86_PTE_RW | X86_PTE_US | X86_PTE_PWT | X86_PTE_PCD | X86_PTE_A); 313 # else 314 fEffective &= (Pte.u & (X86_PTE_RW | X86_PTE_US | X86_PTE_PWT | X86_PTE_PCD | X86_PTE_A)) 315 | ((Pte.u >> 63) ^ 1) /*NX */; 316 # endif 317 fEffective |= Pte.u & (X86_PTE_D | X86_PTE_PAT | X86_PTE_G); 318 318 pWalk->Core.fEffective = fEffective; 319 319
Note:
See TracChangeset
for help on using the changeset viewer.