Changeset 108791 in vbox for trunk/include/VBox/vmm/pgm.h
- Timestamp:
- Mar 28, 2025 9:58:31 PM (3 weeks ago)
- svn:sync-xref-src-repo-rev:
- 168226
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/pgm.h
r108444 r108791 580 580 * attributes as well as a myriade of feature dependent field interpretations. 581 581 * 582 * The stage 1 effective access attributes are placed in bits 47:32, with some 583 * room reserved for new stuff. A set of leaf bits are copied raw, but NSE had 584 * to be shifted down due to nG confusion. 582 * The stage 1 effective access attributes are placed in bits 41:32. A set of 583 * leaf bits are copied raw, but NSE had to be shifted down due to nG confusion. 585 584 * 586 585 * The stage 2 effective access attributes are placed in bit 31:24. Bits taken … … 641 640 #define PGM_PTATTRS_S2_TL1_SHIFT 30 642 641 #define PGM_PTATTRS_S2_TL1_MASK RT_BIT_64(PGM_PTATTRS_S2_TL1_SHIFT) 642 /** Stage 2: Device memory type. */ 643 #define PGM_PTATTRS_S2_DEVICE_SHIFT 31 644 #define PGM_PTATTRS_S2_DEVICE_MASK RT_BIT_64(PGM_PTATTRS_S2_DEVICE_SHIFT) 643 645 644 646 /** Stage 1: Privileged read access. */ … … 654 656 #define PGM_PTATTRS_PGCS_SHIFT 35 655 657 #define PGM_PTATTRS_PGCS_MASK RT_BIT_64(PGM_PTATTRS_PGCS_SHIFT) 658 /** Stage 1: Unprivileged read access. */ 659 #define PGM_PTATTRS_UR_SHIFT 36 660 #define PGM_PTATTRS_UR_MASK RT_BIT_64(PGM_PTATTRS_UR_SHIFT) 661 /** Stage 1: Unprivileged write access. */ 662 #define PGM_PTATTRS_UW_SHIFT 37 663 #define PGM_PTATTRS_UW_MASK RT_BIT_64(PGM_PTATTRS_UW_SHIFT) 664 /** Stage 1: Unprivileged execute access. */ 665 #define PGM_PTATTRS_UX_SHIFT 38 666 #define PGM_PTATTRS_UX_MASK RT_BIT_64(PGM_PTATTRS_UX_SHIFT) 667 /** Stage 1: Unprivileged guarded control stack (GCS) access. */ 668 #define PGM_PTATTRS_UGCS_SHIFT 39 669 #define PGM_PTATTRS_UGCS_MASK RT_BIT_64(PGM_PTATTRS_UGCS_SHIFT) 656 670 /** Stage 1: Privileged write-implies-no-execute access. 657 671 * @todo not sure if we need expose this bit. */ 658 #define PGM_PTATTRS_PWXN_SHIFT 36672 #define PGM_PTATTRS_PWXN_SHIFT 40 659 673 #define PGM_PTATTRS_PWXN_MASK RT_BIT_64(PGM_PTATTRS_PWXN_SHIFT) 660 661 /** Stage 1: Unprivileged read access. */662 #define PGM_PTATTRS_UR_SHIFT 40663 #define PGM_PTATTRS_UR_MASK RT_BIT_64(PGM_PTATTRS_UR_SHIFT)664 /** Stage 1: Unprivileged write access. */665 #define PGM_PTATTRS_UW_SHIFT 41666 #define PGM_PTATTRS_UW_MASK RT_BIT_64(PGM_PTATTRS_UW_SHIFT)667 /** Stage 1: Unprivileged execute access. */668 #define PGM_PTATTRS_UX_SHIFT 42669 #define PGM_PTATTRS_UX_MASK RT_BIT_64(PGM_PTATTRS_UX_SHIFT)670 /** Stage 1: Unprivileged guarded control stack (GCS) access. */671 #define PGM_PTATTRS_UGCS_SHIFT 43672 #define PGM_PTATTRS_UGCS_MASK RT_BIT_64(PGM_PTATTRS_UGCS_SHIFT)673 674 /** Stage 1: Unprivileged write-implies-no-execute access. 674 675 * @todo not sure if we need expose this bit. */ 675 #define PGM_PTATTRS_UWXN_SHIFT 4 4676 #define PGM_PTATTRS_UWXN_SHIFT 41 676 677 #define PGM_PTATTRS_UWXN_MASK RT_BIT_64(PGM_PTATTRS_UWXN_SHIFT) 678 /** Stage 1: Device memory type. */ 679 #define PGM_PTATTRS_DEVICE_SHIFT 42 680 #define PGM_PTATTRS_DEVICE_MASK RT_BIT_64(PGM_PTATTRS_DEVICE_SHIFT) 677 681 678 682 /** Page/block level: Guarded page */ … … 916 920 /** The query is for a user mode access, so don't set leaf A or D bits 917 921 * unless the effective access allows usermode access. 918 * Assume supervisor access when not set. */922 * Assume supervisor (priveleged) access when not set. */ 919 923 #define PGMQPAGE_F_USER_MODE RT_BIT_32(3) 920 /** Treat CR0.WP as zero when evalutating the access. 924 #if defined( VBOX_VMM_TARGET_X86) || defined(DOXYGEN_RUNNING) 925 /** X86: Treat CR0.WP as zero when evalutating the access. 921 926 * @note Same value as X86_CR0_WP. */ 922 #define PGMQPAGE_F_CR0_WP0 RT_BIT_32(16) 927 # define PGMQPAGE_F_CR0_WP0 RT_BIT_32(16) 928 #endif 929 /** @todo ARM: security, s2, GCS, ++ */ 923 930 /** The valid flag mask. */ 924 #define PGMQPAGE_F_VALID_MASK UINT32_C(0x0001000f) 931 #if defined( VBOX_VMM_TARGET_X86) || defined(DOXYGEN_RUNNING) 932 # define PGMQPAGE_F_VALID_MASK UINT32_C(0x0001000f) 933 #else 934 # define PGMQPAGE_F_VALID_MASK UINT32_C(0x0000000f) 935 #endif 925 936 /** @} */ 926 937 VMM_INT_DECL(int) PGMGstQueryPageFast(PVMCPUCC pVCpu, RTGCPTR GCPtr, uint32_t fFlags, PPGMPTWALKFAST pWalkFast); … … 1192 1203 /** @name Flags returned by PGMPhysIemGCPhys2PtrNoLock 1193 1204 * @{ */ 1194 #define PGMIEMGCPHYS2PTR_F_NO_WRITE RT_BIT_32(3) /**< Not writable (IEMTLBE_F_PG_NO_WRITE). */ 1195 #define PGMIEMGCPHYS2PTR_F_NO_READ RT_BIT_32(4) /**< Not readable (IEMTLBE_F_PG_NO_READ). */ 1196 #define PGMIEMGCPHYS2PTR_F_NO_MAPPINGR3 RT_BIT_32(8) /**< No ring-3 mapping (IEMTLBE_F_NO_MAPPINGR3). */ 1197 #define PGMIEMGCPHYS2PTR_F_UNASSIGNED RT_BIT_32(9) /**< Unassgined memory (IEMTLBE_F_PG_UNASSIGNED). */ 1198 #define PGMIEMGCPHYS2PTR_F_CODE_PAGE RT_BIT_32(10) /**< Write monitored IEM code page (IEMTLBE_F_PG_CODE_PAGE). */ 1205 /** @def PGMIEMGCPHYS2PTR_F_NO_WRITE 1206 * Not writable (IEMTLBE_F_PG_NO_WRITE). */ 1207 /** @def PGMIEMGCPHYS2PTR_F_NO_READ 1208 * Not readable (IEMTLBE_F_PG_NO_READ). */ 1209 /** @def PGMIEMGCPHYS2PTR_F_NO_MAPPINGR3 1210 * No ring-3 mapping (IEMTLBE_F_NO_MAPPINGR3). */ 1211 /** @def PGMIEMGCPHYS2PTR_F_UNASSIGNED 1212 * Unassigned memory (IEMTLBE_F_PG_UNASSIGNED). */ 1213 /** @def PGMIEMGCPHYS2PTR_F_CODE_PAGE 1214 * Write monitored IEM code page (IEMTLBE_F_PG_CODE_PAGE). */ 1215 #if defined(VBOX_VMM_TARGET_X86) || defined(DOXYGEN_RUNNING) 1216 # define PGMIEMGCPHYS2PTR_F_NO_WRITE RT_BIT_32(3) 1217 # define PGMIEMGCPHYS2PTR_F_NO_READ RT_BIT_32(4) 1218 # define PGMIEMGCPHYS2PTR_F_NO_MAPPINGR3 RT_BIT_32(8) 1219 # define PGMIEMGCPHYS2PTR_F_UNASSIGNED RT_BIT_32(9) 1220 # define PGMIEMGCPHYS2PTR_F_CODE_PAGE RT_BIT_32(10) 1221 #elif defined(VBOX_VMM_TARGET_ARMV8) 1222 # define PGMIEMGCPHYS2PTR_F_NO_READ RT_BIT_32(13) 1223 # define PGMIEMGCPHYS2PTR_F_NO_WRITE RT_BIT_32(14) 1224 # define PGMIEMGCPHYS2PTR_F_NO_MAPPINGR3 RT_BIT_32(15) 1225 # define PGMIEMGCPHYS2PTR_F_UNASSIGNED RT_BIT_32(16) 1226 # define PGMIEMGCPHYS2PTR_F_CODE_PAGE RT_BIT_32(17) 1227 #endif 1199 1228 /** @} */ 1200 1229
Note:
See TracChangeset
for help on using the changeset viewer.