- Timestamp:
- Oct 12, 2018 11:49:48 AM (6 years ago)
- Location:
- trunk/include/VBox/vmm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/vm.h
r74796 r74797 99 99 typedef struct VMCPU 100 100 { 101 /** @name Volatile per-cpu data. 102 * @{ */ 101 103 /** Per CPU forced action. 102 104 * See the VMCPU_FF_* \#defines. Updated atomically. */ 103 uint32_t volatile fLocalForcedActions; /* 0 */ 105 uint32_t volatile fLocalForcedActions; 106 uint32_t fForLocalForcedActionsExpansion; 104 107 /** The CPU state. */ 105 VMCPUSTATE volatile enmState; /* 4 */ 106 107 /** Pointer to the ring-3 UVMCPU structure. */ 108 PUVMCPU pUVCpu; /* 8 */ 109 /** Ring-3 Host Context VM Pointer. */ 110 PVMR3 pVMR3; /* 16 / 12 */ 111 /** Ring-0 Host Context VM Pointer. */ 112 PVMR0 pVMR0; /* 24 / 16 */ 113 /** Raw-mode Context VM Pointer. */ 114 PVMRC pVMRC; /* 32 / 20 */ 108 VMCPUSTATE volatile enmState; 109 110 /** Which host CPU ID is this EMT running on. 111 * Only valid when in RC or HMR0 with scheduling disabled. */ 112 RTCPUID volatile idHostCpu; 113 /** The CPU set index corresponding to idHostCpu, UINT32_MAX if not valid. 114 * @remarks Best to make sure iHostCpuSet shares cache line with idHostCpu! */ 115 uint32_t volatile iHostCpuSet; 116 /** Padding up to 64 bytes. */ 117 uint8_t abAlignment0[64 - 20]; 118 /** @} */ 119 120 /** IEM part. 121 * @remarks This comes first as it allows the use of 8-bit immediates for the 122 * first 64 bytes of the structure, reducing code size a wee bit. */ 123 #ifdef ___IEMInternal_h /* For PDB hacking. */ 124 union VMCPUUNIONIEMFULL 125 #else 126 union VMCPUUNIONIEMSTUB 127 #endif 128 { 129 #ifdef ___IEMInternal_h 130 struct IEMCPU s; 131 #endif 132 uint8_t padding[18496]; /* multiple of 64 */ 133 } iem; 134 135 /** @name Static per-cpu data. 136 * (Putting this after IEM, hoping that it's less frequently used than it.) 137 * @{ */ 115 138 /** The CPU ID. 116 139 * This is the index into the VM::aCpu array. */ 117 VMCPUID idCpu; /* 36 / 24 */ 140 VMCPUID idCpu; 141 /** Raw-mode Context VM Pointer. */ 142 PVMRC pVMRC; 143 /** Ring-3 Host Context VM Pointer. */ 144 PVMR3 pVMR3; 145 /** Ring-0 Host Context VM Pointer. */ 146 PVMR0 pVMR0; 147 /** Pointer to the ring-3 UVMCPU structure. */ 148 PUVMCPU pUVCpu; 118 149 /** The native thread handle. */ 119 RTNATIVETHREAD hNativeThread; /* 40 / 28 */150 RTNATIVETHREAD hNativeThread; 120 151 /** The native R0 thread handle. (different from the R3 handle!) */ 121 RTNATIVETHREAD hNativeThreadR0; /* 48 / 32 */ 122 /** Which host CPU ID is this EMT running on. 123 * Only valid when in RC or HMR0 with scheduling disabled. */ 124 RTCPUID volatile idHostCpu; /* 56 / 36 */ 125 /** The CPU set index corresponding to idHostCpu, UINT32_MAX if not valid. 126 * @remarks Best to make sure iHostCpuSet shares cache line with idHostCpu! */ 127 uint32_t volatile iHostCpuSet; /* 60 / 40 */ 128 129 #if HC_ARCH_BITS == 32 152 RTNATIVETHREAD hNativeThreadR0; 130 153 /** Align the structures below bit on a 64-byte boundary and make sure it starts 131 154 * at the same offset in both 64-bit and 32-bit builds. … … 136 159 * following it (to grow into and align the struct size). 137 160 */ 138 uint8_t abAlignment1[HC_ARCH_BITS == 64 ? 0 : 20]; 139 #endif 140 141 /** IEM part. 142 * @remarks This comes first as it allows the use of 8-bit immediates for the 143 * first 64 bytes of the structure, reducing code size a wee bit. */ 144 #ifdef ___IEMInternal_h /* For PDB hacking. */ 145 union VMCPUUNIONIEMFULL 146 #else 147 union VMCPUUNIONIEMSTUB 148 #endif 149 { 150 #ifdef ___IEMInternal_h 151 struct IEMCPU s; 152 #endif 153 uint8_t padding[18496]; /* multiple of 64 */ 154 } iem; 161 uint8_t abAlignment1[64 - 4 - 4 - 5 * (HC_ARCH_BITS == 64 ? 8 : 4)]; 162 /** @} */ 155 163 156 164 /** HM part. */ … … 258 266 259 267 /** Align the following members on page boundary. */ 260 uint8_t abAlignment2[28 72];268 uint8_t abAlignment2[2808]; 261 269 262 270 /** PGM part. */ -
trunk/include/VBox/vmm/vm.mac
r73471 r74797 43 43 struc VMCPU 44 44 .fLocalForcedActions resd 1 45 alignb 8 45 46 .enmState resd 1 46 .pUVCpu RTR3PTR_RES 147 .pVMR3 RTR3PTR_RES 148 .pVMR0 RTR0PTR_RES 149 .pVMRC RTRCPTR_RES 150 .idCpu resd 151 52 .hNativeThread RTR0PTR_RES 153 .hNativeThreadR0 RTR0PTR_RES 154 47 .idHostCpu resd 1 55 48 .iHostCpuSet resd 1 56 %if HC_ARCH_BITS == 3257 .abAlignment1 resb 1258 %else59 ; .abAlignment1 resb 060 %endif61 49 62 50 alignb 64 63 51 .iem resb 18496 52 53 alignb 64 54 .idCpu resd 1 55 .pVMRC RTRCPTR_RES 1 56 .pVMR3 RTR3PTR_RES 1 57 .pVMR0 RTR0PTR_RES 1 58 .pUVCpu RTR3PTR_RES 1 59 .hNativeThread RTR0PTR_RES 1 60 .hNativeThreadR0 RTR0PTR_RES 1 61 62 alignb 64 64 63 .hm resb 5888 65 64 .nem resb 512
Note:
See TracChangeset
for help on using the changeset viewer.