Changeset 92311 in vbox for trunk/src/VBox/VMM/include
- Timestamp:
- Nov 10, 2021 9:05:02 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/include/PGMInternal.h
r92257 r92311 2356 2356 * - SUPPRESS_VE_XCPT (Suppress \#VE exception) - EPT bit 63 maps to bit 25. 2357 2357 * 2358 * Bits 1 1:9 and bit 43 are deliberately kept unused (they correspond to bits 11:92359 * in the page-table structures and to bit 11 in the EPT structures respectively) as2360 * they're reserved for use by software and we may want to preserve them in the2361 * future.2358 * Bits 12, 11:9 and 43 are deliberately kept unused (correspond to bit PS and bits 2359 * 11:9 in the regular page-table structures and to bit 11 in the EPT structures 2360 * respectively) as bit 12 is the page-size bit and bits 11:9 are reserved for 2361 * use by software and we may want to use/preserve them in the future. 2362 2362 * 2363 2363 * @{ */ … … 2366 2366 typedef PGMPTATTRS *PPGMPTATTRS; 2367 2367 2368 /** Execute bit (!NX). */2369 #define PGM_PTATTRS_ X_SHIFT02370 #define PGM_PTATTRS_ X_MASK RT_BIT_64(PGM_PTATTRS_X_SHIFT)2368 /** Reserved bit. */ 2369 #define PGM_PTATTRS_RSVD_0_SHIFT 0 2370 #define PGM_PTATTRS_RSVD_0_MASK RT_BIT_64(PGM_PTATTRS_RSVD_0_SHIFT) 2371 2371 /** Read and write access bit. */ 2372 2372 #define PGM_PTATTRS_RW_SHIFT 1 … … 2393 2393 #define PGM_PTATTRS_G_SHIFT 8 2394 2394 #define PGM_PTATTRS_G_MASK RT_BIT_64(PGM_PTATTRS_G_SHIFT) 2395 /** Reserved (bits 1 1:9) unused. */2396 #define PGM_PTATTRS_RSVD_1 1_9_SHIFT 92397 #define PGM_PTATTRS_RSVD_1 1_9_MASK UINT64_C(0x0000000000000e00)2395 /** Reserved (bits 12:9) unused. */ 2396 #define PGM_PTATTRS_RSVD_12_9_SHIFT 9 2397 #define PGM_PTATTRS_RSVD_12_9_MASK UINT64_C(0x0000000000001e00) 2398 2398 /** Read access bit - EPT only. */ 2399 #define PGM_PTATTRS_EPT_R_SHIFT 1 22399 #define PGM_PTATTRS_EPT_R_SHIFT 13 2400 2400 #define PGM_PTATTRS_EPT_R_MASK RT_BIT_64(PGM_PTATTRS_EPT_R_SHIFT) 2401 2401 /** Write access bit - EPT only. */ 2402 #define PGM_PTATTRS_EPT_W_SHIFT 1 32402 #define PGM_PTATTRS_EPT_W_SHIFT 14 2403 2403 #define PGM_PTATTRS_EPT_W_MASK RT_BIT_64(PGM_PTATTRS_EPT_W_SHIFT) 2404 2404 /** Execute or execute access for supervisor-mode linear addresses - EPT only. */ 2405 #define PGM_PTATTRS_EPT_X_SUPER_SHIFT 1 42405 #define PGM_PTATTRS_EPT_X_SUPER_SHIFT 15 2406 2406 #define PGM_PTATTRS_EPT_X_SUPER_MASK RT_BIT_64(PGM_PTATTRS_EPT_X_SUPER_SHIFT) 2407 2407 /** EPT memory type - EPT only. */ 2408 #define PGM_PTATTRS_EPT_MEMTYPE_SHIFT 1 52409 #define PGM_PTATTRS_EPT_MEMTYPE_MASK UINT64_C(0x00000000000 38000)2408 #define PGM_PTATTRS_EPT_MEMTYPE_SHIFT 16 2409 #define PGM_PTATTRS_EPT_MEMTYPE_MASK UINT64_C(0x0000000000070000) 2410 2410 /** Ignore PAT memory type - EPT only. */ 2411 #define PGM_PTATTRS_EPT_IGNORE_PAT_SHIFT 1 82411 #define PGM_PTATTRS_EPT_IGNORE_PAT_SHIFT 19 2412 2412 #define PGM_PTATTRS_EPT_IGNORE_PAT_MASK RT_BIT_64(PGM_PTATTRS_EPT_IGNORE_PAT_SHIFT) 2413 /** Reserved (bits 2 1:19) unused. */2414 #define PGM_PTATTRS_RSVD_2 1_19_SHIFT 192415 #define PGM_PTATTRS_RSVD_2 1_19_MASK UINT64_C(0x0000000000380000)2413 /** Reserved (bits 22:20) unused. */ 2414 #define PGM_PTATTRS_RSVD_22_20_SHIFT 20 2415 #define PGM_PTATTRS_RSVD_22_20_MASK UINT64_C(0x0000000000700000) 2416 2416 /** Execute access for user-mode linear addresses - EPT only. */ 2417 #define PGM_PTATTRS_EPT_X_USER_SHIFT 2 22417 #define PGM_PTATTRS_EPT_X_USER_SHIFT 23 2418 2418 #define PGM_PTATTRS_EPT_X_USER_MASK RT_BIT_64(PGM_PTATTRS_EPT_X_USER_SHIFT) 2419 2419 /** Reserved (bit 23) - unused. */ 2420 #define PGM_PTATTRS_RSVD_23_SHIFT 2 32421 #define PGM_PTATTRS_RSVD_23_MASK UINT64_C(0x000000000 0800000)2420 #define PGM_PTATTRS_RSVD_23_SHIFT 24 2421 #define PGM_PTATTRS_RSVD_23_MASK UINT64_C(0x0000000001000000) 2422 2422 /** Supervisor shadow stack - EPT only. */ 2423 #define PGM_PTATTRS_EPT_SUPER_SHW_STACK_SHIFT 2 42423 #define PGM_PTATTRS_EPT_SUPER_SHW_STACK_SHIFT 25 2424 2424 #define PGM_PTATTRS_EPT_SUPER_SHW_STACK_MASK RT_BIT_64(PGM_PTATTRS_EPT_SUPER_SHW_STACK_SHIFT) 2425 2425 /** Suppress \#VE exception - EPT only. */ 2426 #define PGM_PTATTRS_EPT_SUPPRESS_VE_XCPT_SHIFT 2 52426 #define PGM_PTATTRS_EPT_SUPPRESS_VE_XCPT_SHIFT 26 2427 2427 #define PGM_PTATTRS_EPT_SUPPRESS_VE_XCPT_MASK RT_BIT_64(PGM_PTATTRS_EPT_SUPPRESS_VE_XCPT_SHIFT) 2428 /** Reserved (bits 63:26) - unused. */ 2429 #define PGM_PTATTRS_RSVD_63_26_SHIFT 26 2430 #define PGM_PTATTRS_RSVD_63_26_MASK UINT64_C(0xfffffffffc000000) 2428 /** Reserved (bits 62:27) - unused. */ 2429 #define PGM_PTATTRS_RSVD_62_27_SHIFT 27 2430 #define PGM_PTATTRS_RSVD_62_27_MASK UINT64_C(0x7ffffffff8000000) 2431 /** No-execute bit. */ 2432 #define PGM_PTATTRS_NX_SHIFT 63 2433 #define PGM_PTATTRS_NX_MASK RT_BIT_64(PGM_PTATTRS_NX_SHIFT) 2434 2431 2435 RT_BF_ASSERT_COMPILE_CHECKS(PGM_PTATTRS_, UINT64_C(0), UINT64_MAX, 2432 (X, RW, US, PWT, PCD, A, D, PAT, G, RSVD_11_9, EPT_R, EPT_W, EPT_X_SUPER, EPT_MEMTYPE, EPT_IGNORE_PAT, 2433 RSVD_21_19, EPT_X_USER, RSVD_23, EPT_SUPER_SHW_STACK, EPT_SUPPRESS_VE_XCPT, RSVD_63_26)); 2436 (RSVD_0, RW, US, PWT, PCD, A, D, PAT, G, RSVD_12_9, EPT_R, EPT_W, EPT_X_SUPER, EPT_MEMTYPE, 2437 EPT_IGNORE_PAT, RSVD_22_20, EPT_X_USER, RSVD_23, EPT_SUPER_SHW_STACK, EPT_SUPPRESS_VE_XCPT, 2438 RSVD_62_27, NX)); 2434 2439 2435 2440 /** The bit position where the EPT specific attributes begin. */ 2436 #define PGM_PTATTRS_EPT_SHIFT PGM_PTATTRS_EPT_R_SHIFT2437 /** The mask of EPT bits (bits 63:ATTR_SHIFT). In the future we might choose to2441 #define PGM_PTATTRS_EPT_SHIFT PGM_PTATTRS_EPT_R_SHIFT 2442 /** The mask of EPT bits (bits 26:ATTR_SHIFT). In the future we might choose to 2438 2443 * use higher unused bits for something else, in that case adjust this mask. */ 2439 #define PGM_PTATTRS_EPT_MASK UINT64_C(0x fffffffffffff000)2444 #define PGM_PTATTRS_EPT_MASK UINT64_C(0x0000000007ffe000) 2440 2445 2441 2446 /** The mask of all PGM page attribute bits for regular page-tables. */ 2442 #define PGM_PTATTRS_PT_VALID_MASK ( PGM_PTATTRS_X_MASK \ 2443 | PGM_PTATTRS_RW_MASK \ 2447 #define PGM_PTATTRS_PT_VALID_MASK ( PGM_PTATTRS_RW_MASK \ 2444 2448 | PGM_PTATTRS_US_MASK \ 2445 2449 | PGM_PTATTRS_PWT_MASK \ … … 2448 2452 | PGM_PTATTRS_D_MASK \ 2449 2453 | PGM_PTATTRS_PAT_MASK \ 2450 | PGM_PTATTRS_G_MASK) 2454 | PGM_PTATTRS_G_MASK \ 2455 | PGM_PTATTRS_NX_MASK) 2451 2456 2452 2457 /** The mask of all PGM page attribute bits for EPT. */ 2453 #define PGM_PTATTRS_EPT_VALID_MASK ( PGM_PTATTRS_X_MASK \ 2454 | PGM_PTATTRS_RW_MASK \ 2455 | PGM_PTATTRS_US_MASK \ 2456 | PGM_PTATTRS_A_MASK \ 2458 #define PGM_PTATTRS_EPT_VALID_MASK ( PGM_PTATTRS_A_MASK \ 2457 2459 | PGM_PTATTRS_D_MASK \ 2458 2460 | PGM_PTATTRS_R_MASK \
Note:
See TracChangeset
for help on using the changeset viewer.