Changeset 91283 in vbox for trunk/src/VBox/VMM/include
- Timestamp:
- Sep 16, 2021 1:58:36 PM (3 years ago)
- Location:
- trunk/src/VBox/VMM/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/include/CPUMInternal.h
r91271 r91283 203 203 typedef struct CPUMHOSTCTX 204 204 { 205 /** The extended state (FPU/SSE/AVX/AVX-2/XXXX). Must be aligned on 64 bytes. */ 206 union /* no tag */ 207 { 208 X86XSAVEAREA XState; 209 /** Byte view for simple indexing and space allocation. 210 * @note Must match or exceed the size of CPUMCTX::abXState. */ 211 uint8_t abXState[0x4000 - 0x300]; 212 } CPUM_UNION_NM(u); 213 205 214 /** General purpose register, selectors, flags and more 206 215 * @{ */ … … 284 293 /** @} */ 285 294 295 /** The XCR0 register. */ 296 uint64_t xcr0; 297 /** The mask to pass to XSAVE/XRSTOR in EDX:EAX. If zero we use 298 * FXSAVE/FXRSTOR (since bit 0 will always be set, we only need to test it). */ 299 uint64_t fXStateMask; 300 286 301 /* padding to get 64byte aligned size */ 287 uint8_t auPadding[8]; 288 302 uint8_t auPadding[24]; 289 303 #if HC_ARCH_BITS != 64 290 304 # error HC_ARCH_BITS not defined or unsupported 291 305 #endif 292 293 /** Pointer to the FPU/SSE/AVX/XXXX state ring-0 mapping. */294 R0PTRTYPE(PX86XSAVEAREA) pXStateR0;295 /** Pointer to the FPU/SSE/AVX/XXXX state ring-3 mapping. */296 R3PTRTYPE(PX86XSAVEAREA) pXStateR3;297 /** The XCR0 register. */298 uint64_t xcr0;299 /** The mask to pass to XSAVE/XRSTOR in EDX:EAX. If zero we use300 * FXSAVE/FXRSTOR (since bit 0 will always be set, we only need to test it). */301 uint64_t fXStateMask;302 306 } CPUMHOSTCTX; 303 307 #ifndef VBOX_FOR_DTRACE_LIB … … 481 485 #endif 482 486 } CPUMCPU; 487 #ifndef VBOX_FOR_DTRACE_LIB 488 AssertCompileMemberAlignment(CPUMCPU, Host, 64); 489 #endif 483 490 /** Pointer to the CPUMCPU instance data residing in the shared VMCPU structure. */ 484 491 typedef CPUMCPU *PCPUMCPU; -
trunk/src/VBox/VMM/include/CPUMInternal.mac
r91281 r91283 286 286 alignb 64 287 287 .Host resb 0 288 .Host.abXState resb 0x4000-0x300 289 .Host.XState EQU .Host.abXState 288 290 ;.Host.rax resq 1 - scratch 289 291 .Host.rbx resq 1 … … 346 348 .Host.GSbase resq 1 347 349 .Host.efer resq 1 348 .Host.auPadding resb 4349 alignb RTR0PTR_CB350 .Host.pXStateR0 RTR0PTR_RES 1351 .Host.pXStateR3 RTR3PTR_RES 1352 350 alignb 8 353 351 .Host.xcr0 resq 1 … … 478 476 ; Load a couple of registers we'll use later in all branches. 479 477 ; 480 %ifdef IN_RING0 481 mov pXState, [pCpumCpu + CPUMCPU.Host.pXStateR0] 482 %else 483 %error "Unsupported context!" 484 %endif 478 lea pXState, [pCpumCpu + CPUMCPU.Host.XState] 485 479 mov eax, [pCpumCpu + CPUMCPU.Host.fXStateMask] 486 480 … … 523 517 ; Load a couple of registers we'll use later in all branches. 524 518 ; 525 %ifdef IN_RING0 526 mov pXState, [pCpumCpu + CPUMCPU.Host.pXStateR0] 527 %else 528 %error "Unsupported context!" 529 %endif 519 lea pXState, [pCpumCpu + CPUMCPU.Host.XState] 530 520 mov eax, [pCpumCpu + CPUMCPU.Host.fXStateMask] 531 521 … … 679 669 ; Load a couple of registers we'll use later in all branches. 680 670 ; 681 %ifdef IN_RING0682 671 lea pXState, [pCpumCpu + CPUMCPU.Guest.XState] 683 %else684 %error "Unsupported context!"685 %endif686 672 mov eax, [pCpumCpu + CPUMCPU.Guest.fXStateMask] 687 673
Note:
See TracChangeset
for help on using the changeset viewer.