Changeset 81579 in vbox
- Timestamp:
- Oct 30, 2019 5:45:16 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r81433 r81579 189 189 * A state structure for holding miscellaneous information across 190 190 * VMX non-root operation and restored after the transition. 191 * 192 * Note: The members are ordered and aligned such that the most 193 * frequently used ones (in the guest execution loop) fall within 194 * the first cache line. 191 195 */ 192 196 typedef struct VMXTRANSIENT 193 197 { 194 /** The host's rflags/eflags. */195 RTCCUINTREG fEFlags;196 197 /** The guest's TPR value used for TPR shadowing. */198 uint8_t u8GuestTpr;199 /** Alignment. */ 200 uint8_t abAlignment0[7];201 202 /** The basic VM-exit reason. */203 uint16_t uExitReason;204 /** Alignment. */205 uint16_t u16Alignment0;206 /** The VM-exit interruption error code. */207 uint32_t uExitIntErrorCode;208 /** The VM-exit exit code qualification. */209 uint64_t uExitQual;210 /** The Guest-linear address. */211 uint64_t uGuestLinearAddr;212 /** The Guest-physical address. */213 uint64_t uGuestPhysicalAddr;214 /** The Guest pending-debug exceptions. */215 uint64_t uGuestPendingDbgXcpts;216 217 /** The VM-exit interruption-information field. */218 uint32_t uExitIntInfo;219 /** The VM-exit instruction-length field. */ 220 uint32_t cbExitInstr;221 /** The VM-exit instruction-information field. */222 VMXEXITINSTRINFO ExitInstrInfo;223 /** Whether the VM-entry failed or not. */224 bool fVMEntryFailed; 225 /** Whether we are currently executing a nested-guest. */226 bool fIsNestedGuest;227 /** Alignment. */ 228 uint8_t abAlignment1[2];229 230 /** The VM-entry interruption-information field. */ 231 uint32_t uEntryIntInfo;232 /** The VM-entry exception error code field. */233 uint32_t uEntryXcptErrorCode; 234 /** The VM-entry instruction lengthfield. */235 uint32_t cbEntryInstr;236 237 /** IDT-vectoring information field. */238 uint32_t uIdtVectoringInfo; 239 /** IDT-vectoring error code. */240 uint32_t uIdtVectoringErrorCode;241 242 /** Mask of currently read VMCS fields; HMVMX_READ_XXX. */243 uint32_t fVmcsFieldsRead; 244 245 /** Whether the guest debug state was active at the time of VM-exit. */246 bool fWasGuestDebugStateActive;247 /** Whether the hyper debug state was active at the time of VM-exit. */ 248 bool fWasHyperDebugStateActive;249 /** Whether TSC-offsetting and VMX-preemption timer was updated before VM-entry. */250 bool fUpdatedTscOffsettingAndPreemptTimer; 251 /** Whether the VM-exit was caused by a page-fault during delivery of a252 * contributory exception or a page-fault. */253 bool fVectoringDoublePF; 254 /** Whether the VM-exit was caused by a page-fault during delivery of an255 * external interrupt or NMI. */256 bool fVectoringPF; 257 /** Whether the TSC_AUX MSR needs to be removed from the auto-load/store MSR258 * area after VM-exit. */259 bool fRemoveTscAuxMsr;260 bool afAlignment0[2];261 262 /** The VMCS info. object. */263 PVMXVMCSINFO pVmcsInfo;198 /** Mask of currently read VMCS fields; HMVMX_READ_XXX. */ 199 uint32_t fVmcsFieldsRead; 200 /** The guest's TPR value used for TPR shadowing. */ 201 uint8_t u8GuestTpr; 202 uint8_t abAlignment0[3]; 203 204 /** Whether the VM-exit was caused by a page-fault during delivery of an 205 * external interrupt or NMI. */ 206 bool fVectoringPF; 207 /** Whether the VM-exit was caused by a page-fault during delivery of a 208 * contributory exception or a page-fault. */ 209 bool fVectoringDoublePF; 210 /** Whether the VM-entry failed or not. */ 211 bool fVMEntryFailed; 212 /** Whether the TSC_AUX MSR needs to be removed from the auto-load/store MSR 213 * area after VM-exit. */ 214 bool fRemoveTscAuxMsr; 215 /** Whether TSC-offsetting and VMX-preemption timer was updated before VM-entry. */ 216 bool fUpdatedTscOffsettingAndPreemptTimer; 217 /** Whether we are currently executing a nested-guest. */ 218 bool fIsNestedGuest; 219 /** Whether the guest debug state was active at the time of VM-exit. */ 220 bool fWasGuestDebugStateActive; 221 /** Whether the hyper debug state was active at the time of VM-exit. */ 222 bool fWasHyperDebugStateActive; 223 224 /** The basic VM-exit reason. */ 225 uint32_t uExitReason; 226 /** The VM-exit interruption error code. */ 227 uint32_t uExitIntErrorCode; 228 229 /** The host's rflags/eflags. */ 230 RTCCUINTREG fEFlags; 231 232 /** The VM-exit exit code qualification. */ 233 uint64_t uExitQual; 234 235 /** The VMCS info. object. */ 236 PVMXVMCSINFO pVmcsInfo; 237 238 /** The VM-exit interruption-information field. */ 239 uint32_t uExitIntInfo; 240 /** The VM-exit instruction-length field. */ 241 uint32_t cbExitInstr; 242 243 /** The VM-exit instruction-information field. */ 244 VMXEXITINSTRINFO ExitInstrInfo; 245 /** IDT-vectoring information field. */ 246 uint32_t uIdtVectoringInfo; 247 248 /** IDT-vectoring error code. */ 249 uint32_t uIdtVectoringErrorCode; 250 uint32_t u32Alignment0; 251 252 /** The Guest-linear address. */ 253 uint64_t uGuestLinearAddr; 254 255 /** The Guest-physical address. */ 256 uint64_t uGuestPhysicalAddr; 257 258 /** The Guest pending-debug exceptions. */ 259 uint64_t uGuestPendingDbgXcpts; 260 261 /** The VM-entry interruption-information field. */ 262 uint32_t uEntryIntInfo; 263 /** The VM-entry exception error code field. */ 264 uint32_t uEntryXcptErrorCode; 265 266 /** The VM-entry instruction length field. */ 267 uint32_t cbEntryInstr; 264 268 } VMXTRANSIENT; 265 AssertCompileMemberAlignment(VMXTRANSIENT, uExitReason, sizeof(uint64_t));266 AssertCompileMemberAlignment(VMXTRANSIENT, uExitIntInfo, sizeof(uint64_t));267 AssertCompileMemberAlignment(VMXTRANSIENT, uEntryIntInfo, sizeof(uint64_t));268 AssertCompileMemberAlignment(VMXTRANSIENT, fWasGuestDebugStateActive, sizeof(uint64_t));269 AssertCompileMemberAlignment(VMXTRANSIENT, pVmcsInfo, sizeof(uint64_t));270 269 AssertCompileMemberSize(VMXTRANSIENT, ExitInstrInfo, sizeof(uint32_t)); 270 AssertCompileMemberAlignment(VMXTRANSIENT, fVmcsFieldsRead, 8); 271 AssertCompileMemberAlignment(VMXTRANSIENT, fVectoringPF, 8); 272 AssertCompileMemberAlignment(VMXTRANSIENT, uExitReason, 8); 273 AssertCompileMemberAlignment(VMXTRANSIENT, fEFlags, 8); 274 AssertCompileMemberAlignment(VMXTRANSIENT, uExitQual, 8); 275 AssertCompileMemberAlignment(VMXTRANSIENT, pVmcsInfo, 8); 276 AssertCompileMemberAlignment(VMXTRANSIENT, uExitIntInfo, 8); 277 AssertCompileMemberAlignment(VMXTRANSIENT, ExitInstrInfo, 8); 278 AssertCompileMemberAlignment(VMXTRANSIENT, uIdtVectoringErrorCode, 8); 279 AssertCompileMemberAlignment(VMXTRANSIENT, uGuestLinearAddr, 8); 280 AssertCompileMemberAlignment(VMXTRANSIENT, uGuestPhysicalAddr, 8); 281 AssertCompileMemberAlignment(VMXTRANSIENT, uEntryIntInfo, 8); 282 AssertCompileMemberAlignment(VMXTRANSIENT, cbEntryInstr, 8); 271 283 /** Pointer to VMX transient state. */ 272 284 typedef VMXTRANSIENT *PVMXTRANSIENT;
Note:
See TracChangeset
for help on using the changeset viewer.