Changeset 91281 in vbox
- Timestamp:
- Sep 16, 2021 1:32:18 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 21 edited
-
include/VBox/vmm/cpum.mac (modified) (1 diff)
-
include/VBox/vmm/cpumctx.h (modified) (5 diffs)
-
include/VBox/vmm/vm.h (modified) (1 diff)
-
include/VBox/vmm/vm.mac (modified) (1 diff)
-
src/VBox/VMM/VMMAll/CPUMAllRegs.cpp (modified) (2 diffs)
-
src/VBox/VMM/VMMAll/IEMAll.cpp (modified) (50 diffs)
-
src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h (modified) (15 diffs)
-
src/VBox/VMM/VMMAll/NEMAllNativeTemplate-win.cpp.h (modified) (5 diffs)
-
src/VBox/VMM/VMMR0/CPUMR0A.asm (modified) (1 diff)
-
src/VBox/VMM/VMMR0/HMR0.cpp (modified) (1 diff)
-
src/VBox/VMM/VMMR0/HMR0A.asm (modified) (4 diffs)
-
src/VBox/VMM/VMMR0/NEMR0Native-win.cpp (modified) (5 diffs)
-
src/VBox/VMM/VMMR3/CPUM.cpp (modified) (10 diffs)
-
src/VBox/VMM/VMMR3/CPUMDbg.cpp (modified) (5 diffs)
-
src/VBox/VMM/VMMR3/CPUMR3CpuId.cpp (modified) (2 diffs)
-
src/VBox/VMM/VMMR3/DBGFCoreWrite.cpp (modified) (1 diff)
-
src/VBox/VMM/VMMRZ/CPUMRZA.asm (modified) (3 diffs)
-
src/VBox/VMM/include/CPUMInternal.mac (modified) (3 diffs)
-
src/VBox/VMM/testcase/tstAsmStructsAsm-lst.sed (modified) (2 diffs)
-
src/VBox/VMM/testcase/tstIEMCheckMc.cpp (modified) (1 diff)
-
src/VBox/VMM/testcase/tstVMStruct.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/cpum.mac
r91271 r91281 247 247 .msrKERNELGSBASE resb 8 248 248 .uMsrPadding0 resb 8 249 250 alignb 8 251 .fExtrn resq 1 252 253 alignb 32 254 .aPaePdpes resq 4 255 249 256 alignb 8 250 257 .aXcr resq 2 251 258 .fXStateMask resq 1 252 .pXStateR0 RTR0PTR_RES 1 253 alignb 8 254 .pXStateR3 RTR3PTR_RES 1 259 .fUsedFpuGuest resb 1 260 alignb 8 255 261 .aoffXState resw 64 256 .fUsedFpuGuest resb 1257 alignb 8258 . fExtrn resq 1259 .aPaePdpes resq 4 260 alignb 8262 alignb 256 263 .abXState resb 0x4000-0x300 264 .XState EQU .abXState 265 266 alignb 4096 261 267 .hwvirt.svm.uMsrHSavePa resq 1 262 268 .hwvirt.svm.GCPhysVmcb resq 1 -
trunk/include/VBox/vmm/cpumctx.h
r91271 r91281 422 422 * neither do we. 423 423 */ 424 uint64_t dr[8];424 uint64_t dr[8]; 425 425 426 426 /** Padding before the structure so the 64-bit member is correctly aligned. 427 427 * @todo fix this structure! */ 428 uint16_t gdtrPadding[3];428 uint16_t gdtrPadding[3]; 429 429 /** Global Descriptor Table register. */ 430 VBOXGDTR gdtr;430 VBOXGDTR gdtr; 431 431 432 432 /** Padding before the structure so the 64-bit member is correctly aligned. 433 433 * @todo fix this structure! */ 434 uint16_t idtrPadding[3];434 uint16_t idtrPadding[3]; 435 435 /** Interrupt Descriptor Table register. */ 436 VBOXIDTR idtr;436 VBOXIDTR idtr; 437 437 438 438 /** The task register. 439 439 * Only the guest context uses all the members. */ 440 CPUMSELREG ldtr;440 CPUMSELREG ldtr; 441 441 /** The task register. 442 442 * Only the guest context uses all the members. */ 443 CPUMSELREG tr;443 CPUMSELREG tr; 444 444 445 445 /** The sysenter msr registers. 446 446 * This member is not used by the hypervisor context. */ 447 CPUMSYSENTER SysEnter;447 CPUMSYSENTER SysEnter; 448 448 449 449 /** @name System MSRs. 450 450 * @{ */ 451 uint64_t msrEFER;452 uint64_t msrSTAR; /**< Legacy syscall eip, cs & ss. */453 uint64_t msrPAT; /**< Page attribute table. */454 uint64_t msrLSTAR; /**< 64 bits mode syscall rip. */455 uint64_t msrCSTAR; /**< Compatibility mode syscall rip. */456 uint64_t msrSFMASK; /**< syscall flag mask. */457 uint64_t msrKERNELGSBASE; /**< swapgs exchange value. */458 uint64_t uMsrPadding0; /**< no longer used (used to hold a copy of APIC base MSR). */451 uint64_t msrEFER; 452 uint64_t msrSTAR; /**< Legacy syscall eip, cs & ss. */ 453 uint64_t msrPAT; /**< Page attribute table. */ 454 uint64_t msrLSTAR; /**< 64 bits mode syscall rip. */ 455 uint64_t msrCSTAR; /**< Compatibility mode syscall rip. */ 456 uint64_t msrSFMASK; /**< syscall flag mask. */ 457 uint64_t msrKERNELGSBASE; /**< swapgs exchange value. */ 458 uint64_t uMsrPadding0; /**< no longer used (used to hold a copy of APIC base MSR). */ 459 459 /** @} */ 460 460 461 /** The XCR0..XCR1 registers. */ 462 uint64_t aXcr[2]; 463 /** The mask to pass to XSAVE/XRSTOR in EDX:EAX. If zero we use 461 /** 0x228 - Externalized state tracker, CPUMCTX_EXTRN_XXX. 462 * Currently only used internally in NEM/win. */ 463 uint64_t fExtrn; 464 465 uint64_t au64Unused[2]; 466 467 /** 0x240 - PAE PDPTEs. */ 468 X86PDPE aPaePdpes[4]; 469 470 /** 0x260 - The XCR0..XCR1 registers. */ 471 uint64_t aXcr[2]; 472 /** 0x270 - The mask to pass to XSAVE/XRSTOR in EDX:EAX. If zero we use 464 473 * FXSAVE/FXRSTOR (since bit 0 will always be set, we only need to test it). */ 465 uint64_t fXStateMask; 466 467 /** Pointer to the FPU/SSE/AVX/XXXX state ring-0 mapping. */ 468 R0PTRTYPE(PX86XSAVEAREA) pXStateR0; 469 /** Pointer to the FPU/SSE/AVX/XXXX state ring-3 mapping. */ 470 R3PTRTYPE(PX86XSAVEAREA) pXStateR3; 471 /** State component offsets into pXState, UINT16_MAX if not present. */ 472 uint16_t aoffXState[64]; 473 474 /** 0x2d4 - Mirror of CPUMCPU::fUseFlags[CPUM_USED_FPU_GUEST]. */ 475 bool fUsedFpuGuest; 476 uint8_t afUnused[7]; 477 /** 0x2d8 - Externalized state tracker, CPUMCTX_EXTRN_XXX. 478 * Currently only used internally in NEM/win. */ 479 uint64_t fExtrn; 480 481 /** 0x2e0 - PAE PDPTEs. */ 482 X86PDPE aPaePdpes[4]; 483 484 /** 0x300 - Hardware virtualization state. */ 474 uint64_t fXStateMask; 475 /** 0x278 - Mirror of CPUMCPU::fUseFlags[CPUM_USED_FPU_GUEST]. */ 476 bool fUsedFpuGuest; 477 uint8_t afUnused[7]; 478 479 /* ---- Start of members not zeroed at reset. ---- */ 480 481 /** 0x280 - State component offsets into pXState, UINT16_MAX if not present. 482 * @note Everything before this member will be memset to zero during reset. */ 483 uint16_t aoffXState[64]; 484 /** 0x300 - The extended state (FPU/SSE/AVX/AVX-2/XXXX). 485 * Aligned on 256 byte boundrary (min req is currently 64 bytes). */ 486 union /* no tag */ 487 { 488 X86XSAVEAREA XState; 489 /** Byte view for simple indexing and space allocation. */ 490 uint8_t abXState[0x4000 - 0x300]; 491 } CPUM_UNION_NM(u); 492 493 /** 0x4000 - Hardware virtualization state. 494 * @note This is page aligned, so an full page member comes first in the 495 * substructures. */ 485 496 struct 486 497 { … … 689 700 AssertCompileMemberOffset(CPUMCTX, msrSFMASK, 528); 690 701 AssertCompileMemberOffset(CPUMCTX, msrKERNELGSBASE, 536); 691 AssertCompileMemberOffset(CPUMCTX, aXcr, 552); 692 AssertCompileMemberOffset(CPUMCTX, fXStateMask, 568); 693 AssertCompileMemberOffset(CPUMCTX, pXStateR0, 576); 694 AssertCompileMemberOffset(CPUMCTX, pXStateR3, 584); 695 AssertCompileMemberOffset(CPUMCTX, aoffXState, 592); 696 AssertCompileMemberOffset(CPUMCTX, aPaePdpes, 0x2e0); 702 AssertCompileMemberOffset(CPUMCTX, aPaePdpes, 0x240); 703 AssertCompileMemberOffset(CPUMCTX, aXcr, 0x260); 704 AssertCompileMemberOffset(CPUMCTX, fXStateMask, 0x270); 705 AssertCompileMemberOffset(CPUMCTX, fUsedFpuGuest, 0x278); 706 AssertCompileMemberOffset(CPUMCTX, CPUM_UNION_NM(u.) XState, 0x300); 707 AssertCompileMemberOffset(CPUMCTX, CPUM_UNION_NM(u.) abXState, 0x300); 708 AssertCompileMemberAlignment(CPUMCTX, CPUM_UNION_NM(u.) XState, 0x100); 709 AssertCompileMemberAlignment(CPUMCTX, hwvirt, 0x1000); 710 #if 0 697 711 AssertCompileMemberOffset(CPUMCTX, hwvirt, 0x300); 698 712 AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) svm.uMsrHSavePa, 0x300); … … 758 772 AssertCompileMemberOffset(CPUMCTX, hwvirt.fGif, 0x524); 759 773 AssertCompileMemberOffset(CPUMCTX, hwvirt.fLocalForcedActions, 0x528); 774 #endif 760 775 AssertCompileMembersAtSameOffset(CPUMCTX, CPUM_UNION_STRUCT_NM(g,qw.) rax, CPUMCTX, CPUM_UNION_NM(g.) aGRegs); 761 776 AssertCompileMembersAtSameOffset(CPUMCTX, CPUM_UNION_STRUCT_NM(g,qw.) rax, CPUMCTX, CPUM_UNION_STRUCT_NM(g,qw2.) r0); … … 871 886 AssertMsg(a_pLambdaCtx->fXStateMask & RT_BIT_64(a_iCompBit), (#a_iCompBit "\n")); \ 872 887 AssertMsg(a_pLambdaCtx->aoffXState[(a_iCompBit)] != UINT16_MAX, (#a_iCompBit "\n")); \ 873 return (a_PtrType)( (uint8_t *)a_pLambdaCtx->CTX_SUFF(pXState) + a_pLambdaCtx->aoffXState[(a_iCompBit)]); \888 return (a_PtrType)(&a_pLambdaCtx->abXState[a_pLambdaCtx->aoffXState[(a_iCompBit)]]); \ 874 889 }(a_pCtx)) 875 890 #elif defined(VBOX_STRICT) && defined(__GNUC__) … … 880 895 AssertMsg((a_pCtx)->fXStateMask & RT_BIT_64(a_iCompBit), (#a_iCompBit "\n")); \ 881 896 AssertMsg((a_pCtx)->aoffXState[(a_iCompBit)] != UINT16_MAX, (#a_iCompBit "\n")); \ 882 (a_PtrType)( (uint8_t *)(a_pCtx)->CTX_SUFF(pXState) + (a_pCtx)->aoffXState[(a_iCompBit)]); \897 (a_PtrType)(&(a_pCtx)->abXState[(a_pCtx)->aoffXState[(a_iCompBit)]]); \ 883 898 }) 884 899 #else 885 900 # define CPUMCTX_XSAVE_C_PTR(a_pCtx, a_iCompBit, a_PtrType) \ 886 ((a_PtrType)( (uint8_t *)(a_pCtx)->CTX_SUFF(pXState) + (a_pCtx)->aoffXState[(a_iCompBit)]))901 ((a_PtrType)(&(a_pCtx)->abXState[(a_pCtx)->aoffXState[(a_iCompBit)])]) 887 902 #endif 888 903 -
trunk/include/VBox/vmm/vm.h
r91271 r91281 305 305 CPUMCTX GstCtx; 306 306 #endif 307 uint8_t padding[ 4096]; /* multiple of 4096 */307 uint8_t padding[20480]; /* multiple of 4096 */ 308 308 } cpum; 309 309 -
trunk/include/VBox/vmm/vm.mac
r91266 r91281 91 91 .pgm resb 4096+28672 92 92 alignb 4096 93 .cpum resb 409693 .cpum resb 20480 94 94 %define VMCPU.cpum.GstCtx VMCPU.cpum 95 95 alignb 4096 -
trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp
r91275 r91281 1388 1388 if (pVCpu->cpum.s.Guest.fXStateMask != 0) 1389 1389 /* Adding more components. */ 1390 ASMXRstor( pVCpu->cpum.s.Guest.CTX_SUFF(pXState), fNewComponents);1390 ASMXRstor(&pVCpu->cpum.s.Guest.XState, fNewComponents); 1391 1391 else 1392 1392 { … … 1394 1394 pVCpu->cpum.s.Guest.fXStateMask |= XSAVE_C_X87 | XSAVE_C_SSE; 1395 1395 if (uNewValue & ~(XSAVE_C_X87 | XSAVE_C_SSE)) 1396 ASMXRstor( pVCpu->cpum.s.Guest.CTX_SUFF(pXState), uNewValue & ~(XSAVE_C_X87 | XSAVE_C_SSE));1396 ASMXRstor(&pVCpu->cpum.s.Guest.XState, uNewValue & ~(XSAVE_C_X87 | XSAVE_C_SSE)); 1397 1397 } 1398 1398 } -
trunk/src/VBox/VMM/VMMAll/IEMAll.cpp
r91263 r91281 7002 7002 7003 7003 /* Make sure any changes are loaded the next time around. */ 7004 pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->Hdr.bmXState |= XSAVE_C_SSE;7004 pVCpu->cpum.GstCtx.XState.Hdr.bmXState |= XSAVE_C_SSE; 7005 7005 } 7006 7006 … … 7043 7043 7044 7044 /* Just assume we're going to make changes to the SSE and YMM_HI parts. */ 7045 pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->Hdr.bmXState |= XSAVE_C_YMM | XSAVE_C_SSE;7045 pVCpu->cpum.GstCtx.XState.Hdr.bmXState |= XSAVE_C_YMM | XSAVE_C_SSE; 7046 7046 } 7047 7047 … … 7281 7281 IEM_STATIC void iemFpuPushResult(PVMCPUCC pVCpu, PIEMFPURESULT pResult) 7282 7282 { 7283 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;7283 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx.XState.x87; 7284 7284 iemFpuUpdateOpcodeAndIpWorker(pVCpu, pFpuCtx); 7285 7285 iemFpuMaybePushResult(pResult, pFpuCtx); … … 7298 7298 IEM_STATIC void iemFpuPushResultWithMemOp(PVMCPUCC pVCpu, PIEMFPURESULT pResult, uint8_t iEffSeg, RTGCPTR GCPtrEff) 7299 7299 { 7300 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;7300 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx.XState.x87; 7301 7301 iemFpuUpdateDP(pVCpu, pFpuCtx, iEffSeg, GCPtrEff); 7302 7302 iemFpuUpdateOpcodeAndIpWorker(pVCpu, pFpuCtx); … … 7314 7314 IEM_STATIC void iemFpuPushResultTwo(PVMCPUCC pVCpu, PIEMFPURESULTTWO pResult) 7315 7315 { 7316 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;7316 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx.XState.x87; 7317 7317 iemFpuUpdateOpcodeAndIpWorker(pVCpu, pFpuCtx); 7318 7318 … … 7368 7368 IEM_STATIC void iemFpuStoreResult(PVMCPUCC pVCpu, PIEMFPURESULT pResult, uint8_t iStReg) 7369 7369 { 7370 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;7370 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx.XState.x87; 7371 7371 iemFpuUpdateOpcodeAndIpWorker(pVCpu, pFpuCtx); 7372 7372 iemFpuStoreResultOnly(pFpuCtx, pResult, iStReg); … … 7384 7384 IEM_STATIC void iemFpuStoreResultThenPop(PVMCPUCC pVCpu, PIEMFPURESULT pResult, uint8_t iStReg) 7385 7385 { 7386 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;7386 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx.XState.x87; 7387 7387 iemFpuUpdateOpcodeAndIpWorker(pVCpu, pFpuCtx); 7388 7388 iemFpuStoreResultOnly(pFpuCtx, pResult, iStReg); … … 7404 7404 uint8_t iEffSeg, RTGCPTR GCPtrEff) 7405 7405 { 7406 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;7406 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx.XState.x87; 7407 7407 iemFpuUpdateDP(pVCpu, pFpuCtx, iEffSeg, GCPtrEff); 7408 7408 iemFpuUpdateOpcodeAndIpWorker(pVCpu, pFpuCtx); … … 7424 7424 uint8_t iStReg, uint8_t iEffSeg, RTGCPTR GCPtrEff) 7425 7425 { 7426 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;7426 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx.XState.x87; 7427 7427 iemFpuUpdateDP(pVCpu, pFpuCtx, iEffSeg, GCPtrEff); 7428 7428 iemFpuUpdateOpcodeAndIpWorker(pVCpu, pFpuCtx); … … 7439 7439 IEM_STATIC void iemFpuUpdateOpcodeAndIp(PVMCPUCC pVCpu) 7440 7440 { 7441 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;7441 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx.XState.x87; 7442 7442 iemFpuUpdateOpcodeAndIpWorker(pVCpu, pFpuCtx); 7443 7443 } … … 7453 7453 { 7454 7454 Assert(iStReg < 8); 7455 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;7455 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx.XState.x87; 7456 7456 uint8_t iReg = (X86_FSW_TOP_GET(pFpuCtx->FSW) + iStReg) & X86_FSW_TOP_SMASK; 7457 7457 pFpuCtx->FTW &= ~RT_BIT(iReg); … … 7466 7466 IEM_STATIC void iemFpuStackIncTop(PVMCPUCC pVCpu) 7467 7467 { 7468 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;7468 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx.XState.x87; 7469 7469 uint16_t uFsw = pFpuCtx->FSW; 7470 7470 uint16_t uTop = uFsw & X86_FSW_TOP_MASK; … … 7483 7483 IEM_STATIC void iemFpuStackDecTop(PVMCPUCC pVCpu) 7484 7484 { 7485 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;7485 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx.XState.x87; 7486 7486 uint16_t uFsw = pFpuCtx->FSW; 7487 7487 uint16_t uTop = uFsw & X86_FSW_TOP_MASK; … … 7501 7501 IEM_STATIC void iemFpuUpdateFSW(PVMCPUCC pVCpu, uint16_t u16FSW) 7502 7502 { 7503 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;7503 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx.XState.x87; 7504 7504 iemFpuUpdateOpcodeAndIpWorker(pVCpu, pFpuCtx); 7505 7505 iemFpuUpdateFSWOnly(pFpuCtx, u16FSW); … … 7515 7515 IEM_STATIC void iemFpuUpdateFSWThenPop(PVMCPUCC pVCpu, uint16_t u16FSW) 7516 7516 { 7517 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;7517 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx.XState.x87; 7518 7518 iemFpuUpdateOpcodeAndIpWorker(pVCpu, pFpuCtx); 7519 7519 iemFpuUpdateFSWOnly(pFpuCtx, u16FSW); … … 7532 7532 IEM_STATIC void iemFpuUpdateFSWWithMemOp(PVMCPUCC pVCpu, uint16_t u16FSW, uint8_t iEffSeg, RTGCPTR GCPtrEff) 7533 7533 { 7534 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;7534 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx.XState.x87; 7535 7535 iemFpuUpdateDP(pVCpu, pFpuCtx, iEffSeg, GCPtrEff); 7536 7536 iemFpuUpdateOpcodeAndIpWorker(pVCpu, pFpuCtx); … … 7547 7547 IEM_STATIC void iemFpuUpdateFSWThenPopPop(PVMCPUCC pVCpu, uint16_t u16FSW) 7548 7548 { 7549 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;7549 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx.XState.x87; 7550 7550 iemFpuUpdateOpcodeAndIpWorker(pVCpu, pFpuCtx); 7551 7551 iemFpuUpdateFSWOnly(pFpuCtx, u16FSW); … … 7565 7565 IEM_STATIC void iemFpuUpdateFSWWithMemOpThenPop(PVMCPUCC pVCpu, uint16_t u16FSW, uint8_t iEffSeg, RTGCPTR GCPtrEff) 7566 7566 { 7567 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;7567 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx.XState.x87; 7568 7568 iemFpuUpdateDP(pVCpu, pFpuCtx, iEffSeg, GCPtrEff); 7569 7569 iemFpuUpdateOpcodeAndIpWorker(pVCpu, pFpuCtx); … … 7612 7612 DECL_NO_INLINE(IEM_STATIC, void) iemFpuStackUnderflow(PVMCPUCC pVCpu, uint8_t iStReg) 7613 7613 { 7614 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;7614 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx.XState.x87; 7615 7615 iemFpuUpdateOpcodeAndIpWorker(pVCpu, pFpuCtx); 7616 7616 iemFpuStackUnderflowOnly(pFpuCtx, iStReg); … … 7621 7621 iemFpuStackUnderflowWithMemOp(PVMCPUCC pVCpu, uint8_t iStReg, uint8_t iEffSeg, RTGCPTR GCPtrEff) 7622 7622 { 7623 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;7623 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx.XState.x87; 7624 7624 iemFpuUpdateDP(pVCpu, pFpuCtx, iEffSeg, GCPtrEff); 7625 7625 iemFpuUpdateOpcodeAndIpWorker(pVCpu, pFpuCtx); … … 7630 7630 DECL_NO_INLINE(IEM_STATIC, void) iemFpuStackUnderflowThenPop(PVMCPUCC pVCpu, uint8_t iStReg) 7631 7631 { 7632 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;7632 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx.XState.x87; 7633 7633 iemFpuUpdateOpcodeAndIpWorker(pVCpu, pFpuCtx); 7634 7634 iemFpuStackUnderflowOnly(pFpuCtx, iStReg); … … 7640 7640 iemFpuStackUnderflowWithMemOpThenPop(PVMCPUCC pVCpu, uint8_t iStReg, uint8_t iEffSeg, RTGCPTR GCPtrEff) 7641 7641 { 7642 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;7642 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx.XState.x87; 7643 7643 iemFpuUpdateDP(pVCpu, pFpuCtx, iEffSeg, GCPtrEff); 7644 7644 iemFpuUpdateOpcodeAndIpWorker(pVCpu, pFpuCtx); … … 7650 7650 DECL_NO_INLINE(IEM_STATIC, void) iemFpuStackUnderflowThenPopPop(PVMCPUCC pVCpu) 7651 7651 { 7652 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;7652 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx.XState.x87; 7653 7653 iemFpuUpdateOpcodeAndIpWorker(pVCpu, pFpuCtx); 7654 7654 iemFpuStackUnderflowOnly(pFpuCtx, UINT8_MAX); … … 7661 7661 iemFpuStackPushUnderflow(PVMCPUCC pVCpu) 7662 7662 { 7663 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;7663 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx.XState.x87; 7664 7664 iemFpuUpdateOpcodeAndIpWorker(pVCpu, pFpuCtx); 7665 7665 … … 7687 7687 iemFpuStackPushUnderflowTwo(PVMCPUCC pVCpu) 7688 7688 { 7689 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;7689 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx.XState.x87; 7690 7690 iemFpuUpdateOpcodeAndIpWorker(pVCpu, pFpuCtx); 7691 7691 … … 7745 7745 DECL_NO_INLINE(IEM_STATIC, void) iemFpuStackPushOverflow(PVMCPUCC pVCpu) 7746 7746 { 7747 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;7747 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx.XState.x87; 7748 7748 iemFpuUpdateOpcodeAndIpWorker(pVCpu, pFpuCtx); 7749 7749 iemFpuStackPushOverflowOnly(pFpuCtx); … … 7761 7761 iemFpuStackPushOverflowWithMemOp(PVMCPUCC pVCpu, uint8_t iEffSeg, RTGCPTR GCPtrEff) 7762 7762 { 7763 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;7763 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx.XState.x87; 7764 7764 iemFpuUpdateDP(pVCpu, pFpuCtx, iEffSeg, GCPtrEff); 7765 7765 iemFpuUpdateOpcodeAndIpWorker(pVCpu, pFpuCtx); … … 7770 7770 IEM_STATIC int iemFpuStRegNotEmpty(PVMCPUCC pVCpu, uint8_t iStReg) 7771 7771 { 7772 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;7772 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx.XState.x87; 7773 7773 uint16_t iReg = (X86_FSW_TOP_GET(pFpuCtx->FSW) + iStReg) & X86_FSW_TOP_SMASK; 7774 7774 if (pFpuCtx->FTW & RT_BIT(iReg)) … … 7780 7780 IEM_STATIC int iemFpuStRegNotEmptyRef(PVMCPUCC pVCpu, uint8_t iStReg, PCRTFLOAT80U *ppRef) 7781 7781 { 7782 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;7782 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx.XState.x87; 7783 7783 uint16_t iReg = (X86_FSW_TOP_GET(pFpuCtx->FSW) + iStReg) & X86_FSW_TOP_SMASK; 7784 7784 if (pFpuCtx->FTW & RT_BIT(iReg)) … … 7794 7794 uint8_t iStReg1, PCRTFLOAT80U *ppRef1) 7795 7795 { 7796 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;7796 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx.XState.x87; 7797 7797 uint16_t iTop = X86_FSW_TOP_GET(pFpuCtx->FSW); 7798 7798 uint16_t iReg0 = (iTop + iStReg0) & X86_FSW_TOP_SMASK; … … 7810 7810 IEM_STATIC int iemFpu2StRegsNotEmptyRefFirst(PVMCPUCC pVCpu, uint8_t iStReg0, PCRTFLOAT80U *ppRef0, uint8_t iStReg1) 7811 7811 { 7812 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;7812 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx.XState.x87; 7813 7813 uint16_t iTop = X86_FSW_TOP_GET(pFpuCtx->FSW); 7814 7814 uint16_t iReg0 = (iTop + iStReg0) & X86_FSW_TOP_SMASK; … … 9598 9598 /** @todo testcase: Ordering of \#SS(0) vs \#GP() vs \#PF on SSE stuff. */ 9599 9599 if ( (GCPtrMem & 15) 9600 && !(pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.MXCSR & X86_MXCSR_MM)) /** @todo should probably check this *after* applying seg.u64Base... Check real HW. */9600 && !(pVCpu->cpum.GstCtx.XState.x87.MXCSR & X86_MXCSR_MM)) /** @todo should probably check this *after* applying seg.u64Base... Check real HW. */ 9601 9601 return iemRaiseGeneralProtectionFault0(pVCpu); 9602 9602 … … 9631 9631 /** @todo testcase: Ordering of \#SS(0) vs \#GP() vs \#PF on SSE stuff. */ 9632 9632 if ( (GCPtrMem & 15) == 0 9633 || (pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.MXCSR & X86_MXCSR_MM)) /** @todo should probably check this *after* applying seg.u64Base... Check real HW. */9633 || (pVCpu->cpum.GstCtx.XState.x87.MXCSR & X86_MXCSR_MM)) /** @todo should probably check this *after* applying seg.u64Base... Check real HW. */ 9634 9634 { 9635 9635 PCRTUINT128U pu128Src = (PCRTUINT128U)iemMemMapJmp(pVCpu, sizeof(*pu128Src), iSegReg, GCPtrMem, IEM_ACCESS_DATA_R); … … 10074 10074 /* The lazy approach for now... */ 10075 10075 if ( (GCPtrMem & 15) 10076 && !(pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.MXCSR & X86_MXCSR_MM)) /** @todo should probably check this *after* applying seg.u64Base... Check real HW. */10076 && !(pVCpu->cpum.GstCtx.XState.x87.MXCSR & X86_MXCSR_MM)) /** @todo should probably check this *after* applying seg.u64Base... Check real HW. */ 10077 10077 return iemRaiseGeneralProtectionFault0(pVCpu); 10078 10078 … … 10105 10105 /* The lazy approach for now... */ 10106 10106 if ( (GCPtrMem & 15) == 0 10107 || (pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.MXCSR & X86_MXCSR_MM)) /** @todo should probably check this *after* applying seg.u64Base... Check real HW. */10107 || (pVCpu->cpum.GstCtx.XState.x87.MXCSR & X86_MXCSR_MM)) /** @todo should probably check this *after* applying seg.u64Base... Check real HW. */ 10108 10108 { 10109 10109 PRTUINT128U pu128Dst = (PRTUINT128U)iemMemMapJmp(pVCpu, sizeof(*pu128Dst), iSegReg, GCPtrMem, IEM_ACCESS_DATA_W); … … 11101 11101 #define IEM_MC_MAYBE_RAISE_FPU_XCPT() \ 11102 11102 do { \ 11103 if (pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.FSW & X86_FSW_ES) \11103 if (pVCpu->cpum.GstCtx.XState.x87.FSW & X86_FSW_ES) \ 11104 11104 return iemRaiseMathFault(pVCpu); \ 11105 11105 } while (0) … … 11255 11255 #define IEM_MC_FETCH_EFLAGS(a_EFlags) (a_EFlags) = pVCpu->cpum.GstCtx.eflags.u 11256 11256 #define IEM_MC_FETCH_EFLAGS_U8(a_EFlags) (a_EFlags) = (uint8_t)pVCpu->cpum.GstCtx.eflags.u 11257 #define IEM_MC_FETCH_FSW(a_u16Fsw) (a_u16Fsw) = pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.FSW11258 #define IEM_MC_FETCH_FCW(a_u16Fcw) (a_u16Fcw) = pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.FCW11257 #define IEM_MC_FETCH_FSW(a_u16Fsw) (a_u16Fsw) = pVCpu->cpum.GstCtx.XState.x87.FSW 11258 #define IEM_MC_FETCH_FCW(a_u16Fcw) (a_u16Fcw) = pVCpu->cpum.GstCtx.XState.x87.FCW 11259 11259 11260 11260 #define IEM_MC_STORE_GREG_U8(a_iGReg, a_u8Value) *iemGRegRefU8( pVCpu, (a_iGReg)) = (a_u8Value) … … 11278 11278 } while (0) 11279 11279 #define IEM_MC_STORE_FPUREG_R80_SRC_REF(a_iSt, a_pr80Src) \ 11280 do { pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.aRegs[a_iSt].r80 = *(a_pr80Src); } while (0)11280 do { pVCpu->cpum.GstCtx.XState.x87.aRegs[a_iSt].r80 = *(a_pr80Src); } while (0) 11281 11281 11282 11282 … … 11372 11372 #define IEM_MC_FLIP_EFL_BIT(a_fBit) do { pVCpu->cpum.GstCtx.eflags.u ^= (a_fBit); } while (0) 11373 11373 11374 #define IEM_MC_CLEAR_FSW_EX() do { pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.FSW &= X86_FSW_C_MASK | X86_FSW_TOP_MASK; } while (0)11374 #define IEM_MC_CLEAR_FSW_EX() do { pVCpu->cpum.GstCtx.XState.x87.FSW &= X86_FSW_C_MASK | X86_FSW_TOP_MASK; } while (0) 11375 11375 11376 11376 /** Switches the FPU state to MMX mode (FSW.TOS=0, FTW=0) if necessary. */ 11377 11377 #define IEM_MC_FPU_TO_MMX_MODE() do { \ 11378 pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.FSW &= ~X86_FSW_TOP_MASK; \11379 pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.FTW = 0xff; \11378 pVCpu->cpum.GstCtx.XState.x87.FSW &= ~X86_FSW_TOP_MASK; \ 11379 pVCpu->cpum.GstCtx.XState.x87.FTW = 0xff; \ 11380 11380 } while (0) 11381 11381 11382 11382 /** Switches the FPU state from MMX mode (FTW=0xffff). */ 11383 11383 #define IEM_MC_FPU_FROM_MMX_MODE() do { \ 11384 pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.FTW = 0; \11384 pVCpu->cpum.GstCtx.XState.x87.FTW = 0; \ 11385 11385 } while (0) 11386 11386 11387 11387 #define IEM_MC_FETCH_MREG_U64(a_u64Value, a_iMReg) \ 11388 do { (a_u64Value) = pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.aRegs[(a_iMReg)].mmx; } while (0)11388 do { (a_u64Value) = pVCpu->cpum.GstCtx.XState.x87.aRegs[(a_iMReg)].mmx; } while (0) 11389 11389 #define IEM_MC_FETCH_MREG_U32(a_u32Value, a_iMReg) \ 11390 do { (a_u32Value) = pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.aRegs[(a_iMReg)].au32[0]; } while (0)11390 do { (a_u32Value) = pVCpu->cpum.GstCtx.XState.x87.aRegs[(a_iMReg)].au32[0]; } while (0) 11391 11391 #define IEM_MC_STORE_MREG_U64(a_iMReg, a_u64Value) do { \ 11392 pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.aRegs[(a_iMReg)].mmx = (a_u64Value); \11393 pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.aRegs[(a_iMReg)].au32[2] = 0xffff; \11392 pVCpu->cpum.GstCtx.XState.x87.aRegs[(a_iMReg)].mmx = (a_u64Value); \ 11393 pVCpu->cpum.GstCtx.XState.x87.aRegs[(a_iMReg)].au32[2] = 0xffff; \ 11394 11394 } while (0) 11395 11395 #define IEM_MC_STORE_MREG_U32_ZX_U64(a_iMReg, a_u32Value) do { \ 11396 pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.aRegs[(a_iMReg)].mmx = (uint32_t)(a_u32Value); \11397 pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.aRegs[(a_iMReg)].au32[2] = 0xffff; \11396 pVCpu->cpum.GstCtx.XState.x87.aRegs[(a_iMReg)].mmx = (uint32_t)(a_u32Value); \ 11397 pVCpu->cpum.GstCtx.XState.x87.aRegs[(a_iMReg)].au32[2] = 0xffff; \ 11398 11398 } while (0) 11399 11399 #define IEM_MC_REF_MREG_U64(a_pu64Dst, a_iMReg) /** @todo need to set high word to 0xffff on commit (see IEM_MC_STORE_MREG_U64) */ \ 11400 (a_pu64Dst) = (&pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.aRegs[(a_iMReg)].mmx)11400 (a_pu64Dst) = (&pVCpu->cpum.GstCtx.XState.x87.aRegs[(a_iMReg)].mmx) 11401 11401 #define IEM_MC_REF_MREG_U64_CONST(a_pu64Dst, a_iMReg) \ 11402 (a_pu64Dst) = ((uint64_t const *)&pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.aRegs[(a_iMReg)].mmx)11402 (a_pu64Dst) = ((uint64_t const *)&pVCpu->cpum.GstCtx.XState.x87.aRegs[(a_iMReg)].mmx) 11403 11403 #define IEM_MC_REF_MREG_U32_CONST(a_pu32Dst, a_iMReg) \ 11404 (a_pu32Dst) = ((uint32_t const *)&pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.aRegs[(a_iMReg)].mmx)11404 (a_pu32Dst) = ((uint32_t const *)&pVCpu->cpum.GstCtx.XState.x87.aRegs[(a_iMReg)].mmx) 11405 11405 11406 11406 #define IEM_MC_FETCH_XREG_U128(a_u128Value, a_iXReg) \ 11407 do { (a_u128Value).au64[0] = pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.aXMM[(a_iXReg)].au64[0]; \11408 (a_u128Value).au64[1] = pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.aXMM[(a_iXReg)].au64[1]; \11407 do { (a_u128Value).au64[0] = pVCpu->cpum.GstCtx.XState.x87.aXMM[(a_iXReg)].au64[0]; \ 11408 (a_u128Value).au64[1] = pVCpu->cpum.GstCtx.XState.x87.aXMM[(a_iXReg)].au64[1]; \ 11409 11409 } while (0) 11410 11410 #define IEM_MC_FETCH_XREG_U64(a_u64Value, a_iXReg) \ 11411 do { (a_u64Value) = pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.aXMM[(a_iXReg)].au64[0]; } while (0)11411 do { (a_u64Value) = pVCpu->cpum.GstCtx.XState.x87.aXMM[(a_iXReg)].au64[0]; } while (0) 11412 11412 #define IEM_MC_FETCH_XREG_U32(a_u32Value, a_iXReg) \ 11413 do { (a_u32Value) = pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.aXMM[(a_iXReg)].au32[0]; } while (0)11413 do { (a_u32Value) = pVCpu->cpum.GstCtx.XState.x87.aXMM[(a_iXReg)].au32[0]; } while (0) 11414 11414 #define IEM_MC_FETCH_XREG_HI_U64(a_u64Value, a_iXReg) \ 11415 do { (a_u64Value) = pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.aXMM[(a_iXReg)].au64[1]; } while (0)11415 do { (a_u64Value) = pVCpu->cpum.GstCtx.XState.x87.aXMM[(a_iXReg)].au64[1]; } while (0) 11416 11416 #define IEM_MC_STORE_XREG_U128(a_iXReg, a_u128Value) \ 11417 do { pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.aXMM[(a_iXReg)].au64[0] = (a_u128Value).au64[0]; \11418 pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.aXMM[(a_iXReg)].au64[1] = (a_u128Value).au64[1]; \11417 do { pVCpu->cpum.GstCtx.XState.x87.aXMM[(a_iXReg)].au64[0] = (a_u128Value).au64[0]; \ 11418 pVCpu->cpum.GstCtx.XState.x87.aXMM[(a_iXReg)].au64[1] = (a_u128Value).au64[1]; \ 11419 11419 } while (0) 11420 11420 #define IEM_MC_STORE_XREG_U64(a_iXReg, a_u64Value) \ 11421 do { pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.aXMM[(a_iXReg)].au64[0] = (a_u64Value); } while (0)11421 do { pVCpu->cpum.GstCtx.XState.x87.aXMM[(a_iXReg)].au64[0] = (a_u64Value); } while (0) 11422 11422 #define IEM_MC_STORE_XREG_U64_ZX_U128(a_iXReg, a_u64Value) \ 11423 do { pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.aXMM[(a_iXReg)].au64[0] = (a_u64Value); \11424 pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.aXMM[(a_iXReg)].au64[1] = 0; \11423 do { pVCpu->cpum.GstCtx.XState.x87.aXMM[(a_iXReg)].au64[0] = (a_u64Value); \ 11424 pVCpu->cpum.GstCtx.XState.x87.aXMM[(a_iXReg)].au64[1] = 0; \ 11425 11425 } while (0) 11426 11426 #define IEM_MC_STORE_XREG_U32(a_iXReg, a_u32Value) \ 11427 do { pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.aXMM[(a_iXReg)].au32[0] = (a_u32Value); } while (0)11427 do { pVCpu->cpum.GstCtx.XState.x87.aXMM[(a_iXReg)].au32[0] = (a_u32Value); } while (0) 11428 11428 #define IEM_MC_STORE_XREG_U32_ZX_U128(a_iXReg, a_u32Value) \ 11429 do { pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.aXMM[(a_iXReg)].au64[0] = (uint32_t)(a_u32Value); \11430 pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.aXMM[(a_iXReg)].au64[1] = 0; \11429 do { pVCpu->cpum.GstCtx.XState.x87.aXMM[(a_iXReg)].au64[0] = (uint32_t)(a_u32Value); \ 11430 pVCpu->cpum.GstCtx.XState.x87.aXMM[(a_iXReg)].au64[1] = 0; \ 11431 11431 } while (0) 11432 11432 #define IEM_MC_STORE_XREG_HI_U64(a_iXReg, a_u64Value) \ 11433 do { pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.aXMM[(a_iXReg)].au64[1] = (a_u64Value); } while (0)11433 do { pVCpu->cpum.GstCtx.XState.x87.aXMM[(a_iXReg)].au64[1] = (a_u64Value); } while (0) 11434 11434 #define IEM_MC_REF_XREG_U128(a_pu128Dst, a_iXReg) \ 11435 (a_pu128Dst) = (&pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.aXMM[(a_iXReg)].uXmm)11435 (a_pu128Dst) = (&pVCpu->cpum.GstCtx.XState.x87.aXMM[(a_iXReg)].uXmm) 11436 11436 #define IEM_MC_REF_XREG_U128_CONST(a_pu128Dst, a_iXReg) \ 11437 (a_pu128Dst) = ((PCRTUINT128U)&pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.aXMM[(a_iXReg)].uXmm)11437 (a_pu128Dst) = ((PCRTUINT128U)&pVCpu->cpum.GstCtx.XState.x87.aXMM[(a_iXReg)].uXmm) 11438 11438 #define IEM_MC_REF_XREG_U64_CONST(a_pu64Dst, a_iXReg) \ 11439 (a_pu64Dst) = ((uint64_t const *)&pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.aXMM[(a_iXReg)].au64[0])11439 (a_pu64Dst) = ((uint64_t const *)&pVCpu->cpum.GstCtx.XState.x87.aXMM[(a_iXReg)].au64[0]) 11440 11440 #define IEM_MC_COPY_XREG_U128(a_iXRegDst, a_iXRegSrc) \ 11441 do { pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.aXMM[(a_iXRegDst)].au64[0] \11442 = pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.aXMM[(a_iXRegSrc)].au64[0]; \11443 pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.aXMM[(a_iXRegDst)].au64[1] \11444 = pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.aXMM[(a_iXRegSrc)].au64[1]; \11441 do { pVCpu->cpum.GstCtx.XState.x87.aXMM[(a_iXRegDst)].au64[0] \ 11442 = pVCpu->cpum.GstCtx.XState.x87.aXMM[(a_iXRegSrc)].au64[0]; \ 11443 pVCpu->cpum.GstCtx.XState.x87.aXMM[(a_iXRegDst)].au64[1] \ 11444 = pVCpu->cpum.GstCtx.XState.x87.aXMM[(a_iXRegSrc)].au64[1]; \ 11445 11445 } while (0) 11446 11446 11447 11447 #define IEM_MC_FETCH_YREG_U32(a_u32Dst, a_iYRegSrc) \ 11448 do { PX86XSAVEAREA pXStateTmp = pVCpu->cpum.GstCtx.CTX_SUFF(pXState); \ 11449 uintptr_t const iYRegSrcTmp = (a_iYRegSrc); \ 11450 (a_u32Dst) = pXStateTmp->x87.aXMM[iYRegSrcTmp].au32[0]; \ 11448 do { uintptr_t const iYRegSrcTmp = (a_iYRegSrc); \ 11449 (a_u32Dst) = pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegSrcTmp].au32[0]; \ 11451 11450 } while (0) 11452 11451 #define IEM_MC_FETCH_YREG_U64(a_u64Dst, a_iYRegSrc) \ 11453 do { PX86XSAVEAREA pXStateTmp = pVCpu->cpum.GstCtx.CTX_SUFF(pXState); \ 11454 uintptr_t const iYRegSrcTmp = (a_iYRegSrc); \ 11455 (a_u64Dst) = pXStateTmp->x87.aXMM[iYRegSrcTmp].au64[0]; \ 11452 do { uintptr_t const iYRegSrcTmp = (a_iYRegSrc); \ 11453 (a_u64Dst) = pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegSrcTmp].au64[0]; \ 11456 11454 } while (0) 11457 11455 #define IEM_MC_FETCH_YREG_U128(a_u128Dst, a_iYRegSrc) \ 11458 do { PX86XSAVEAREA pXStateTmp = pVCpu->cpum.GstCtx.CTX_SUFF(pXState); \ 11459 uintptr_t const iYRegSrcTmp = (a_iYRegSrc); \ 11460 (a_u128Dst).au64[0] = pXStateTmp->x87.aXMM[iYRegSrcTmp].au64[0]; \ 11461 (a_u128Dst).au64[1] = pXStateTmp->x87.aXMM[iYRegSrcTmp].au64[1]; \ 11456 do { uintptr_t const iYRegSrcTmp = (a_iYRegSrc); \ 11457 (a_u128Dst).au64[0] = pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegSrcTmp].au64[0]; \ 11458 (a_u128Dst).au64[1] = pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegSrcTmp].au64[1]; \ 11462 11459 } while (0) 11463 11460 #define IEM_MC_FETCH_YREG_U256(a_u256Dst, a_iYRegSrc) \ 11464 do { PX86XSAVEAREA pXStateTmp = pVCpu->cpum.GstCtx.CTX_SUFF(pXState); \ 11465 uintptr_t const iYRegSrcTmp = (a_iYRegSrc); \ 11466 (a_u256Dst).au64[0] = pXStateTmp->x87.aXMM[iYRegSrcTmp].au64[0]; \ 11467 (a_u256Dst).au64[1] = pXStateTmp->x87.aXMM[iYRegSrcTmp].au64[1]; \ 11468 (a_u256Dst).au64[2] = pXStateTmp->u.YmmHi.aYmmHi[iYRegSrcTmp].au64[0]; \ 11469 (a_u256Dst).au64[3] = pXStateTmp->u.YmmHi.aYmmHi[iYRegSrcTmp].au64[1]; \ 11461 do { uintptr_t const iYRegSrcTmp = (a_iYRegSrc); \ 11462 (a_u256Dst).au64[0] = pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegSrcTmp].au64[0]; \ 11463 (a_u256Dst).au64[1] = pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegSrcTmp].au64[1]; \ 11464 (a_u256Dst).au64[2] = pVCpu->cpum.GstCtx.XState.u.YmmHi.aYmmHi[iYRegSrcTmp].au64[0]; \ 11465 (a_u256Dst).au64[3] = pVCpu->cpum.GstCtx.XState.u.YmmHi.aYmmHi[iYRegSrcTmp].au64[1]; \ 11470 11466 } while (0) 11471 11467 11472 #define IEM_MC_INT_CLEAR_ZMM_256_UP(a_ pXState, a_iXRegDst) do { /* For AVX512 and AVX1024 support. */ } while (0)11468 #define IEM_MC_INT_CLEAR_ZMM_256_UP(a_iXRegDst) do { /* For AVX512 and AVX1024 support. */ } while (0) 11473 11469 #define IEM_MC_STORE_YREG_U32_ZX_VLMAX(a_iYRegDst, a_u32Src) \ 11474 do { PX86XSAVEAREA pXStateTmp = pVCpu->cpum.GstCtx.CTX_SUFF(pXState); \ 11475 uintptr_t const iYRegDstTmp = (a_iYRegDst); \ 11476 pXStateTmp->x87.aXMM[iYRegDstTmp].au32[0] = (a_u32Src); \ 11477 pXStateTmp->x87.aXMM[iYRegDstTmp].au32[1] = 0; \ 11478 pXStateTmp->x87.aXMM[iYRegDstTmp].au64[1] = 0; \ 11479 pXStateTmp->u.YmmHi.aYmmHi[iYRegDstTmp].au64[0] = 0; \ 11480 pXStateTmp->u.YmmHi.aYmmHi[iYRegDstTmp].au64[1] = 0; \ 11481 IEM_MC_INT_CLEAR_ZMM_256_UP(pXStateTmp, iYRegDstTmp); \ 11470 do { uintptr_t const iYRegDstTmp = (a_iYRegDst); \ 11471 pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegDstTmp].au32[0] = (a_u32Src); \ 11472 pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegDstTmp].au32[1] = 0; \ 11473 pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegDstTmp].au64[1] = 0; \ 11474 pVCpu->cpum.GstCtx.XState.u.YmmHi.aYmmHi[iYRegDstTmp].au64[0] = 0; \ 11475 pVCpu->cpum.GstCtx.XState.u.YmmHi.aYmmHi[iYRegDstTmp].au64[1] = 0; \ 11476 IEM_MC_INT_CLEAR_ZMM_256_UP(iYRegDstTmp); \ 11482 11477 } while (0) 11483 11478 #define IEM_MC_STORE_YREG_U64_ZX_VLMAX(a_iYRegDst, a_u64Src) \ 11484 do { PX86XSAVEAREA pXStateTmp = pVCpu->cpum.GstCtx.CTX_SUFF(pXState); \ 11485 uintptr_t const iYRegDstTmp = (a_iYRegDst); \ 11486 pXStateTmp->x87.aXMM[iYRegDstTmp].au64[0] = (a_u64Src); \ 11487 pXStateTmp->x87.aXMM[iYRegDstTmp].au64[1] = 0; \ 11488 pXStateTmp->u.YmmHi.aYmmHi[iYRegDstTmp].au64[0] = 0; \ 11489 pXStateTmp->u.YmmHi.aYmmHi[iYRegDstTmp].au64[1] = 0; \ 11490 IEM_MC_INT_CLEAR_ZMM_256_UP(pXStateTmp, iYRegDstTmp); \ 11479 do { uintptr_t const iYRegDstTmp = (a_iYRegDst); \ 11480 pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegDstTmp].au64[0] = (a_u64Src); \ 11481 pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegDstTmp].au64[1] = 0; \ 11482 pVCpu->cpum.GstCtx.XState.u.YmmHi.aYmmHi[iYRegDstTmp].au64[0] = 0; \ 11483 pVCpu->cpum.GstCtx.XState.u.YmmHi.aYmmHi[iYRegDstTmp].au64[1] = 0; \ 11484 IEM_MC_INT_CLEAR_ZMM_256_UP(iYRegDstTmp); \ 11491 11485 } while (0) 11492 11486 #define IEM_MC_STORE_YREG_U128_ZX_VLMAX(a_iYRegDst, a_u128Src) \ 11493 do { PX86XSAVEAREA pXStateTmp = pVCpu->cpum.GstCtx.CTX_SUFF(pXState); \ 11494 uintptr_t const iYRegDstTmp = (a_iYRegDst); \ 11495 pXStateTmp->x87.aXMM[iYRegDstTmp].au64[0] = (a_u128Src).au64[0]; \ 11496 pXStateTmp->x87.aXMM[iYRegDstTmp].au64[1] = (a_u128Src).au64[1]; \ 11497 pXStateTmp->u.YmmHi.aYmmHi[iYRegDstTmp].au64[0] = 0; \ 11498 pXStateTmp->u.YmmHi.aYmmHi[iYRegDstTmp].au64[1] = 0; \ 11499 IEM_MC_INT_CLEAR_ZMM_256_UP(pXStateTmp, iYRegDstTmp); \ 11487 do { uintptr_t const iYRegDstTmp = (a_iYRegDst); \ 11488 pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegDstTmp].au64[0] = (a_u128Src).au64[0]; \ 11489 pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegDstTmp].au64[1] = (a_u128Src).au64[1]; \ 11490 pVCpu->cpum.GstCtx.XState.u.YmmHi.aYmmHi[iYRegDstTmp].au64[0] = 0; \ 11491 pVCpu->cpum.GstCtx.XState.u.YmmHi.aYmmHi[iYRegDstTmp].au64[1] = 0; \ 11492 IEM_MC_INT_CLEAR_ZMM_256_UP(iYRegDstTmp); \ 11500 11493 } while (0) 11501 11494 #define IEM_MC_STORE_YREG_U256_ZX_VLMAX(a_iYRegDst, a_u256Src) \ 11502 do { PX86XSAVEAREA pXStateTmp = pVCpu->cpum.GstCtx.CTX_SUFF(pXState); \ 11503 uintptr_t const iYRegDstTmp = (a_iYRegDst); \ 11504 pXStateTmp->x87.aXMM[iYRegDstTmp].au64[0] = (a_u256Src).au64[0]; \ 11505 pXStateTmp->x87.aXMM[iYRegDstTmp].au64[1] = (a_u256Src).au64[1]; \ 11506 pXStateTmp->u.YmmHi.aYmmHi[iYRegDstTmp].au64[0] = (a_u256Src).au64[2]; \ 11507 pXStateTmp->u.YmmHi.aYmmHi[iYRegDstTmp].au64[1] = (a_u256Src).au64[3]; \ 11508 IEM_MC_INT_CLEAR_ZMM_256_UP(pXStateTmp, iYRegDstTmp); \ 11495 do { uintptr_t const iYRegDstTmp = (a_iYRegDst); \ 11496 pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegDstTmp].au64[0] = (a_u256Src).au64[0]; \ 11497 pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegDstTmp].au64[1] = (a_u256Src).au64[1]; \ 11498 pVCpu->cpum.GstCtx.XState.u.YmmHi.aYmmHi[iYRegDstTmp].au64[0] = (a_u256Src).au64[2]; \ 11499 pVCpu->cpum.GstCtx.XState.u.YmmHi.aYmmHi[iYRegDstTmp].au64[1] = (a_u256Src).au64[3]; \ 11500 IEM_MC_INT_CLEAR_ZMM_256_UP(iYRegDstTmp); \ 11509 11501 } while (0) 11510 11502 11511 11503 #define IEM_MC_REF_YREG_U128(a_pu128Dst, a_iYReg) \ 11512 (a_pu128Dst) = (&pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.aYMM[(a_iYReg)].uXmm)11504 (a_pu128Dst) = (&pVCpu->cpum.GstCtx.XState.x87.aYMM[(a_iYReg)].uXmm) 11513 11505 #define IEM_MC_REF_YREG_U128_CONST(a_pu128Dst, a_iYReg) \ 11514 (a_pu128Dst) = ((PCRTUINT128U)&pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.aYMM[(a_iYReg)].uXmm)11506 (a_pu128Dst) = ((PCRTUINT128U)&pVCpu->cpum.GstCtx.XState.x87.aYMM[(a_iYReg)].uXmm) 11515 11507 #define IEM_MC_REF_YREG_U64_CONST(a_pu64Dst, a_iYReg) \ 11516 (a_pu64Dst) = ((uint64_t const *)&pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.aYMM[(a_iYReg)].au64[0])11508 (a_pu64Dst) = ((uint64_t const *)&pVCpu->cpum.GstCtx.XState.x87.aYMM[(a_iYReg)].au64[0]) 11517 11509 #define IEM_MC_CLEAR_YREG_128_UP(a_iYReg) \ 11518 do { PX86XSAVEAREA pXStateTmp = pVCpu->cpum.GstCtx.CTX_SUFF(pXState); \ 11519 uintptr_t const iYRegTmp = (a_iYReg); \ 11520 pXStateTmp->u.YmmHi.aYmmHi[iYRegTmp].au64[0] = 0; \ 11521 pXStateTmp->u.YmmHi.aYmmHi[iYRegTmp].au64[1] = 0; \ 11522 IEM_MC_INT_CLEAR_ZMM_256_UP(pXStateTmp, iYRegTmp); \ 11510 do { uintptr_t const iYRegTmp = (a_iYReg); \ 11511 pVCpu->cpum.GstCtx.XState.u.YmmHi.aYmmHi[iYRegTmp].au64[0] = 0; \ 11512 pVCpu->cpum.GstCtx.XState.u.YmmHi.aYmmHi[iYRegTmp].au64[1] = 0; \ 11513 IEM_MC_INT_CLEAR_ZMM_256_UP(iYRegTmp); \ 11523 11514 } while (0) 11524 11515 11525 11516 #define IEM_MC_COPY_YREG_U256_ZX_VLMAX(a_iYRegDst, a_iYRegSrc) \ 11526 do { PX86XSAVEAREA pXStateTmp = pVCpu->cpum.GstCtx.CTX_SUFF(pXState); \ 11527 uintptr_t const iYRegDstTmp = (a_iYRegDst); \ 11517 do { uintptr_t const iYRegDstTmp = (a_iYRegDst); \ 11528 11518 uintptr_t const iYRegSrcTmp = (a_iYRegSrc); \ 11529 p XStateTmp->x87.aXMM[iYRegDstTmp].au64[0] = pXStateTmp->x87.aXMM[iYRegSrcTmp].au64[0]; \11530 p XStateTmp->x87.aXMM[iYRegDstTmp].au64[1] = pXStateTmp->x87.aXMM[iYRegSrcTmp].au64[1]; \11531 p XStateTmp->u.YmmHi.aYmmHi[iYRegDstTmp].au64[0] = pXStateTmp->u.YmmHi.aYmmHi[iYRegSrcTmp].au64[0]; \11532 p XStateTmp->u.YmmHi.aYmmHi[iYRegDstTmp].au64[1] = pXStateTmp->u.YmmHi.aYmmHi[iYRegSrcTmp].au64[1]; \11533 IEM_MC_INT_CLEAR_ZMM_256_UP( pXStateTmp,iYRegDstTmp); \11519 pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegDstTmp].au64[0] = pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegSrcTmp].au64[0]; \ 11520 pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegDstTmp].au64[1] = pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegSrcTmp].au64[1]; \ 11521 pVCpu->cpum.GstCtx.XState.u.YmmHi.aYmmHi[iYRegDstTmp].au64[0] = pVCpu->cpum.GstCtx.XState.u.YmmHi.aYmmHi[iYRegSrcTmp].au64[0]; \ 11522 pVCpu->cpum.GstCtx.XState.u.YmmHi.aYmmHi[iYRegDstTmp].au64[1] = pVCpu->cpum.GstCtx.XState.u.YmmHi.aYmmHi[iYRegSrcTmp].au64[1]; \ 11523 IEM_MC_INT_CLEAR_ZMM_256_UP(iYRegDstTmp); \ 11534 11524 } while (0) 11535 11525 #define IEM_MC_COPY_YREG_U128_ZX_VLMAX(a_iYRegDst, a_iYRegSrc) \ 11536 do { PX86XSAVEAREA pXStateTmp = pVCpu->cpum.GstCtx.CTX_SUFF(pXState); \ 11537 uintptr_t const iYRegDstTmp = (a_iYRegDst); \ 11526 do { uintptr_t const iYRegDstTmp = (a_iYRegDst); \ 11538 11527 uintptr_t const iYRegSrcTmp = (a_iYRegSrc); \ 11539 p XStateTmp->x87.aXMM[iYRegDstTmp].au64[0] = pXStateTmp->x87.aXMM[iYRegSrcTmp].au64[0]; \11540 p XStateTmp->x87.aXMM[iYRegDstTmp].au64[1] = pXStateTmp->x87.aXMM[iYRegSrcTmp].au64[1]; \11541 p XStateTmp->u.YmmHi.aYmmHi[iYRegDstTmp].au64[0] = 0; \11542 p XStateTmp->u.YmmHi.aYmmHi[iYRegDstTmp].au64[1] = 0; \11543 IEM_MC_INT_CLEAR_ZMM_256_UP( pXStateTmp,iYRegDstTmp); \11528 pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegDstTmp].au64[0] = pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegSrcTmp].au64[0]; \ 11529 pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegDstTmp].au64[1] = pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegSrcTmp].au64[1]; \ 11530 pVCpu->cpum.GstCtx.XState.u.YmmHi.aYmmHi[iYRegDstTmp].au64[0] = 0; \ 11531 pVCpu->cpum.GstCtx.XState.u.YmmHi.aYmmHi[iYRegDstTmp].au64[1] = 0; \ 11532 IEM_MC_INT_CLEAR_ZMM_256_UP(iYRegDstTmp); \ 11544 11533 } while (0) 11545 11534 #define IEM_MC_COPY_YREG_U64_ZX_VLMAX(a_iYRegDst, a_iYRegSrc) \ 11546 do { PX86XSAVEAREA pXStateTmp = pVCpu->cpum.GstCtx.CTX_SUFF(pXState); \ 11547 uintptr_t const iYRegDstTmp = (a_iYRegDst); \ 11535 do { uintptr_t const iYRegDstTmp = (a_iYRegDst); \ 11548 11536 uintptr_t const iYRegSrcTmp = (a_iYRegSrc); \ 11549 p XStateTmp->x87.aXMM[iYRegDstTmp].au64[0] = pXStateTmp->x87.aXMM[iYRegSrcTmp].au64[0]; \11550 p XStateTmp->x87.aXMM[iYRegDstTmp].au64[1] = 0; \11551 p XStateTmp->u.YmmHi.aYmmHi[iYRegDstTmp].au64[0] = 0; \11552 p XStateTmp->u.YmmHi.aYmmHi[iYRegDstTmp].au64[1] = 0; \11553 IEM_MC_INT_CLEAR_ZMM_256_UP( pXStateTmp,iYRegDstTmp); \11537 pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegDstTmp].au64[0] = pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegSrcTmp].au64[0]; \ 11538 pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegDstTmp].au64[1] = 0; \ 11539 pVCpu->cpum.GstCtx.XState.u.YmmHi.aYmmHi[iYRegDstTmp].au64[0] = 0; \ 11540 pVCpu->cpum.GstCtx.XState.u.YmmHi.aYmmHi[iYRegDstTmp].au64[1] = 0; \ 11541 IEM_MC_INT_CLEAR_ZMM_256_UP(iYRegDstTmp); \ 11554 11542 } while (0) 11555 11543 11556 11544 #define IEM_MC_MERGE_YREG_U32_U96_ZX_VLMAX(a_iYRegDst, a_iYRegSrc32, a_iYRegSrcHx) \ 11557 do { PX86XSAVEAREA pXStateTmp = pVCpu->cpum.GstCtx.CTX_SUFF(pXState); \ 11558 uintptr_t const iYRegDstTmp = (a_iYRegDst); \ 11545 do { uintptr_t const iYRegDstTmp = (a_iYRegDst); \ 11559 11546 uintptr_t const iYRegSrc32Tmp = (a_iYRegSrc32); \ 11560 11547 uintptr_t const iYRegSrcHxTmp = (a_iYRegSrcHx); \ 11561 p XStateTmp->x87.aXMM[iYRegDstTmp].au32[0] = pXStateTmp->x87.aXMM[iYRegSrc32Tmp].au32[0]; \11562 p XStateTmp->x87.aXMM[iYRegDstTmp].au32[1] = pXStateTmp->x87.aXMM[iYRegSrcHxTmp].au32[1]; \11563 p XStateTmp->x87.aXMM[iYRegDstTmp].au64[1] = pXStateTmp->x87.aXMM[iYRegSrcHxTmp].au64[1]; \11564 p XStateTmp->u.YmmHi.aYmmHi[iYRegDstTmp].au64[0] = 0; \11565 p XStateTmp->u.YmmHi.aYmmHi[iYRegDstTmp].au64[1] = 0; \11566 IEM_MC_INT_CLEAR_ZMM_256_UP( pXStateTmp,iYRegDstTmp); \11548 pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegDstTmp].au32[0] = pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegSrc32Tmp].au32[0]; \ 11549 pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegDstTmp].au32[1] = pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegSrcHxTmp].au32[1]; \ 11550 pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegDstTmp].au64[1] = pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegSrcHxTmp].au64[1]; \ 11551 pVCpu->cpum.GstCtx.XState.u.YmmHi.aYmmHi[iYRegDstTmp].au64[0] = 0; \ 11552 pVCpu->cpum.GstCtx.XState.u.YmmHi.aYmmHi[iYRegDstTmp].au64[1] = 0; \ 11553 IEM_MC_INT_CLEAR_ZMM_256_UP(iYRegDstTmp); \ 11567 11554 } while (0) 11568 11555 #define IEM_MC_MERGE_YREG_U64_U64_ZX_VLMAX(a_iYRegDst, a_iYRegSrc64, a_iYRegSrcHx) \ 11569 do { PX86XSAVEAREA pXStateTmp = pVCpu->cpum.GstCtx.CTX_SUFF(pXState); \ 11570 uintptr_t const iYRegDstTmp = (a_iYRegDst); \ 11556 do { uintptr_t const iYRegDstTmp = (a_iYRegDst); \ 11571 11557 uintptr_t const iYRegSrc64Tmp = (a_iYRegSrc64); \ 11572 11558 uintptr_t const iYRegSrcHxTmp = (a_iYRegSrcHx); \ 11573 p XStateTmp->x87.aXMM[iYRegDstTmp].au64[0] = pXStateTmp->x87.aXMM[iYRegSrc64Tmp].au64[0]; \11574 p XStateTmp->x87.aXMM[iYRegDstTmp].au64[1] = pXStateTmp->x87.aXMM[iYRegSrcHxTmp].au64[1]; \11575 p XStateTmp->u.YmmHi.aYmmHi[iYRegDstTmp].au64[0] = 0; \11576 p XStateTmp->u.YmmHi.aYmmHi[iYRegDstTmp].au64[1] = 0; \11577 IEM_MC_INT_CLEAR_ZMM_256_UP( pXStateTmp,iYRegDstTmp); \11559 pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegDstTmp].au64[0] = pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegSrc64Tmp].au64[0]; \ 11560 pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegDstTmp].au64[1] = pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegSrcHxTmp].au64[1]; \ 11561 pVCpu->cpum.GstCtx.XState.u.YmmHi.aYmmHi[iYRegDstTmp].au64[0] = 0; \ 11562 pVCpu->cpum.GstCtx.XState.u.YmmHi.aYmmHi[iYRegDstTmp].au64[1] = 0; \ 11563 IEM_MC_INT_CLEAR_ZMM_256_UP(iYRegDstTmp); \ 11578 11564 } while (0) 11579 11565 #define IEM_MC_MERGE_YREG_U64HI_U64_ZX_VLMAX(a_iYRegDst, a_iYRegSrc64, a_iYRegSrcHx) /* for vmovhlps */ \ 11580 do { PX86XSAVEAREA pXStateTmp = pVCpu->cpum.GstCtx.CTX_SUFF(pXState); \ 11581 uintptr_t const iYRegDstTmp = (a_iYRegDst); \ 11566 do { uintptr_t const iYRegDstTmp = (a_iYRegDst); \ 11582 11567 uintptr_t const iYRegSrc64Tmp = (a_iYRegSrc64); \ 11583 11568 uintptr_t const iYRegSrcHxTmp = (a_iYRegSrcHx); \ 11584 p XStateTmp->x87.aXMM[iYRegDstTmp].au64[0] = pXStateTmp->x87.aXMM[iYRegSrc64Tmp].au64[1]; \11585 p XStateTmp->x87.aXMM[iYRegDstTmp].au64[1] = pXStateTmp->x87.aXMM[iYRegSrcHxTmp].au64[1]; \11586 p XStateTmp->u.YmmHi.aYmmHi[iYRegDstTmp].au64[0] = 0; \11587 p XStateTmp->u.YmmHi.aYmmHi[iYRegDstTmp].au64[1] = 0; \11588 IEM_MC_INT_CLEAR_ZMM_256_UP( pXStateTmp,iYRegDstTmp); \11569 pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegDstTmp].au64[0] = pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegSrc64Tmp].au64[1]; \ 11570 pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegDstTmp].au64[1] = pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegSrcHxTmp].au64[1]; \ 11571 pVCpu->cpum.GstCtx.XState.u.YmmHi.aYmmHi[iYRegDstTmp].au64[0] = 0; \ 11572 pVCpu->cpum.GstCtx.XState.u.YmmHi.aYmmHi[iYRegDstTmp].au64[1] = 0; \ 11573 IEM_MC_INT_CLEAR_ZMM_256_UP(iYRegDstTmp); \ 11589 11574 } while (0) 11590 11575 #define IEM_MC_MERGE_YREG_U64LOCAL_U64_ZX_VLMAX(a_iYRegDst, a_u64Local, a_iYRegSrcHx) \ 11591 do { PX86XSAVEAREA pXStateTmp = pVCpu->cpum.GstCtx.CTX_SUFF(pXState); \ 11592 uintptr_t const iYRegDstTmp = (a_iYRegDst); \ 11576 do { uintptr_t const iYRegDstTmp = (a_iYRegDst); \ 11593 11577 uintptr_t const iYRegSrcHxTmp = (a_iYRegSrcHx); \ 11594 p XStateTmp->x87.aXMM[iYRegDstTmp].au64[0] = (a_u64Local); \11595 p XStateTmp->x87.aXMM[iYRegDstTmp].au64[1] = pXStateTmp->x87.aXMM[iYRegSrcHxTmp].au64[1]; \11596 p XStateTmp->u.YmmHi.aYmmHi[iYRegDstTmp].au64[0] = 0; \11597 p XStateTmp->u.YmmHi.aYmmHi[iYRegDstTmp].au64[1] = 0; \11598 IEM_MC_INT_CLEAR_ZMM_256_UP( pXStateTmp,iYRegDstTmp); \11578 pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegDstTmp].au64[0] = (a_u64Local); \ 11579 pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegDstTmp].au64[1] = pVCpu->cpum.GstCtx.XState.x87.aXMM[iYRegSrcHxTmp].au64[1]; \ 11580 pVCpu->cpum.GstCtx.XState.u.YmmHi.aYmmHi[iYRegDstTmp].au64[0] = 0; \ 11581 pVCpu->cpum.GstCtx.XState.u.YmmHi.aYmmHi[iYRegDstTmp].au64[1] = 0; \ 11582 IEM_MC_INT_CLEAR_ZMM_256_UP(iYRegDstTmp); \ 11599 11583 } while (0) 11600 11584 … … 11944 11928 if ( !(a_u16FSW & X86_FSW_ES) \ 11945 11929 || !( (a_u16FSW & (X86_FSW_UE | X86_FSW_OE | X86_FSW_IE)) \ 11946 & ~(pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.FCW & X86_FCW_MASK_ALL) ) ) \11930 & ~(pVCpu->cpum.GstCtx.XState.x87.FCW & X86_FCW_MASK_ALL) ) ) \ 11947 11931 IEM_MC_RETURN_ON_FAILURE(iemMemCommitAndUnmap(pVCpu, (a_pvMem), (a_fAccess))); \ 11948 11932 } while (0) … … 12084 12068 #define IEM_MC_CALL_FPU_AIMPL_1(a_pfnAImpl, a0) \ 12085 12069 do { \ 12086 a_pfnAImpl(&pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87, (a0)); \12070 a_pfnAImpl(&pVCpu->cpum.GstCtx.XState.x87, (a0)); \ 12087 12071 } while (0) 12088 12072 … … 12096 12080 #define IEM_MC_CALL_FPU_AIMPL_2(a_pfnAImpl, a0, a1) \ 12097 12081 do { \ 12098 a_pfnAImpl(&pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87, (a0), (a1)); \12082 a_pfnAImpl(&pVCpu->cpum.GstCtx.XState.x87, (a0), (a1)); \ 12099 12083 } while (0) 12100 12084 … … 12109 12093 #define IEM_MC_CALL_FPU_AIMPL_3(a_pfnAImpl, a0, a1, a2) \ 12110 12094 do { \ 12111 a_pfnAImpl(&pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87, (a0), (a1), (a2)); \12095 a_pfnAImpl(&pVCpu->cpum.GstCtx.XState.x87, (a0), (a1), (a2)); \ 12112 12096 } while (0) 12113 12097 … … 12251 12235 do { \ 12252 12236 IEM_MC_PREPARE_FPU_USAGE(); \ 12253 a_pfnAImpl(&pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87, (a0), (a1)); \12237 a_pfnAImpl(&pVCpu->cpum.GstCtx.XState.x87, (a0), (a1)); \ 12254 12238 } while (0) 12255 12239 … … 12265 12249 do { \ 12266 12250 IEM_MC_PREPARE_FPU_USAGE(); \ 12267 a_pfnAImpl(&pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87, (a0), (a1), (a2)); \12251 a_pfnAImpl(&pVCpu->cpum.GstCtx.XState.x87, (a0), (a1), (a2)); \ 12268 12252 } while (0) 12269 12253 … … 12279 12263 do { \ 12280 12264 IEM_MC_PREPARE_SSE_USAGE(); \ 12281 a_pfnAImpl(&pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87, (a0), (a1)); \12265 a_pfnAImpl(&pVCpu->cpum.GstCtx.XState.x87, (a0), (a1)); \ 12282 12266 } while (0) 12283 12267 … … 12293 12277 do { \ 12294 12278 IEM_MC_PREPARE_SSE_USAGE(); \ 12295 a_pfnAImpl(&pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87, (a0), (a1), (a2)); \12279 a_pfnAImpl(&pVCpu->cpum.GstCtx.XState.x87, (a0), (a1), (a2)); \ 12296 12280 } while (0) 12297 12281 … … 12300 12284 * IEM_MC_CALL_AVX_AIMPL_3, IEM_MC_CALL_AVX_AIMPL_4, ... */ 12301 12285 #define IEM_MC_IMPLICIT_AVX_AIMPL_ARGS() \ 12302 IEM_MC_ARG_CONST(PX86XSAVEAREA, pXState, pVCpu->cpum.GstCtx.CTX_SUFF(pXState), 0)12286 IEM_MC_ARG_CONST(PX86XSAVEAREA, pXState, &pVCpu->cpum.GstCtx.XState, 0) 12303 12287 12304 12288 /** … … 12400 12384 if (iemFpu2StRegsNotEmptyRefFirst(pVCpu, (a_iSt0), &(a_pr80Dst0), (a_iSt1)) == VINF_SUCCESS) { 12401 12385 #define IEM_MC_IF_FCW_IM() \ 12402 if (pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.FCW & X86_FCW_IM) {12386 if (pVCpu->cpum.GstCtx.XState.x87.FCW & X86_FCW_IM) { 12403 12387 12404 12388 #define IEM_MC_ELSE() } else { … … 13794 13778 } 13795 13779 13796 PCX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;13780 PCX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx.XState.x87; 13797 13781 Log2(("**** %s\n" 13798 13782 " eax=%08x ebx=%08x ecx=%08x edx=%08x esi=%08x edi=%08x\n" -
trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h
r91251 r91281 8191 8191 */ 8192 8192 8193 PX86XSAVEAREA pXState = pVCpu->cpum.GstCtx.CTX_SUFF(pXState);8193 PX86XSAVEAREA pXState = &pVCpu->cpum.GstCtx.XState; 8194 8194 pXState->x87.FCW = 0x37f; 8195 8195 pXState->x87.FSW = 0; … … 8246 8246 return rcStrict; 8247 8247 PX86FXSTATE pDst = (PX86FXSTATE)pvMem512; 8248 PCX86FXSTATE pSrc = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;8248 PCX86FXSTATE pSrc = &pVCpu->cpum.GstCtx.XState.x87; 8249 8249 8250 8250 /* … … 8350 8350 return rcStrict; 8351 8351 PCX86FXSTATE pSrc = (PCX86FXSTATE)pvMem512; 8352 PX86FXSTATE pDst = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;8352 PX86FXSTATE pDst = &pVCpu->cpum.GstCtx.XState.x87; 8353 8353 8354 8354 /* … … 8484 8484 return rcStrict; 8485 8485 PX86FXSTATE pDst = (PX86FXSTATE)pvMem512; 8486 PCX86FXSTATE pSrc = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;8486 PCX86FXSTATE pSrc = &pVCpu->cpum.GstCtx.XState.x87; 8487 8487 8488 8488 /* The header. */ … … 8640 8640 return rcStrict; 8641 8641 PCX86FXSTATE pSrc = (PCX86FXSTATE)pvMem512; 8642 PX86FXSTATE pDst = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;8642 PX86FXSTATE pDst = &pVCpu->cpum.GstCtx.XState.x87; 8643 8643 8644 8644 /* 8645 8645 * Calc the requested mask 8646 8646 */ 8647 PX86XSAVEHDR pHdrDst = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->Hdr;8647 PX86XSAVEHDR pHdrDst = &pVCpu->cpum.GstCtx.XState.Hdr; 8648 8648 PCX86XSAVEHDR pHdrSrc; 8649 8649 rcStrict = iemMemMap(pVCpu, (void **)&pHdrSrc, sizeof(&pHdrSrc), iEffSeg, GCPtrEff + 512, IEM_ACCESS_DATA_R); … … 8823 8823 * Do the job. 8824 8824 */ 8825 VBOXSTRICTRC rcStrict = iemMemStoreDataU32(pVCpu, iEffSeg, GCPtrEff, pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.MXCSR);8825 VBOXSTRICTRC rcStrict = iemMemStoreDataU32(pVCpu, iEffSeg, GCPtrEff, pVCpu->cpum.GstCtx.XState.x87.MXCSR); 8826 8826 if (rcStrict == VINF_SUCCESS) 8827 8827 { … … 8859 8859 * Do the job. 8860 8860 */ 8861 VBOXSTRICTRC rcStrict = iemMemStoreDataU32(pVCpu, iEffSeg, GCPtrEff, pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.MXCSR);8861 VBOXSTRICTRC rcStrict = iemMemStoreDataU32(pVCpu, iEffSeg, GCPtrEff, pVCpu->cpum.GstCtx.XState.x87.MXCSR); 8862 8862 if (rcStrict == VINF_SUCCESS) 8863 8863 { … … 8902 8902 if (!(fNewMxCsr & ~fMxCsrMask)) 8903 8903 { 8904 pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87.MXCSR = fNewMxCsr;8904 pVCpu->cpum.GstCtx.XState.x87.MXCSR = fNewMxCsr; 8905 8905 iemRegAddToRipAndClearRF(pVCpu, cbInstr); 8906 8906 return VINF_SUCCESS; … … 8928 8928 { 8929 8929 IEM_CTX_ASSERT(pVCpu, CPUMCTX_EXTRN_CR0 | CPUMCTX_EXTRN_X87); 8930 PCX86FXSTATE pSrcX87 = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;8930 PCX86FXSTATE pSrcX87 = &pVCpu->cpum.GstCtx.XState.x87; 8931 8931 if (enmEffOpSize == IEMMODE_16BIT) 8932 8932 { … … 8993 8993 { 8994 8994 IEM_CTX_ASSERT(pVCpu, CPUMCTX_EXTRN_CR0 | CPUMCTX_EXTRN_X87); 8995 PX86FXSTATE pDstX87 = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;8995 PX86FXSTATE pDstX87 = &pVCpu->cpum.GstCtx.XState.x87; 8996 8996 if (enmEffOpSize == IEMMODE_16BIT) 8997 8997 { … … 9099 9099 return rcStrict; 9100 9100 9101 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;9101 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx.XState.x87; 9102 9102 iemCImplCommonFpuStoreEnv(pVCpu, enmEffOpSize, uPtr); 9103 9103 PRTFLOAT80U paRegs = (PRTFLOAT80U)(uPtr.pu8 + (enmEffOpSize == IEMMODE_16BIT ? 14 : 28)); … … 9175 9175 return rcStrict; 9176 9176 9177 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;9177 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx.XState.x87; 9178 9178 iemCImplCommonFpuRestoreEnv(pVCpu, enmEffOpSize, uPtr); 9179 9179 PCRTFLOAT80U paRegs = (PCRTFLOAT80U)(uPtr.pu8 + (enmEffOpSize == IEMMODE_16BIT ? 14 : 28)); … … 9210 9210 /** @todo Testcase: Test that it raises and loweres the FPU exception bits 9211 9211 * according to FSW. (This is was is currently implemented.) */ 9212 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;9212 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx.XState.x87; 9213 9213 pFpuCtx->FCW = u16Fcw & ~X86_FCW_ZERO_MASK; 9214 9214 iemFpuRecalcExceptionStatus(pFpuCtx); … … 9231 9231 IEM_CTX_ASSERT(pVCpu, CPUMCTX_EXTRN_CR0 | CPUMCTX_EXTRN_X87); 9232 9232 9233 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;9233 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx.XState.x87; 9234 9234 unsigned const iReg1 = X86_FSW_TOP_GET(pFpuCtx->FSW); 9235 9235 unsigned const iReg2 = (iReg1 + iStReg) & X86_FSW_TOP_SMASK; … … 9287 9287 return iemRaiseDeviceNotAvailable(pVCpu); 9288 9288 9289 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx. CTX_SUFF(pXState)->x87;9289 PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx.XState.x87; 9290 9290 uint16_t u16Fsw = pFpuCtx->FSW; 9291 9291 if (u16Fsw & X86_FSW_ES) -
trunk/src/VBox/VMM/VMMAll/NEMAllNativeTemplate-win.cpp.h
r88745 r91281 303 303 if (fWhat & CPUMCTX_EXTRN_X87) 304 304 { 305 ADD_REG128(WHvX64RegisterFpMmx0, pVCpu->cpum.GstCtx. pXStateR3->x87.aRegs[0].au64[0], pVCpu->cpum.GstCtx.pXStateR3->x87.aRegs[0].au64[1]);306 ADD_REG128(WHvX64RegisterFpMmx1, pVCpu->cpum.GstCtx. pXStateR3->x87.aRegs[1].au64[0], pVCpu->cpum.GstCtx.pXStateR3->x87.aRegs[1].au64[1]);307 ADD_REG128(WHvX64RegisterFpMmx2, pVCpu->cpum.GstCtx. pXStateR3->x87.aRegs[2].au64[0], pVCpu->cpum.GstCtx.pXStateR3->x87.aRegs[2].au64[1]);308 ADD_REG128(WHvX64RegisterFpMmx3, pVCpu->cpum.GstCtx. pXStateR3->x87.aRegs[3].au64[0], pVCpu->cpum.GstCtx.pXStateR3->x87.aRegs[3].au64[1]);309 ADD_REG128(WHvX64RegisterFpMmx4, pVCpu->cpum.GstCtx. pXStateR3->x87.aRegs[4].au64[0], pVCpu->cpum.GstCtx.pXStateR3->x87.aRegs[4].au64[1]);310 ADD_REG128(WHvX64RegisterFpMmx5, pVCpu->cpum.GstCtx. pXStateR3->x87.aRegs[5].au64[0], pVCpu->cpum.GstCtx.pXStateR3->x87.aRegs[5].au64[1]);311 ADD_REG128(WHvX64RegisterFpMmx6, pVCpu->cpum.GstCtx. pXStateR3->x87.aRegs[6].au64[0], pVCpu->cpum.GstCtx.pXStateR3->x87.aRegs[6].au64[1]);312 ADD_REG128(WHvX64RegisterFpMmx7, pVCpu->cpum.GstCtx. pXStateR3->x87.aRegs[7].au64[0], pVCpu->cpum.GstCtx.pXStateR3->x87.aRegs[7].au64[1]);305 ADD_REG128(WHvX64RegisterFpMmx0, pVCpu->cpum.GstCtx.XState.x87.aRegs[0].au64[0], pVCpu->cpum.GstCtx.XState.x87.aRegs[0].au64[1]); 306 ADD_REG128(WHvX64RegisterFpMmx1, pVCpu->cpum.GstCtx.XState.x87.aRegs[1].au64[0], pVCpu->cpum.GstCtx.XState.x87.aRegs[1].au64[1]); 307 ADD_REG128(WHvX64RegisterFpMmx2, pVCpu->cpum.GstCtx.XState.x87.aRegs[2].au64[0], pVCpu->cpum.GstCtx.XState.x87.aRegs[2].au64[1]); 308 ADD_REG128(WHvX64RegisterFpMmx3, pVCpu->cpum.GstCtx.XState.x87.aRegs[3].au64[0], pVCpu->cpum.GstCtx.XState.x87.aRegs[3].au64[1]); 309 ADD_REG128(WHvX64RegisterFpMmx4, pVCpu->cpum.GstCtx.XState.x87.aRegs[4].au64[0], pVCpu->cpum.GstCtx.XState.x87.aRegs[4].au64[1]); 310 ADD_REG128(WHvX64RegisterFpMmx5, pVCpu->cpum.GstCtx.XState.x87.aRegs[5].au64[0], pVCpu->cpum.GstCtx.XState.x87.aRegs[5].au64[1]); 311 ADD_REG128(WHvX64RegisterFpMmx6, pVCpu->cpum.GstCtx.XState.x87.aRegs[6].au64[0], pVCpu->cpum.GstCtx.XState.x87.aRegs[6].au64[1]); 312 ADD_REG128(WHvX64RegisterFpMmx7, pVCpu->cpum.GstCtx.XState.x87.aRegs[7].au64[0], pVCpu->cpum.GstCtx.XState.x87.aRegs[7].au64[1]); 313 313 314 314 aenmNames[iReg] = WHvX64RegisterFpControlStatus; 315 aValues[iReg].FpControlStatus.FpControl = pVCpu->cpum.GstCtx. pXStateR3->x87.FCW;316 aValues[iReg].FpControlStatus.FpStatus = pVCpu->cpum.GstCtx. pXStateR3->x87.FSW;317 aValues[iReg].FpControlStatus.FpTag = pVCpu->cpum.GstCtx. pXStateR3->x87.FTW;318 aValues[iReg].FpControlStatus.Reserved = pVCpu->cpum.GstCtx. pXStateR3->x87.FTW >> 8;319 aValues[iReg].FpControlStatus.LastFpOp = pVCpu->cpum.GstCtx. pXStateR3->x87.FOP;320 aValues[iReg].FpControlStatus.LastFpRip = (pVCpu->cpum.GstCtx. pXStateR3->x87.FPUIP)321 | ((uint64_t)pVCpu->cpum.GstCtx. pXStateR3->x87.CS << 32)322 | ((uint64_t)pVCpu->cpum.GstCtx. pXStateR3->x87.Rsrvd1 << 48);315 aValues[iReg].FpControlStatus.FpControl = pVCpu->cpum.GstCtx.XState.x87.FCW; 316 aValues[iReg].FpControlStatus.FpStatus = pVCpu->cpum.GstCtx.XState.x87.FSW; 317 aValues[iReg].FpControlStatus.FpTag = pVCpu->cpum.GstCtx.XState.x87.FTW; 318 aValues[iReg].FpControlStatus.Reserved = pVCpu->cpum.GstCtx.XState.x87.FTW >> 8; 319 aValues[iReg].FpControlStatus.LastFpOp = pVCpu->cpum.GstCtx.XState.x87.FOP; 320 aValues[iReg].FpControlStatus.LastFpRip = (pVCpu->cpum.GstCtx.XState.x87.FPUIP) 321 | ((uint64_t)pVCpu->cpum.GstCtx.XState.x87.CS << 32) 322 | ((uint64_t)pVCpu->cpum.GstCtx.XState.x87.Rsrvd1 << 48); 323 323 iReg++; 324 324 325 325 aenmNames[iReg] = WHvX64RegisterXmmControlStatus; 326 aValues[iReg].XmmControlStatus.LastFpRdp = (pVCpu->cpum.GstCtx. pXStateR3->x87.FPUDP)327 | ((uint64_t)pVCpu->cpum.GstCtx. pXStateR3->x87.DS << 32)328 | ((uint64_t)pVCpu->cpum.GstCtx. pXStateR3->x87.Rsrvd2 << 48);329 aValues[iReg].XmmControlStatus.XmmStatusControl = pVCpu->cpum.GstCtx. pXStateR3->x87.MXCSR;330 aValues[iReg].XmmControlStatus.XmmStatusControlMask = pVCpu->cpum.GstCtx. pXStateR3->x87.MXCSR_MASK; /** @todo ??? (Isn't this an output field?) */326 aValues[iReg].XmmControlStatus.LastFpRdp = (pVCpu->cpum.GstCtx.XState.x87.FPUDP) 327 | ((uint64_t)pVCpu->cpum.GstCtx.XState.x87.DS << 32) 328 | ((uint64_t)pVCpu->cpum.GstCtx.XState.x87.Rsrvd2 << 48); 329 aValues[iReg].XmmControlStatus.XmmStatusControl = pVCpu->cpum.GstCtx.XState.x87.MXCSR; 330 aValues[iReg].XmmControlStatus.XmmStatusControlMask = pVCpu->cpum.GstCtx.XState.x87.MXCSR_MASK; /** @todo ??? (Isn't this an output field?) */ 331 331 iReg++; 332 332 } … … 335 335 if (fWhat & CPUMCTX_EXTRN_SSE_AVX) 336 336 { 337 ADD_REG128(WHvX64RegisterXmm0, pVCpu->cpum.GstCtx. pXStateR3->x87.aXMM[ 0].uXmm.s.Lo, pVCpu->cpum.GstCtx.pXStateR3->x87.aXMM[ 0].uXmm.s.Hi);338 ADD_REG128(WHvX64RegisterXmm1, pVCpu->cpum.GstCtx. pXStateR3->x87.aXMM[ 1].uXmm.s.Lo, pVCpu->cpum.GstCtx.pXStateR3->x87.aXMM[ 1].uXmm.s.Hi);339 ADD_REG128(WHvX64RegisterXmm2, pVCpu->cpum.GstCtx. pXStateR3->x87.aXMM[ 2].uXmm.s.Lo, pVCpu->cpum.GstCtx.pXStateR3->x87.aXMM[ 2].uXmm.s.Hi);340 ADD_REG128(WHvX64RegisterXmm3, pVCpu->cpum.GstCtx. pXStateR3->x87.aXMM[ 3].uXmm.s.Lo, pVCpu->cpum.GstCtx.pXStateR3->x87.aXMM[ 3].uXmm.s.Hi);341 ADD_REG128(WHvX64RegisterXmm4, pVCpu->cpum.GstCtx. pXStateR3->x87.aXMM[ 4].uXmm.s.Lo, pVCpu->cpum.GstCtx.pXStateR3->x87.aXMM[ 4].uXmm.s.Hi);342 ADD_REG128(WHvX64RegisterXmm5, pVCpu->cpum.GstCtx. pXStateR3->x87.aXMM[ 5].uXmm.s.Lo, pVCpu->cpum.GstCtx.pXStateR3->x87.aXMM[ 5].uXmm.s.Hi);343 ADD_REG128(WHvX64RegisterXmm6, pVCpu->cpum.GstCtx. pXStateR3->x87.aXMM[ 6].uXmm.s.Lo, pVCpu->cpum.GstCtx.pXStateR3->x87.aXMM[ 6].uXmm.s.Hi);344 ADD_REG128(WHvX64RegisterXmm7, pVCpu->cpum.GstCtx. pXStateR3->x87.aXMM[ 7].uXmm.s.Lo, pVCpu->cpum.GstCtx.pXStateR3->x87.aXMM[ 7].uXmm.s.Hi);345 ADD_REG128(WHvX64RegisterXmm8, pVCpu->cpum.GstCtx. pXStateR3->x87.aXMM[ 8].uXmm.s.Lo, pVCpu->cpum.GstCtx.pXStateR3->x87.aXMM[ 8].uXmm.s.Hi);346 ADD_REG128(WHvX64RegisterXmm9, pVCpu->cpum.GstCtx. pXStateR3->x87.aXMM[ 9].uXmm.s.Lo, pVCpu->cpum.GstCtx.pXStateR3->x87.aXMM[ 9].uXmm.s.Hi);347 ADD_REG128(WHvX64RegisterXmm10, pVCpu->cpum.GstCtx. pXStateR3->x87.aXMM[10].uXmm.s.Lo, pVCpu->cpum.GstCtx.pXStateR3->x87.aXMM[10].uXmm.s.Hi);348 ADD_REG128(WHvX64RegisterXmm11, pVCpu->cpum.GstCtx. pXStateR3->x87.aXMM[11].uXmm.s.Lo, pVCpu->cpum.GstCtx.pXStateR3->x87.aXMM[11].uXmm.s.Hi);349 ADD_REG128(WHvX64RegisterXmm12, pVCpu->cpum.GstCtx. pXStateR3->x87.aXMM[12].uXmm.s.Lo, pVCpu->cpum.GstCtx.pXStateR3->x87.aXMM[12].uXmm.s.Hi);350 ADD_REG128(WHvX64RegisterXmm13, pVCpu->cpum.GstCtx. pXStateR3->x87.aXMM[13].uXmm.s.Lo, pVCpu->cpum.GstCtx.pXStateR3->x87.aXMM[13].uXmm.s.Hi);351 ADD_REG128(WHvX64RegisterXmm14, pVCpu->cpum.GstCtx. pXStateR3->x87.aXMM[14].uXmm.s.Lo, pVCpu->cpum.GstCtx.pXStateR3->x87.aXMM[14].uXmm.s.Hi);352 ADD_REG128(WHvX64RegisterXmm15, pVCpu->cpum.GstCtx. pXStateR3->x87.aXMM[15].uXmm.s.Lo, pVCpu->cpum.GstCtx.pXStateR3->x87.aXMM[15].uXmm.s.Hi);337 ADD_REG128(WHvX64RegisterXmm0, pVCpu->cpum.GstCtx.XState.x87.aXMM[ 0].uXmm.s.Lo, pVCpu->cpum.GstCtx.XState.x87.aXMM[ 0].uXmm.s.Hi); 338 ADD_REG128(WHvX64RegisterXmm1, pVCpu->cpum.GstCtx.XState.x87.aXMM[ 1].uXmm.s.Lo, pVCpu->cpum.GstCtx.XState.x87.aXMM[ 1].uXmm.s.Hi); 339 ADD_REG128(WHvX64RegisterXmm2, pVCpu->cpum.GstCtx.XState.x87.aXMM[ 2].uXmm.s.Lo, pVCpu->cpum.GstCtx.XState.x87.aXMM[ 2].uXmm.s.Hi); 340 ADD_REG128(WHvX64RegisterXmm3, pVCpu->cpum.GstCtx.XState.x87.aXMM[ 3].uXmm.s.Lo, pVCpu->cpum.GstCtx.XState.x87.aXMM[ 3].uXmm.s.Hi); 341 ADD_REG128(WHvX64RegisterXmm4, pVCpu->cpum.GstCtx.XState.x87.aXMM[ 4].uXmm.s.Lo, pVCpu->cpum.GstCtx.XState.x87.aXMM[ 4].uXmm.s.Hi); 342 ADD_REG128(WHvX64RegisterXmm5, pVCpu->cpum.GstCtx.XState.x87.aXMM[ 5].uXmm.s.Lo, pVCpu->cpum.GstCtx.XState.x87.aXMM[ 5].uXmm.s.Hi); 343 ADD_REG128(WHvX64RegisterXmm6, pVCpu->cpum.GstCtx.XState.x87.aXMM[ 6].uXmm.s.Lo, pVCpu->cpum.GstCtx.XState.x87.aXMM[ 6].uXmm.s.Hi); 344 ADD_REG128(WHvX64RegisterXmm7, pVCpu->cpum.GstCtx.XState.x87.aXMM[ 7].uXmm.s.Lo, pVCpu->cpum.GstCtx.XState.x87.aXMM[ 7].uXmm.s.Hi); 345 ADD_REG128(WHvX64RegisterXmm8, pVCpu->cpum.GstCtx.XState.x87.aXMM[ 8].uXmm.s.Lo, pVCpu->cpum.GstCtx.XState.x87.aXMM[ 8].uXmm.s.Hi); 346 ADD_REG128(WHvX64RegisterXmm9, pVCpu->cpum.GstCtx.XState.x87.aXMM[ 9].uXmm.s.Lo, pVCpu->cpum.GstCtx.XState.x87.aXMM[ 9].uXmm.s.Hi); 347 ADD_REG128(WHvX64RegisterXmm10, pVCpu->cpum.GstCtx.XState.x87.aXMM[10].uXmm.s.Lo, pVCpu->cpum.GstCtx.XState.x87.aXMM[10].uXmm.s.Hi); 348 ADD_REG128(WHvX64RegisterXmm11, pVCpu->cpum.GstCtx.XState.x87.aXMM[11].uXmm.s.Lo, pVCpu->cpum.GstCtx.XState.x87.aXMM[11].uXmm.s.Hi); 349 ADD_REG128(WHvX64RegisterXmm12, pVCpu->cpum.GstCtx.XState.x87.aXMM[12].uXmm.s.Lo, pVCpu->cpum.GstCtx.XState.x87.aXMM[12].uXmm.s.Hi); 350 ADD_REG128(WHvX64RegisterXmm13, pVCpu->cpum.GstCtx.XState.x87.aXMM[13].uXmm.s.Lo, pVCpu->cpum.GstCtx.XState.x87.aXMM[13].uXmm.s.Hi); 351 ADD_REG128(WHvX64RegisterXmm14, pVCpu->cpum.GstCtx.XState.x87.aXMM[14].uXmm.s.Lo, pVCpu->cpum.GstCtx.XState.x87.aXMM[14].uXmm.s.Hi); 352 ADD_REG128(WHvX64RegisterXmm15, pVCpu->cpum.GstCtx.XState.x87.aXMM[15].uXmm.s.Lo, pVCpu->cpum.GstCtx.XState.x87.aXMM[15].uXmm.s.Hi); 353 353 } 354 354 … … 922 922 if (fWhat & CPUMCTX_EXTRN_X87) 923 923 { 924 GET_REG128(pVCpu->cpum.GstCtx. pXStateR3->x87.aRegs[0].au64[0], pVCpu->cpum.GstCtx.pXStateR3->x87.aRegs[0].au64[1], WHvX64RegisterFpMmx0);925 GET_REG128(pVCpu->cpum.GstCtx. pXStateR3->x87.aRegs[1].au64[0], pVCpu->cpum.GstCtx.pXStateR3->x87.aRegs[1].au64[1], WHvX64RegisterFpMmx1);926 GET_REG128(pVCpu->cpum.GstCtx. pXStateR3->x87.aRegs[2].au64[0], pVCpu->cpum.GstCtx.pXStateR3->x87.aRegs[2].au64[1], WHvX64RegisterFpMmx2);927 GET_REG128(pVCpu->cpum.GstCtx. pXStateR3->x87.aRegs[3].au64[0], pVCpu->cpum.GstCtx.pXStateR3->x87.aRegs[3].au64[1], WHvX64RegisterFpMmx3);928 GET_REG128(pVCpu->cpum.GstCtx. pXStateR3->x87.aRegs[4].au64[0], pVCpu->cpum.GstCtx.pXStateR3->x87.aRegs[4].au64[1], WHvX64RegisterFpMmx4);929 GET_REG128(pVCpu->cpum.GstCtx. pXStateR3->x87.aRegs[5].au64[0], pVCpu->cpum.GstCtx.pXStateR3->x87.aRegs[5].au64[1], WHvX64RegisterFpMmx5);930 GET_REG128(pVCpu->cpum.GstCtx. pXStateR3->x87.aRegs[6].au64[0], pVCpu->cpum.GstCtx.pXStateR3->x87.aRegs[6].au64[1], WHvX64RegisterFpMmx6);931 GET_REG128(pVCpu->cpum.GstCtx. pXStateR3->x87.aRegs[7].au64[0], pVCpu->cpum.GstCtx.pXStateR3->x87.aRegs[7].au64[1], WHvX64RegisterFpMmx7);924 GET_REG128(pVCpu->cpum.GstCtx.XState.x87.aRegs[0].au64[0], pVCpu->cpum.GstCtx.XState.x87.aRegs[0].au64[1], WHvX64RegisterFpMmx0); 925 GET_REG128(pVCpu->cpum.GstCtx.XState.x87.aRegs[1].au64[0], pVCpu->cpum.GstCtx.XState.x87.aRegs[1].au64[1], WHvX64RegisterFpMmx1); 926 GET_REG128(pVCpu->cpum.GstCtx.XState.x87.aRegs[2].au64[0], pVCpu->cpum.GstCtx.XState.x87.aRegs[2].au64[1], WHvX64RegisterFpMmx2); 927 GET_REG128(pVCpu->cpum.GstCtx.XState.x87.aRegs[3].au64[0], pVCpu->cpum.GstCtx.XState.x87.aRegs[3].au64[1], WHvX64RegisterFpMmx3); 928 GET_REG128(pVCpu->cpum.GstCtx.XState.x87.aRegs[4].au64[0], pVCpu->cpum.GstCtx.XState.x87.aRegs[4].au64[1], WHvX64RegisterFpMmx4); 929 GET_REG128(pVCpu->cpum.GstCtx.XState.x87.aRegs[5].au64[0], pVCpu->cpum.GstCtx.XState.x87.aRegs[5].au64[1], WHvX64RegisterFpMmx5); 930 GET_REG128(pVCpu->cpum.GstCtx.XState.x87.aRegs[6].au64[0], pVCpu->cpum.GstCtx.XState.x87.aRegs[6].au64[1], WHvX64RegisterFpMmx6); 931 GET_REG128(pVCpu->cpum.GstCtx.XState.x87.aRegs[7].au64[0], pVCpu->cpum.GstCtx.XState.x87.aRegs[7].au64[1], WHvX64RegisterFpMmx7); 932 932 933 933 Assert(aenmNames[iReg] == WHvX64RegisterFpControlStatus); 934 pVCpu->cpum.GstCtx. pXStateR3->x87.FCW = aValues[iReg].FpControlStatus.FpControl;935 pVCpu->cpum.GstCtx. pXStateR3->x87.FSW = aValues[iReg].FpControlStatus.FpStatus;936 pVCpu->cpum.GstCtx. pXStateR3->x87.FTW = aValues[iReg].FpControlStatus.FpTag934 pVCpu->cpum.GstCtx.XState.x87.FCW = aValues[iReg].FpControlStatus.FpControl; 935 pVCpu->cpum.GstCtx.XState.x87.FSW = aValues[iReg].FpControlStatus.FpStatus; 936 pVCpu->cpum.GstCtx.XState.x87.FTW = aValues[iReg].FpControlStatus.FpTag 937 937 /*| (aValues[iReg].FpControlStatus.Reserved << 8)*/; 938 pVCpu->cpum.GstCtx. pXStateR3->x87.FOP = aValues[iReg].FpControlStatus.LastFpOp;939 pVCpu->cpum.GstCtx. pXStateR3->x87.FPUIP = (uint32_t)aValues[iReg].FpControlStatus.LastFpRip;940 pVCpu->cpum.GstCtx. pXStateR3->x87.CS = (uint16_t)(aValues[iReg].FpControlStatus.LastFpRip >> 32);941 pVCpu->cpum.GstCtx. pXStateR3->x87.Rsrvd1 = (uint16_t)(aValues[iReg].FpControlStatus.LastFpRip >> 48);938 pVCpu->cpum.GstCtx.XState.x87.FOP = aValues[iReg].FpControlStatus.LastFpOp; 939 pVCpu->cpum.GstCtx.XState.x87.FPUIP = (uint32_t)aValues[iReg].FpControlStatus.LastFpRip; 940 pVCpu->cpum.GstCtx.XState.x87.CS = (uint16_t)(aValues[iReg].FpControlStatus.LastFpRip >> 32); 941 pVCpu->cpum.GstCtx.XState.x87.Rsrvd1 = (uint16_t)(aValues[iReg].FpControlStatus.LastFpRip >> 48); 942 942 iReg++; 943 943 } … … 948 948 if (fWhat & CPUMCTX_EXTRN_X87) 949 949 { 950 pVCpu->cpum.GstCtx. pXStateR3->x87.FPUDP = (uint32_t)aValues[iReg].XmmControlStatus.LastFpRdp;951 pVCpu->cpum.GstCtx. pXStateR3->x87.DS = (uint16_t)(aValues[iReg].XmmControlStatus.LastFpRdp >> 32);952 pVCpu->cpum.GstCtx. pXStateR3->x87.Rsrvd2 = (uint16_t)(aValues[iReg].XmmControlStatus.LastFpRdp >> 48);953 } 954 pVCpu->cpum.GstCtx. pXStateR3->x87.MXCSR = aValues[iReg].XmmControlStatus.XmmStatusControl;955 pVCpu->cpum.GstCtx. pXStateR3->x87.MXCSR_MASK = aValues[iReg].XmmControlStatus.XmmStatusControlMask; /** @todo ??? (Isn't this an output field?) */950 pVCpu->cpum.GstCtx.XState.x87.FPUDP = (uint32_t)aValues[iReg].XmmControlStatus.LastFpRdp; 951 pVCpu->cpum.GstCtx.XState.x87.DS = (uint16_t)(aValues[iReg].XmmControlStatus.LastFpRdp >> 32); 952 pVCpu->cpum.GstCtx.XState.x87.Rsrvd2 = (uint16_t)(aValues[iReg].XmmControlStatus.LastFpRdp >> 48); 953 } 954 pVCpu->cpum.GstCtx.XState.x87.MXCSR = aValues[iReg].XmmControlStatus.XmmStatusControl; 955 pVCpu->cpum.GstCtx.XState.x87.MXCSR_MASK = aValues[iReg].XmmControlStatus.XmmStatusControlMask; /** @todo ??? (Isn't this an output field?) */ 956 956 iReg++; 957 957 } … … 960 960 if (fWhat & CPUMCTX_EXTRN_SSE_AVX) 961 961 { 962 GET_REG128(pVCpu->cpum.GstCtx. pXStateR3->x87.aXMM[ 0].uXmm.s.Lo, pVCpu->cpum.GstCtx.pXStateR3->x87.aXMM[ 0].uXmm.s.Hi, WHvX64RegisterXmm0);963 GET_REG128(pVCpu->cpum.GstCtx. pXStateR3->x87.aXMM[ 1].uXmm.s.Lo, pVCpu->cpum.GstCtx.pXStateR3->x87.aXMM[ 1].uXmm.s.Hi, WHvX64RegisterXmm1);964 GET_REG128(pVCpu->cpum.GstCtx. pXStateR3->x87.aXMM[ 2].uXmm.s.Lo, pVCpu->cpum.GstCtx.pXStateR3->x87.aXMM[ 2].uXmm.s.Hi, WHvX64RegisterXmm2);965 GET_REG128(pVCpu->cpum.GstCtx. pXStateR3->x87.aXMM[ 3].uXmm.s.Lo, pVCpu->cpum.GstCtx.pXStateR3->x87.aXMM[ 3].uXmm.s.Hi, WHvX64RegisterXmm3);966 GET_REG128(pVCpu->cpum.GstCtx. pXStateR3->x87.aXMM[ 4].uXmm.s.Lo, pVCpu->cpum.GstCtx.pXStateR3->x87.aXMM[ 4].uXmm.s.Hi, WHvX64RegisterXmm4);967 GET_REG128(pVCpu->cpum.GstCtx. pXStateR3->x87.aXMM[ 5].uXmm.s.Lo, pVCpu->cpum.GstCtx.pXStateR3->x87.aXMM[ 5].uXmm.s.Hi, WHvX64RegisterXmm5);968 GET_REG128(pVCpu->cpum.GstCtx. pXStateR3->x87.aXMM[ 6].uXmm.s.Lo, pVCpu->cpum.GstCtx.pXStateR3->x87.aXMM[ 6].uXmm.s.Hi, WHvX64RegisterXmm6);969 GET_REG128(pVCpu->cpum.GstCtx. pXStateR3->x87.aXMM[ 7].uXmm.s.Lo, pVCpu->cpum.GstCtx.pXStateR3->x87.aXMM[ 7].uXmm.s.Hi, WHvX64RegisterXmm7);970 GET_REG128(pVCpu->cpum.GstCtx. pXStateR3->x87.aXMM[ 8].uXmm.s.Lo, pVCpu->cpum.GstCtx.pXStateR3->x87.aXMM[ 8].uXmm.s.Hi, WHvX64RegisterXmm8);971 GET_REG128(pVCpu->cpum.GstCtx. pXStateR3->x87.aXMM[ 9].uXmm.s.Lo, pVCpu->cpum.GstCtx.pXStateR3->x87.aXMM[ 9].uXmm.s.Hi, WHvX64RegisterXmm9);972 GET_REG128(pVCpu->cpum.GstCtx. pXStateR3->x87.aXMM[10].uXmm.s.Lo, pVCpu->cpum.GstCtx.pXStateR3->x87.aXMM[10].uXmm.s.Hi, WHvX64RegisterXmm10);973 GET_REG128(pVCpu->cpum.GstCtx. pXStateR3->x87.aXMM[11].uXmm.s.Lo, pVCpu->cpum.GstCtx.pXStateR3->x87.aXMM[11].uXmm.s.Hi, WHvX64RegisterXmm11);974 GET_REG128(pVCpu->cpum.GstCtx. pXStateR3->x87.aXMM[12].uXmm.s.Lo, pVCpu->cpum.GstCtx.pXStateR3->x87.aXMM[12].uXmm.s.Hi, WHvX64RegisterXmm12);975 GET_REG128(pVCpu->cpum.GstCtx. pXStateR3->x87.aXMM[13].uXmm.s.Lo, pVCpu->cpum.GstCtx.pXStateR3->x87.aXMM[13].uXmm.s.Hi, WHvX64RegisterXmm13);976 GET_REG128(pVCpu->cpum.GstCtx. pXStateR3->x87.aXMM[14].uXmm.s.Lo, pVCpu->cpum.GstCtx.pXStateR3->x87.aXMM[14].uXmm.s.Hi, WHvX64RegisterXmm14);977 GET_REG128(pVCpu->cpum.GstCtx. pXStateR3->x87.aXMM[15].uXmm.s.Lo, pVCpu->cpum.GstCtx.pXStateR3->x87.aXMM[15].uXmm.s.Hi, WHvX64RegisterXmm15);962 GET_REG128(pVCpu->cpum.GstCtx.XState.x87.aXMM[ 0].uXmm.s.Lo, pVCpu->cpum.GstCtx.XState.x87.aXMM[ 0].uXmm.s.Hi, WHvX64RegisterXmm0); 963 GET_REG128(pVCpu->cpum.GstCtx.XState.x87.aXMM[ 1].uXmm.s.Lo, pVCpu->cpum.GstCtx.XState.x87.aXMM[ 1].uXmm.s.Hi, WHvX64RegisterXmm1); 964 GET_REG128(pVCpu->cpum.GstCtx.XState.x87.aXMM[ 2].uXmm.s.Lo, pVCpu->cpum.GstCtx.XState.x87.aXMM[ 2].uXmm.s.Hi, WHvX64RegisterXmm2); 965 GET_REG128(pVCpu->cpum.GstCtx.XState.x87.aXMM[ 3].uXmm.s.Lo, pVCpu->cpum.GstCtx.XState.x87.aXMM[ 3].uXmm.s.Hi, WHvX64RegisterXmm3); 966 GET_REG128(pVCpu->cpum.GstCtx.XState.x87.aXMM[ 4].uXmm.s.Lo, pVCpu->cpum.GstCtx.XState.x87.aXMM[ 4].uXmm.s.Hi, WHvX64RegisterXmm4); 967 GET_REG128(pVCpu->cpum.GstCtx.XState.x87.aXMM[ 5].uXmm.s.Lo, pVCpu->cpum.GstCtx.XState.x87.aXMM[ 5].uXmm.s.Hi, WHvX64RegisterXmm5); 968 GET_REG128(pVCpu->cpum.GstCtx.XState.x87.aXMM[ 6].uXmm.s.Lo, pVCpu->cpum.GstCtx.XState.x87.aXMM[ 6].uXmm.s.Hi, WHvX64RegisterXmm6); 969 GET_REG128(pVCpu->cpum.GstCtx.XState.x87.aXMM[ 7].uXmm.s.Lo, pVCpu->cpum.GstCtx.XState.x87.aXMM[ 7].uXmm.s.Hi, WHvX64RegisterXmm7); 970 GET_REG128(pVCpu->cpum.GstCtx.XState.x87.aXMM[ 8].uXmm.s.Lo, pVCpu->cpum.GstCtx.XState.x87.aXMM[ 8].uXmm.s.Hi, WHvX64RegisterXmm8); 971 GET_REG128(pVCpu->cpum.GstCtx.XState.x87.aXMM[ 9].uXmm.s.Lo, pVCpu->cpum.GstCtx.XState.x87.aXMM[ 9].uXmm.s.Hi, WHvX64RegisterXmm9); 972 GET_REG128(pVCpu->cpum.GstCtx.XState.x87.aXMM[10].uXmm.s.Lo, pVCpu->cpum.GstCtx.XState.x87.aXMM[10].uXmm.s.Hi, WHvX64RegisterXmm10); 973 GET_REG128(pVCpu->cpum.GstCtx.XState.x87.aXMM[11].uXmm.s.Lo, pVCpu->cpum.GstCtx.XState.x87.aXMM[11].uXmm.s.Hi, WHvX64RegisterXmm11); 974 GET_REG128(pVCpu->cpum.GstCtx.XState.x87.aXMM[12].uXmm.s.Lo, pVCpu->cpum.GstCtx.XState.x87.aXMM[12].uXmm.s.Hi, WHvX64RegisterXmm12); 975 GET_REG128(pVCpu->cpum.GstCtx.XState.x87.aXMM[13].uXmm.s.Lo, pVCpu->cpum.GstCtx.XState.x87.aXMM[13].uXmm.s.Hi, WHvX64RegisterXmm13); 976 GET_REG128(pVCpu->cpum.GstCtx.XState.x87.aXMM[14].uXmm.s.Lo, pVCpu->cpum.GstCtx.XState.x87.aXMM[14].uXmm.s.Hi, WHvX64RegisterXmm14); 977 GET_REG128(pVCpu->cpum.GstCtx.XState.x87.aXMM[15].uXmm.s.Lo, pVCpu->cpum.GstCtx.XState.x87.aXMM[15].uXmm.s.Hi, WHvX64RegisterXmm15); 978 978 } 979 979 -
trunk/src/VBox/VMM/VMMR0/CPUMR0A.asm
r87361 r91281 264 264 %ifdef VBOX_WITH_KERNEL_USING_XMM 265 265 ; Load the guest XMM register values we already saved in HMR0VMXStartVMWrapXMM. 266 mov pXState, [pCpumCpu + CPUMCPU.Guest.pXStateR0]266 lea pXState, [pCpumCpu + CPUMCPU.Guest.XState] 267 267 movdqa xmm0, [pXState + X86FXSTATE.xmm0] 268 268 movdqa xmm1, [pXState + X86FXSTATE.xmm1] -
trunk/src/VBox/VMM/VMMR0/HMR0.cpp
r91016 r91281 1879 1879 if (fFlags & HM_DUMP_REG_FLAGS_FPU) 1880 1880 { 1881 PCX86FXSTATE pFpuCtx = &pCtx-> CTX_SUFF(pXState)->x87;1881 PCX86FXSTATE pFpuCtx = &pCtx->XState.x87; 1882 1882 Log(("FPU:\n" 1883 1883 "FCW=%04x FSW=%04x FTW=%02x\n" -
trunk/src/VBox/VMM/VMMR0/HMR0A.asm
r89780 r91281 775 775 776 776 ; Load the guest state related to the above non-volatile and volatile SSE registers. Trashes rcx, eax and edx. 777 mov rcx, [rdi + CPUMCTX.pXStateR0]777 lea rcx, [rdi + CPUMCTX.XState] 778 778 %if %4 = 1 ; manual 779 779 movdqa xmm0, [rcx + XMM_OFF_IN_X86FXSTATE + 000h] … … 944 944 945 945 ; Save the guest SSE state related to non-volatile and volatile SSE registers. 946 mov rcx, [r8 + CPUMCTX.pXStateR0]946 lea rcx, [r8 + CPUMCTX.XState] 947 947 %if %4 = 1 ; manual 948 948 stmxcsr [rcx + X86FXSTATE.MXCSR] … … 1239 1239 1240 1240 ; Load the guest state related to the above non-volatile and volatile SSE registers. Trashes rcx, eax and edx. 1241 mov rcx, [rsi + VMCPU.cpum.GstCtx + CPUMCTX.pXStateR0]1241 lea rcx, [rsi + VMCPU.cpum.GstCtx + CPUMCTX.XState] 1242 1242 %if %4 = 1 ; manual 1243 1243 movdqa xmm0, [rcx + XMM_OFF_IN_X86FXSTATE + 000h] … … 1402 1402 %if %4 != 0 1403 1403 ; Save the guest SSE state related to non-volatile and volatile SSE registers. 1404 mov rcx, [r8 + CPUMCTX.pXStateR0]1404 lea rcx, [r8 + CPUMCTX.XState] 1405 1405 %if %4 = 1 ; manual 1406 1406 stmxcsr [rcx + X86FXSTATE.MXCSR] -
trunk/src/VBox/VMM/VMMR0/NEMR0Native-win.cpp
r86055 r91281 918 918 HV_REGISTER_ASSOC_ZERO_PADDING(&pInput->Elements[iReg]); 919 919 pInput->Elements[iReg].Name = HvX64RegisterFpMmx0; 920 pInput->Elements[iReg].Value.Fp.AsUINT128.Low64 = pCtx-> pXStateR0->x87.aRegs[0].au64[0];921 pInput->Elements[iReg].Value.Fp.AsUINT128.High64 = pCtx-> pXStateR0->x87.aRegs[0].au64[1];920 pInput->Elements[iReg].Value.Fp.AsUINT128.Low64 = pCtx->XState.x87.aRegs[0].au64[0]; 921 pInput->Elements[iReg].Value.Fp.AsUINT128.High64 = pCtx->XState.x87.aRegs[0].au64[1]; 922 922 iReg++; 923 923 HV_REGISTER_ASSOC_ZERO_PADDING(&pInput->Elements[iReg]); 924 924 pInput->Elements[iReg].Name = HvX64RegisterFpMmx1; 925 pInput->Elements[iReg].Value.Fp.AsUINT128.Low64 = pCtx-> pXStateR0->x87.aRegs[1].au64[0];926 pInput->Elements[iReg].Value.Fp.AsUINT128.High64 = pCtx-> pXStateR0->x87.aRegs[1].au64[1];925 pInput->Elements[iReg].Value.Fp.AsUINT128.Low64 = pCtx->XState.x87.aRegs[1].au64[0]; 926 pInput->Elements[iReg].Value.Fp.AsUINT128.High64 = pCtx->XState.x87.aRegs[1].au64[1]; 927 927 iReg++; 928 928 HV_REGISTER_ASSOC_ZERO_PADDING(&pInput->Elements[iReg]); 929 929 pInput->Elements[iReg].Name = HvX64RegisterFpMmx2; 930 pInput->Elements[iReg].Value.Fp.AsUINT128.Low64 = pCtx-> pXStateR0->x87.aRegs[2].au64[0];931 pInput->Elements[iReg].Value.Fp.AsUINT128.High64 = pCtx-> pXStateR0->x87.aRegs[2].au64[1];930 pInput->Elements[iReg].Value.Fp.AsUINT128.Low64 = pCtx->XState.x87.aRegs[2].au64[0]; 931 pInput->Elements[iReg].Value.Fp.AsUINT128.High64 = pCtx->XState.x87.aRegs[2].au64[1]; 932 932 iReg++; 933 933 HV_REGISTER_ASSOC_ZERO_PADDING(&pInput->Elements[iReg]); 934 934 pInput->Elements[iReg].Name = HvX64RegisterFpMmx3; 935 pInput->Elements[iReg].Value.Fp.AsUINT128.Low64 = pCtx-> pXStateR0->x87.aRegs[3].au64[0];936 pInput->Elements[iReg].Value.Fp.AsUINT128.High64 = pCtx-> pXStateR0->x87.aRegs[3].au64[1];935 pInput->Elements[iReg].Value.Fp.AsUINT128.Low64 = pCtx->XState.x87.aRegs[3].au64[0]; 936 pInput->Elements[iReg].Value.Fp.AsUINT128.High64 = pCtx->XState.x87.aRegs[3].au64[1]; 937 937 iReg++; 938 938 HV_REGISTER_ASSOC_ZERO_PADDING(&pInput->Elements[iReg]); 939 939 pInput->Elements[iReg].Name = HvX64RegisterFpMmx4; 940 pInput->Elements[iReg].Value.Fp.AsUINT128.Low64 = pCtx-> pXStateR0->x87.aRegs[4].au64[0];941 pInput->Elements[iReg].Value.Fp.AsUINT128.High64 = pCtx-> pXStateR0->x87.aRegs[4].au64[1];940 pInput->Elements[iReg].Value.Fp.AsUINT128.Low64 = pCtx->XState.x87.aRegs[4].au64[0]; 941 pInput->Elements[iReg].Value.Fp.AsUINT128.High64 = pCtx->XState.x87.aRegs[4].au64[1]; 942 942 iReg++; 943 943 HV_REGISTER_ASSOC_ZERO_PADDING(&pInput->Elements[iReg]); 944 944 pInput->Elements[iReg].Name = HvX64RegisterFpMmx5; 945 pInput->Elements[iReg].Value.Fp.AsUINT128.Low64 = pCtx-> pXStateR0->x87.aRegs[5].au64[0];946 pInput->Elements[iReg].Value.Fp.AsUINT128.High64 = pCtx-> pXStateR0->x87.aRegs[5].au64[1];945 pInput->Elements[iReg].Value.Fp.AsUINT128.Low64 = pCtx->XState.x87.aRegs[5].au64[0]; 946 pInput->Elements[iReg].Value.Fp.AsUINT128.High64 = pCtx->XState.x87.aRegs[5].au64[1]; 947 947 iReg++; 948 948 HV_REGISTER_ASSOC_ZERO_PADDING(&pInput->Elements[iReg]); 949 949 pInput->Elements[iReg].Name = HvX64RegisterFpMmx6; 950 pInput->Elements[iReg].Value.Fp.AsUINT128.Low64 = pCtx-> pXStateR0->x87.aRegs[6].au64[0];951 pInput->Elements[iReg].Value.Fp.AsUINT128.High64 = pCtx-> pXStateR0->x87.aRegs[6].au64[1];950 pInput->Elements[iReg].Value.Fp.AsUINT128.Low64 = pCtx->XState.x87.aRegs[6].au64[0]; 951 pInput->Elements[iReg].Value.Fp.AsUINT128.High64 = pCtx->XState.x87.aRegs[6].au64[1]; 952 952 iReg++; 953 953 HV_REGISTER_ASSOC_ZERO_PADDING(&pInput->Elements[iReg]); 954 954 pInput->Elements[iReg].Name = HvX64RegisterFpMmx7; 955 pInput->Elements[iReg].Value.Fp.AsUINT128.Low64 = pCtx-> pXStateR0->x87.aRegs[7].au64[0];956 pInput->Elements[iReg].Value.Fp.AsUINT128.High64 = pCtx-> pXStateR0->x87.aRegs[7].au64[1];955 pInput->Elements[iReg].Value.Fp.AsUINT128.Low64 = pCtx->XState.x87.aRegs[7].au64[0]; 956 pInput->Elements[iReg].Value.Fp.AsUINT128.High64 = pCtx->XState.x87.aRegs[7].au64[1]; 957 957 iReg++; 958 958 959 959 HV_REGISTER_ASSOC_ZERO_PADDING(&pInput->Elements[iReg]); 960 960 pInput->Elements[iReg].Name = HvX64RegisterFpControlStatus; 961 pInput->Elements[iReg].Value.FpControlStatus.FpControl = pCtx-> pXStateR0->x87.FCW;962 pInput->Elements[iReg].Value.FpControlStatus.FpStatus = pCtx-> pXStateR0->x87.FSW;963 pInput->Elements[iReg].Value.FpControlStatus.FpTag = pCtx-> pXStateR0->x87.FTW;964 pInput->Elements[iReg].Value.FpControlStatus.Reserved = pCtx-> pXStateR0->x87.FTW >> 8;965 pInput->Elements[iReg].Value.FpControlStatus.LastFpOp = pCtx-> pXStateR0->x87.FOP;966 pInput->Elements[iReg].Value.FpControlStatus.LastFpRip = (pCtx-> pXStateR0->x87.FPUIP)967 | ((uint64_t)pCtx-> pXStateR0->x87.CS << 32)968 | ((uint64_t)pCtx-> pXStateR0->x87.Rsrvd1 << 48);961 pInput->Elements[iReg].Value.FpControlStatus.FpControl = pCtx->XState.x87.FCW; 962 pInput->Elements[iReg].Value.FpControlStatus.FpStatus = pCtx->XState.x87.FSW; 963 pInput->Elements[iReg].Value.FpControlStatus.FpTag = pCtx->XState.x87.FTW; 964 pInput->Elements[iReg].Value.FpControlStatus.Reserved = pCtx->XState.x87.FTW >> 8; 965 pInput->Elements[iReg].Value.FpControlStatus.LastFpOp = pCtx->XState.x87.FOP; 966 pInput->Elements[iReg].Value.FpControlStatus.LastFpRip = (pCtx->XState.x87.FPUIP) 967 | ((uint64_t)pCtx->XState.x87.CS << 32) 968 | ((uint64_t)pCtx->XState.x87.Rsrvd1 << 48); 969 969 iReg++; 970 970 /** @todo we've got trouble if if we try write just SSE w/o X87. */ 971 971 HV_REGISTER_ASSOC_ZERO_PADDING(&pInput->Elements[iReg]); 972 972 pInput->Elements[iReg].Name = HvX64RegisterXmmControlStatus; 973 pInput->Elements[iReg].Value.XmmControlStatus.LastFpRdp = (pCtx-> pXStateR0->x87.FPUDP)974 | ((uint64_t)pCtx-> pXStateR0->x87.DS << 32)975 | ((uint64_t)pCtx-> pXStateR0->x87.Rsrvd2 << 48);976 pInput->Elements[iReg].Value.XmmControlStatus.XmmStatusControl = pCtx-> pXStateR0->x87.MXCSR;977 pInput->Elements[iReg].Value.XmmControlStatus.XmmStatusControlMask = pCtx-> pXStateR0->x87.MXCSR_MASK; /** @todo ??? (Isn't this an output field?) */973 pInput->Elements[iReg].Value.XmmControlStatus.LastFpRdp = (pCtx->XState.x87.FPUDP) 974 | ((uint64_t)pCtx->XState.x87.DS << 32) 975 | ((uint64_t)pCtx->XState.x87.Rsrvd2 << 48); 976 pInput->Elements[iReg].Value.XmmControlStatus.XmmStatusControl = pCtx->XState.x87.MXCSR; 977 pInput->Elements[iReg].Value.XmmControlStatus.XmmStatusControlMask = pCtx->XState.x87.MXCSR_MASK; /** @todo ??? (Isn't this an output field?) */ 978 978 iReg++; 979 979 } … … 984 984 HV_REGISTER_ASSOC_ZERO_PADDING(&pInput->Elements[iReg]); 985 985 pInput->Elements[iReg].Name = HvX64RegisterXmm0; 986 pInput->Elements[iReg].Value.Reg128.Low64 = pCtx-> pXStateR0->x87.aXMM[0].uXmm.s.Lo;987 pInput->Elements[iReg].Value.Reg128.High64 = pCtx-> pXStateR0->x87.aXMM[0].uXmm.s.Hi;986 pInput->Elements[iReg].Value.Reg128.Low64 = pCtx->XState.x87.aXMM[0].uXmm.s.Lo; 987 pInput->Elements[iReg].Value.Reg128.High64 = pCtx->XState.x87.aXMM[0].uXmm.s.Hi; 988 988 iReg++; 989 989 HV_REGISTER_ASSOC_ZERO_PADDING(&pInput->Elements[iReg]); 990 990 pInput->Elements[iReg].Name = HvX64RegisterXmm1; 991 pInput->Elements[iReg].Value.Reg128.Low64 = pCtx-> pXStateR0->x87.aXMM[1].uXmm.s.Lo;992 pInput->Elements[iReg].Value.Reg128.High64 = pCtx-> pXStateR0->x87.aXMM[1].uXmm.s.Hi;991 pInput->Elements[iReg].Value.Reg128.Low64 = pCtx->XState.x87.aXMM[1].uXmm.s.Lo; 992 pInput->Elements[iReg].Value.Reg128.High64 = pCtx->XState.x87.aXMM[1].uXmm.s.Hi; 993 993 iReg++; 994 994 HV_REGISTER_ASSOC_ZERO_PADDING(&pInput->Elements[iReg]); 995 995 pInput->Elements[iReg].Name = HvX64RegisterXmm2; 996 pInput->Elements[iReg].Value.Reg128.Low64 = pCtx-> pXStateR0->x87.aXMM[2].uXmm.s.Lo;997 pInput->Elements[iReg].Value.Reg128.High64 = pCtx-> pXStateR0->x87.aXMM[2].uXmm.s.Hi;996 pInput->Elements[iReg].Value.Reg128.Low64 = pCtx->XState.x87.aXMM[2].uXmm.s.Lo; 997 pInput->Elements[iReg].Value.Reg128.High64 = pCtx->XState.x87.aXMM[2].uXmm.s.Hi; 998 998 iReg++; 999 999 HV_REGISTER_ASSOC_ZERO_PADDING(&pInput->Elements[iReg]); 1000 1000 pInput->Elements[iReg].Name = HvX64RegisterXmm3; 1001 pInput->Elements[iReg].Value.Reg128.Low64 = pCtx-> pXStateR0->x87.aXMM[3].uXmm.s.Lo;1002 pInput->Elements[iReg].Value.Reg128.High64 = pCtx-> pXStateR0->x87.aXMM[3].uXmm.s.Hi;1001 pInput->Elements[iReg].Value.Reg128.Low64 = pCtx->XState.x87.aXMM[3].uXmm.s.Lo; 1002 pInput->Elements[iReg].Value.Reg128.High64 = pCtx->XState.x87.aXMM[3].uXmm.s.Hi; 1003 1003 iReg++; 1004 1004 HV_REGISTER_ASSOC_ZERO_PADDING(&pInput->Elements[iReg]); 1005 1005 pInput->Elements[iReg].Name = HvX64RegisterXmm4; 1006 pInput->Elements[iReg].Value.Reg128.Low64 = pCtx-> pXStateR0->x87.aXMM[4].uXmm.s.Lo;1007 pInput->Elements[iReg].Value.Reg128.High64 = pCtx-> pXStateR0->x87.aXMM[4].uXmm.s.Hi;1006 pInput->Elements[iReg].Value.Reg128.Low64 = pCtx->XState.x87.aXMM[4].uXmm.s.Lo; 1007 pInput->Elements[iReg].Value.Reg128.High64 = pCtx->XState.x87.aXMM[4].uXmm.s.Hi; 1008 1008 iReg++; 1009 1009 HV_REGISTER_ASSOC_ZERO_PADDING(&pInput->Elements[iReg]); 1010 1010 pInput->Elements[iReg].Name = HvX64RegisterXmm5; 1011 pInput->Elements[iReg].Value.Reg128.Low64 = pCtx-> pXStateR0->x87.aXMM[5].uXmm.s.Lo;1012 pInput->Elements[iReg].Value.Reg128.High64 = pCtx-> pXStateR0->x87.aXMM[5].uXmm.s.Hi;1011 pInput->Elements[iReg].Value.Reg128.Low64 = pCtx->XState.x87.aXMM[5].uXmm.s.Lo; 1012 pInput->Elements[iReg].Value.Reg128.High64 = pCtx->XState.x87.aXMM[5].uXmm.s.Hi; 1013 1013 iReg++; 1014 1014 HV_REGISTER_ASSOC_ZERO_PADDING(&pInput->Elements[iReg]); 1015 1015 pInput->Elements[iReg].Name = HvX64RegisterXmm6; 1016 pInput->Elements[iReg].Value.Reg128.Low64 = pCtx-> pXStateR0->x87.aXMM[6].uXmm.s.Lo;1017 pInput->Elements[iReg].Value.Reg128.High64 = pCtx-> pXStateR0->x87.aXMM[6].uXmm.s.Hi;1016 pInput->Elements[iReg].Value.Reg128.Low64 = pCtx->XState.x87.aXMM[6].uXmm.s.Lo; 1017 pInput->Elements[iReg].Value.Reg128.High64 = pCtx->XState.x87.aXMM[6].uXmm.s.Hi; 1018 1018 iReg++; 1019 1019 HV_REGISTER_ASSOC_ZERO_PADDING(&pInput->Elements[iReg]); 1020 1020 pInput->Elements[iReg].Name = HvX64RegisterXmm7; 1021 pInput->Elements[iReg].Value.Reg128.Low64 = pCtx-> pXStateR0->x87.aXMM[7].uXmm.s.Lo;1022 pInput->Elements[iReg].Value.Reg128.High64 = pCtx-> pXStateR0->x87.aXMM[7].uXmm.s.Hi;1021 pInput->Elements[iReg].Value.Reg128.Low64 = pCtx->XState.x87.aXMM[7].uXmm.s.Lo; 1022 pInput->Elements[iReg].Value.Reg128.High64 = pCtx->XState.x87.aXMM[7].uXmm.s.Hi; 1023 1023 iReg++; 1024 1024 HV_REGISTER_ASSOC_ZERO_PADDING(&pInput->Elements[iReg]); 1025 1025 pInput->Elements[iReg].Name = HvX64RegisterXmm8; 1026 pInput->Elements[iReg].Value.Reg128.Low64 = pCtx-> pXStateR0->x87.aXMM[8].uXmm.s.Lo;1027 pInput->Elements[iReg].Value.Reg128.High64 = pCtx-> pXStateR0->x87.aXMM[8].uXmm.s.Hi;1026 pInput->Elements[iReg].Value.Reg128.Low64 = pCtx->XState.x87.aXMM[8].uXmm.s.Lo; 1027 pInput->Elements[iReg].Value.Reg128.High64 = pCtx->XState.x87.aXMM[8].uXmm.s.Hi; 1028 1028 iReg++; 1029 1029 HV_REGISTER_ASSOC_ZERO_PADDING(&pInput->Elements[iReg]); 1030 1030 pInput->Elements[iReg].Name = HvX64RegisterXmm9; 1031 pInput->Elements[iReg].Value.Reg128.Low64 = pCtx-> pXStateR0->x87.aXMM[9].uXmm.s.Lo;1032 pInput->Elements[iReg].Value.Reg128.High64 = pCtx-> pXStateR0->x87.aXMM[9].uXmm.s.Hi;1031 pInput->Elements[iReg].Value.Reg128.Low64 = pCtx->XState.x87.aXMM[9].uXmm.s.Lo; 1032 pInput->Elements[iReg].Value.Reg128.High64 = pCtx->XState.x87.aXMM[9].uXmm.s.Hi; 1033 1033 iReg++; 1034 1034 HV_REGISTER_ASSOC_ZERO_PADDING(&pInput->Elements[iReg]); 1035 1035 pInput->Elements[iReg].Name = HvX64RegisterXmm10; 1036 pInput->Elements[iReg].Value.Reg128.Low64 = pCtx-> pXStateR0->x87.aXMM[10].uXmm.s.Lo;1037 pInput->Elements[iReg].Value.Reg128.High64 = pCtx-> pXStateR0->x87.aXMM[10].uXmm.s.Hi;1036 pInput->Elements[iReg].Value.Reg128.Low64 = pCtx->XState.x87.aXMM[10].uXmm.s.Lo; 1037 pInput->Elements[iReg].Value.Reg128.High64 = pCtx->XState.x87.aXMM[10].uXmm.s.Hi; 1038 1038 iReg++; 1039 1039 HV_REGISTER_ASSOC_ZERO_PADDING(&pInput->Elements[iReg]); 1040 1040 pInput->Elements[iReg].Name = HvX64RegisterXmm11; 1041 pInput->Elements[iReg].Value.Reg128.Low64 = pCtx-> pXStateR0->x87.aXMM[11].uXmm.s.Lo;1042 pInput->Elements[iReg].Value.Reg128.High64 = pCtx-> pXStateR0->x87.aXMM[11].uXmm.s.Hi;1041 pInput->Elements[iReg].Value.Reg128.Low64 = pCtx->XState.x87.aXMM[11].uXmm.s.Lo; 1042 pInput->Elements[iReg].Value.Reg128.High64 = pCtx->XState.x87.aXMM[11].uXmm.s.Hi; 1043 1043 iReg++; 1044 1044 HV_REGISTER_ASSOC_ZERO_PADDING(&pInput->Elements[iReg]); 1045 1045 pInput->Elements[iReg].Name = HvX64RegisterXmm12; 1046 pInput->Elements[iReg].Value.Reg128.Low64 = pCtx-> pXStateR0->x87.aXMM[12].uXmm.s.Lo;1047 pInput->Elements[iReg].Value.Reg128.High64 = pCtx-> pXStateR0->x87.aXMM[12].uXmm.s.Hi;1046 pInput->Elements[iReg].Value.Reg128.Low64 = pCtx->XState.x87.aXMM[12].uXmm.s.Lo; 1047 pInput->Elements[iReg].Value.Reg128.High64 = pCtx->XState.x87.aXMM[12].uXmm.s.Hi; 1048 1048 iReg++; 1049 1049 HV_REGISTER_ASSOC_ZERO_PADDING(&pInput->Elements[iReg]); 1050 1050 pInput->Elements[iReg].Name = HvX64RegisterXmm13; 1051 pInput->Elements[iReg].Value.Reg128.Low64 = pCtx-> pXStateR0->x87.aXMM[13].uXmm.s.Lo;1052 pInput->Elements[iReg].Value.Reg128.High64 = pCtx-> pXStateR0->x87.aXMM[13].uXmm.s.Hi;1051 pInput->Elements[iReg].Value.Reg128.Low64 = pCtx->XState.x87.aXMM[13].uXmm.s.Lo; 1052 pInput->Elements[iReg].Value.Reg128.High64 = pCtx->XState.x87.aXMM[13].uXmm.s.Hi; 1053 1053 iReg++; 1054 1054 HV_REGISTER_ASSOC_ZERO_PADDING(&pInput->Elements[iReg]); 1055 1055 pInput->Elements[iReg].Name = HvX64RegisterXmm14; 1056 pInput->Elements[iReg].Value.Reg128.Low64 = pCtx-> pXStateR0->x87.aXMM[14].uXmm.s.Lo;1057 pInput->Elements[iReg].Value.Reg128.High64 = pCtx-> pXStateR0->x87.aXMM[14].uXmm.s.Hi;1056 pInput->Elements[iReg].Value.Reg128.Low64 = pCtx->XState.x87.aXMM[14].uXmm.s.Lo; 1057 pInput->Elements[iReg].Value.Reg128.High64 = pCtx->XState.x87.aXMM[14].uXmm.s.Hi; 1058 1058 iReg++; 1059 1059 HV_REGISTER_ASSOC_ZERO_PADDING(&pInput->Elements[iReg]); 1060 1060 pInput->Elements[iReg].Name = HvX64RegisterXmm15; 1061 pInput->Elements[iReg].Value.Reg128.Low64 = pCtx-> pXStateR0->x87.aXMM[15].uXmm.s.Lo;1062 pInput->Elements[iReg].Value.Reg128.High64 = pCtx-> pXStateR0->x87.aXMM[15].uXmm.s.Hi;1061 pInput->Elements[iReg].Value.Reg128.Low64 = pCtx->XState.x87.aXMM[15].uXmm.s.Lo; 1062 pInput->Elements[iReg].Value.Reg128.High64 = pCtx->XState.x87.aXMM[15].uXmm.s.Hi; 1063 1063 iReg++; 1064 1064 } … … 1818 1818 Assert(pInput->Names[iReg] == HvX64RegisterFpMmx0); 1819 1819 Assert(pInput->Names[iReg + 7] == HvX64RegisterFpMmx7); 1820 pCtx-> pXStateR0->x87.aRegs[0].au64[0] = paValues[iReg].Fp.AsUINT128.Low64;1821 pCtx-> pXStateR0->x87.aRegs[0].au64[1] = paValues[iReg].Fp.AsUINT128.High64;1822 iReg++; 1823 pCtx-> pXStateR0->x87.aRegs[1].au64[0] = paValues[iReg].Fp.AsUINT128.Low64;1824 pCtx-> pXStateR0->x87.aRegs[1].au64[1] = paValues[iReg].Fp.AsUINT128.High64;1825 iReg++; 1826 pCtx-> pXStateR0->x87.aRegs[2].au64[0] = paValues[iReg].Fp.AsUINT128.Low64;1827 pCtx-> pXStateR0->x87.aRegs[2].au64[1] = paValues[iReg].Fp.AsUINT128.High64;1828 iReg++; 1829 pCtx-> pXStateR0->x87.aRegs[3].au64[0] = paValues[iReg].Fp.AsUINT128.Low64;1830 pCtx-> pXStateR0->x87.aRegs[3].au64[1] = paValues[iReg].Fp.AsUINT128.High64;1831 iReg++; 1832 pCtx-> pXStateR0->x87.aRegs[4].au64[0] = paValues[iReg].Fp.AsUINT128.Low64;1833 pCtx-> pXStateR0->x87.aRegs[4].au64[1] = paValues[iReg].Fp.AsUINT128.High64;1834 iReg++; 1835 pCtx-> pXStateR0->x87.aRegs[5].au64[0] = paValues[iReg].Fp.AsUINT128.Low64;1836 pCtx-> pXStateR0->x87.aRegs[5].au64[1] = paValues[iReg].Fp.AsUINT128.High64;1837 iReg++; 1838 pCtx-> pXStateR0->x87.aRegs[6].au64[0] = paValues[iReg].Fp.AsUINT128.Low64;1839 pCtx-> pXStateR0->x87.aRegs[6].au64[1] = paValues[iReg].Fp.AsUINT128.High64;1840 iReg++; 1841 pCtx-> pXStateR0->x87.aRegs[7].au64[0] = paValues[iReg].Fp.AsUINT128.Low64;1842 pCtx-> pXStateR0->x87.aRegs[7].au64[1] = paValues[iReg].Fp.AsUINT128.High64;1820 pCtx->XState.x87.aRegs[0].au64[0] = paValues[iReg].Fp.AsUINT128.Low64; 1821 pCtx->XState.x87.aRegs[0].au64[1] = paValues[iReg].Fp.AsUINT128.High64; 1822 iReg++; 1823 pCtx->XState.x87.aRegs[1].au64[0] = paValues[iReg].Fp.AsUINT128.Low64; 1824 pCtx->XState.x87.aRegs[1].au64[1] = paValues[iReg].Fp.AsUINT128.High64; 1825 iReg++; 1826 pCtx->XState.x87.aRegs[2].au64[0] = paValues[iReg].Fp.AsUINT128.Low64; 1827 pCtx->XState.x87.aRegs[2].au64[1] = paValues[iReg].Fp.AsUINT128.High64; 1828 iReg++; 1829 pCtx->XState.x87.aRegs[3].au64[0] = paValues[iReg].Fp.AsUINT128.Low64; 1830 pCtx->XState.x87.aRegs[3].au64[1] = paValues[iReg].Fp.AsUINT128.High64; 1831 iReg++; 1832 pCtx->XState.x87.aRegs[4].au64[0] = paValues[iReg].Fp.AsUINT128.Low64; 1833 pCtx->XState.x87.aRegs[4].au64[1] = paValues[iReg].Fp.AsUINT128.High64; 1834 iReg++; 1835 pCtx->XState.x87.aRegs[5].au64[0] = paValues[iReg].Fp.AsUINT128.Low64; 1836 pCtx->XState.x87.aRegs[5].au64[1] = paValues[iReg].Fp.AsUINT128.High64; 1837 iReg++; 1838 pCtx->XState.x87.aRegs[6].au64[0] = paValues[iReg].Fp.AsUINT128.Low64; 1839 pCtx->XState.x87.aRegs[6].au64[1] = paValues[iReg].Fp.AsUINT128.High64; 1840 iReg++; 1841 pCtx->XState.x87.aRegs[7].au64[0] = paValues[iReg].Fp.AsUINT128.Low64; 1842 pCtx->XState.x87.aRegs[7].au64[1] = paValues[iReg].Fp.AsUINT128.High64; 1843 1843 iReg++; 1844 1844 1845 1845 Assert(pInput->Names[iReg] == HvX64RegisterFpControlStatus); 1846 pCtx-> pXStateR0->x87.FCW = paValues[iReg].FpControlStatus.FpControl;1847 pCtx-> pXStateR0->x87.FSW = paValues[iReg].FpControlStatus.FpStatus;1848 pCtx-> pXStateR0->x87.FTW = paValues[iReg].FpControlStatus.FpTag1846 pCtx->XState.x87.FCW = paValues[iReg].FpControlStatus.FpControl; 1847 pCtx->XState.x87.FSW = paValues[iReg].FpControlStatus.FpStatus; 1848 pCtx->XState.x87.FTW = paValues[iReg].FpControlStatus.FpTag 1849 1849 /*| (paValues[iReg].FpControlStatus.Reserved << 8)*/; 1850 pCtx-> pXStateR0->x87.FOP = paValues[iReg].FpControlStatus.LastFpOp;1851 pCtx-> pXStateR0->x87.FPUIP = (uint32_t)paValues[iReg].FpControlStatus.LastFpRip;1852 pCtx-> pXStateR0->x87.CS = (uint16_t)(paValues[iReg].FpControlStatus.LastFpRip >> 32);1853 pCtx-> pXStateR0->x87.Rsrvd1 = (uint16_t)(paValues[iReg].FpControlStatus.LastFpRip >> 48);1850 pCtx->XState.x87.FOP = paValues[iReg].FpControlStatus.LastFpOp; 1851 pCtx->XState.x87.FPUIP = (uint32_t)paValues[iReg].FpControlStatus.LastFpRip; 1852 pCtx->XState.x87.CS = (uint16_t)(paValues[iReg].FpControlStatus.LastFpRip >> 32); 1853 pCtx->XState.x87.Rsrvd1 = (uint16_t)(paValues[iReg].FpControlStatus.LastFpRip >> 48); 1854 1854 iReg++; 1855 1855 } … … 1860 1860 if (fWhat & CPUMCTX_EXTRN_X87) 1861 1861 { 1862 pCtx-> pXStateR0->x87.FPUDP = (uint32_t)paValues[iReg].XmmControlStatus.LastFpRdp;1863 pCtx-> pXStateR0->x87.DS = (uint16_t)(paValues[iReg].XmmControlStatus.LastFpRdp >> 32);1864 pCtx-> pXStateR0->x87.Rsrvd2 = (uint16_t)(paValues[iReg].XmmControlStatus.LastFpRdp >> 48);1865 } 1866 pCtx-> pXStateR0->x87.MXCSR = paValues[iReg].XmmControlStatus.XmmStatusControl;1867 pCtx-> pXStateR0->x87.MXCSR_MASK = paValues[iReg].XmmControlStatus.XmmStatusControlMask; /** @todo ??? (Isn't this an output field?) */1862 pCtx->XState.x87.FPUDP = (uint32_t)paValues[iReg].XmmControlStatus.LastFpRdp; 1863 pCtx->XState.x87.DS = (uint16_t)(paValues[iReg].XmmControlStatus.LastFpRdp >> 32); 1864 pCtx->XState.x87.Rsrvd2 = (uint16_t)(paValues[iReg].XmmControlStatus.LastFpRdp >> 48); 1865 } 1866 pCtx->XState.x87.MXCSR = paValues[iReg].XmmControlStatus.XmmStatusControl; 1867 pCtx->XState.x87.MXCSR_MASK = paValues[iReg].XmmControlStatus.XmmStatusControlMask; /** @todo ??? (Isn't this an output field?) */ 1868 1868 iReg++; 1869 1869 } … … 1874 1874 Assert(pInput->Names[iReg] == HvX64RegisterXmm0); 1875 1875 Assert(pInput->Names[iReg+15] == HvX64RegisterXmm15); 1876 pCtx-> pXStateR0->x87.aXMM[0].uXmm.s.Lo = paValues[iReg].Reg128.Low64;1877 pCtx-> pXStateR0->x87.aXMM[0].uXmm.s.Hi = paValues[iReg].Reg128.High64;1878 iReg++; 1879 pCtx-> pXStateR0->x87.aXMM[1].uXmm.s.Lo = paValues[iReg].Reg128.Low64;1880 pCtx-> pXStateR0->x87.aXMM[1].uXmm.s.Hi = paValues[iReg].Reg128.High64;1881 iReg++; 1882 pCtx-> pXStateR0->x87.aXMM[2].uXmm.s.Lo = paValues[iReg].Reg128.Low64;1883 pCtx-> pXStateR0->x87.aXMM[2].uXmm.s.Hi = paValues[iReg].Reg128.High64;1884 iReg++; 1885 pCtx-> pXStateR0->x87.aXMM[3].uXmm.s.Lo = paValues[iReg].Reg128.Low64;1886 pCtx-> pXStateR0->x87.aXMM[3].uXmm.s.Hi = paValues[iReg].Reg128.High64;1887 iReg++; 1888 pCtx-> pXStateR0->x87.aXMM[4].uXmm.s.Lo = paValues[iReg].Reg128.Low64;1889 pCtx-> pXStateR0->x87.aXMM[4].uXmm.s.Hi = paValues[iReg].Reg128.High64;1890 iReg++; 1891 pCtx-> pXStateR0->x87.aXMM[5].uXmm.s.Lo = paValues[iReg].Reg128.Low64;1892 pCtx-> pXStateR0->x87.aXMM[5].uXmm.s.Hi = paValues[iReg].Reg128.High64;1893 iReg++; 1894 pCtx-> pXStateR0->x87.aXMM[6].uXmm.s.Lo = paValues[iReg].Reg128.Low64;1895 pCtx-> pXStateR0->x87.aXMM[6].uXmm.s.Hi = paValues[iReg].Reg128.High64;1896 iReg++; 1897 pCtx-> pXStateR0->x87.aXMM[7].uXmm.s.Lo = paValues[iReg].Reg128.Low64;1898 pCtx-> pXStateR0->x87.aXMM[7].uXmm.s.Hi = paValues[iReg].Reg128.High64;1899 iReg++; 1900 pCtx-> pXStateR0->x87.aXMM[8].uXmm.s.Lo = paValues[iReg].Reg128.Low64;1901 pCtx-> pXStateR0->x87.aXMM[8].uXmm.s.Hi = paValues[iReg].Reg128.High64;1902 iReg++; 1903 pCtx-> pXStateR0->x87.aXMM[9].uXmm.s.Lo = paValues[iReg].Reg128.Low64;1904 pCtx-> pXStateR0->x87.aXMM[9].uXmm.s.Hi = paValues[iReg].Reg128.High64;1905 iReg++; 1906 pCtx-> pXStateR0->x87.aXMM[10].uXmm.s.Lo = paValues[iReg].Reg128.Low64;1907 pCtx-> pXStateR0->x87.aXMM[10].uXmm.s.Hi = paValues[iReg].Reg128.High64;1908 iReg++; 1909 pCtx-> pXStateR0->x87.aXMM[11].uXmm.s.Lo = paValues[iReg].Reg128.Low64;1910 pCtx-> pXStateR0->x87.aXMM[11].uXmm.s.Hi = paValues[iReg].Reg128.High64;1911 iReg++; 1912 pCtx-> pXStateR0->x87.aXMM[12].uXmm.s.Lo = paValues[iReg].Reg128.Low64;1913 pCtx-> pXStateR0->x87.aXMM[12].uXmm.s.Hi = paValues[iReg].Reg128.High64;1914 iReg++; 1915 pCtx-> pXStateR0->x87.aXMM[13].uXmm.s.Lo = paValues[iReg].Reg128.Low64;1916 pCtx-> pXStateR0->x87.aXMM[13].uXmm.s.Hi = paValues[iReg].Reg128.High64;1917 iReg++; 1918 pCtx-> pXStateR0->x87.aXMM[14].uXmm.s.Lo = paValues[iReg].Reg128.Low64;1919 pCtx-> pXStateR0->x87.aXMM[14].uXmm.s.Hi = paValues[iReg].Reg128.High64;1920 iReg++; 1921 pCtx-> pXStateR0->x87.aXMM[15].uXmm.s.Lo = paValues[iReg].Reg128.Low64;1922 pCtx-> pXStateR0->x87.aXMM[15].uXmm.s.Hi = paValues[iReg].Reg128.High64;1876 pCtx->XState.x87.aXMM[0].uXmm.s.Lo = paValues[iReg].Reg128.Low64; 1877 pCtx->XState.x87.aXMM[0].uXmm.s.Hi = paValues[iReg].Reg128.High64; 1878 iReg++; 1879 pCtx->XState.x87.aXMM[1].uXmm.s.Lo = paValues[iReg].Reg128.Low64; 1880 pCtx->XState.x87.aXMM[1].uXmm.s.Hi = paValues[iReg].Reg128.High64; 1881 iReg++; 1882 pCtx->XState.x87.aXMM[2].uXmm.s.Lo = paValues[iReg].Reg128.Low64; 1883 pCtx->XState.x87.aXMM[2].uXmm.s.Hi = paValues[iReg].Reg128.High64; 1884 iReg++; 1885 pCtx->XState.x87.aXMM[3].uXmm.s.Lo = paValues[iReg].Reg128.Low64; 1886 pCtx->XState.x87.aXMM[3].uXmm.s.Hi = paValues[iReg].Reg128.High64; 1887 iReg++; 1888 pCtx->XState.x87.aXMM[4].uXmm.s.Lo = paValues[iReg].Reg128.Low64; 1889 pCtx->XState.x87.aXMM[4].uXmm.s.Hi = paValues[iReg].Reg128.High64; 1890 iReg++; 1891 pCtx->XState.x87.aXMM[5].uXmm.s.Lo = paValues[iReg].Reg128.Low64; 1892 pCtx->XState.x87.aXMM[5].uXmm.s.Hi = paValues[iReg].Reg128.High64; 1893 iReg++; 1894 pCtx->XState.x87.aXMM[6].uXmm.s.Lo = paValues[iReg].Reg128.Low64; 1895 pCtx->XState.x87.aXMM[6].uXmm.s.Hi = paValues[iReg].Reg128.High64; 1896 iReg++; 1897 pCtx->XState.x87.aXMM[7].uXmm.s.Lo = paValues[iReg].Reg128.Low64; 1898 pCtx->XState.x87.aXMM[7].uXmm.s.Hi = paValues[iReg].Reg128.High64; 1899 iReg++; 1900 pCtx->XState.x87.aXMM[8].uXmm.s.Lo = paValues[iReg].Reg128.Low64; 1901 pCtx->XState.x87.aXMM[8].uXmm.s.Hi = paValues[iReg].Reg128.High64; 1902 iReg++; 1903 pCtx->XState.x87.aXMM[9].uXmm.s.Lo = paValues[iReg].Reg128.Low64; 1904 pCtx->XState.x87.aXMM[9].uXmm.s.Hi = paValues[iReg].Reg128.High64; 1905 iReg++; 1906 pCtx->XState.x87.aXMM[10].uXmm.s.Lo = paValues[iReg].Reg128.Low64; 1907 pCtx->XState.x87.aXMM[10].uXmm.s.Hi = paValues[iReg].Reg128.High64; 1908 iReg++; 1909 pCtx->XState.x87.aXMM[11].uXmm.s.Lo = paValues[iReg].Reg128.Low64; 1910 pCtx->XState.x87.aXMM[11].uXmm.s.Hi = paValues[iReg].Reg128.High64; 1911 iReg++; 1912 pCtx->XState.x87.aXMM[12].uXmm.s.Lo = paValues[iReg].Reg128.Low64; 1913 pCtx->XState.x87.aXMM[12].uXmm.s.Hi = paValues[iReg].Reg128.High64; 1914 iReg++; 1915 pCtx->XState.x87.aXMM[13].uXmm.s.Lo = paValues[iReg].Reg128.Low64; 1916 pCtx->XState.x87.aXMM[13].uXmm.s.Hi = paValues[iReg].Reg128.High64; 1917 iReg++; 1918 pCtx->XState.x87.aXMM[14].uXmm.s.Lo = paValues[iReg].Reg128.Low64; 1919 pCtx->XState.x87.aXMM[14].uXmm.s.Hi = paValues[iReg].Reg128.High64; 1920 iReg++; 1921 pCtx->XState.x87.aXMM[15].uXmm.s.Lo = paValues[iReg].Reg128.Low64; 1922 pCtx->XState.x87.aXMM[15].uXmm.s.Hi = paValues[iReg].Reg128.High64; 1923 1923 iReg++; 1924 1924 } -
trunk/src/VBox/VMM/VMMR3/CPUM.cpp
r91280 r91281 2288 2288 2289 2289 uint8_t *pbXStates; 2290 rc = MMR3HyperAllocOnceNoRelEx(pVM, cbMaxXState * 2 *pVM->cCpus, PAGE_SIZE, MM_TAG_CPUM_CTX,2290 rc = MMR3HyperAllocOnceNoRelEx(pVM, cbMaxXState * pVM->cCpus, PAGE_SIZE, MM_TAG_CPUM_CTX, 2291 2291 MMHYPER_AONR_FLAGS_KERNEL_MAPPING, (void **)&pbXStates); 2292 2292 AssertLogRelRCReturn(rc, rc); … … 2295 2295 { 2296 2296 PVMCPU pVCpu = pVM->apCpusR3[i]; 2297 2298 pVCpu->cpum.s.Guest.pXStateR3 = (PX86XSAVEAREA)pbXStates;2299 pVCpu->cpum.s.Guest.pXStateR0 = MMHyperR3ToR0(pVM, pbXStates);2300 pbXStates += cbMaxXState;2301 2297 2302 2298 pVCpu->cpum.s.Host.pXStateR3 = (PX86XSAVEAREA)pbXStates; … … 2451 2447 uint32_t fUseFlags = pVCpu->cpum.s.fUseFlags & ~CPUM_USED_FPU_SINCE_REM; 2452 2448 2453 AssertCompile(RTASSERT_OFFSET_OF(CPUMCTX, pXStateR0) < RTASSERT_OFFSET_OF(CPUMCTX, pXStateR3)); 2454 memset(pCtx, 0, RT_UOFFSETOF(CPUMCTX, pXStateR0)); 2449 RT_BZERO(pCtx, RT_UOFFSETOF(CPUMCTX, aoffXState)); 2455 2450 2456 2451 pVCpu->cpum.s.fUseFlags = fUseFlags; … … 2516 2511 pCtx->dr[7] = X86_DR7_INIT_VAL; 2517 2512 2518 PX86FXSTATE pFpuCtx = &pCtx-> pXStateR3->x87; AssertReleaseMsg(RT_VALID_PTR(pFpuCtx), ("%p\n", pFpuCtx));2513 PX86FXSTATE pFpuCtx = &pCtx->XState.x87; 2519 2514 pFpuCtx->FTW = 0x00; /* All empty (abbridged tag reg edition). */ 2520 2515 pFpuCtx->FCW = 0x37f; … … 2530 2525 /* The entire FXSAVE state needs loading when we switch to XSAVE/XRSTOR 2531 2526 as we don't know what happened before. (Bother optimize later?) */ 2532 pCtx-> pXStateR3->Hdr.bmXState= XSAVE_C_X87 | XSAVE_C_SSE;2527 pCtx->XState.Hdr.bmXState = XSAVE_C_X87 | XSAVE_C_SSE; 2533 2528 } 2534 2529 … … 2657 2652 PCPUMCTX pGstCtx = &pVCpu->cpum.s.Guest; 2658 2653 SSMR3PutStructEx(pSSM, pGstCtx, sizeof(*pGstCtx), 0, g_aCpumCtxFields, NULL); 2659 SSMR3PutStructEx(pSSM, &pGstCtx-> pXStateR3->x87, sizeof(pGstCtx->pXStateR3->x87),0, g_aCpumX87Fields, NULL);2654 SSMR3PutStructEx(pSSM, &pGstCtx->XState.x87, sizeof(pGstCtx->XState.x87), 0, g_aCpumX87Fields, NULL); 2660 2655 if (pGstCtx->fXStateMask != 0) 2661 SSMR3PutStructEx(pSSM, &pGstCtx-> pXStateR3->Hdr, sizeof(pGstCtx->pXStateR3->Hdr),0, g_aCpumXSaveHdrFields, NULL);2656 SSMR3PutStructEx(pSSM, &pGstCtx->XState.Hdr, sizeof(pGstCtx->XState.Hdr), 0, g_aCpumXSaveHdrFields, NULL); 2662 2657 if (pGstCtx->fXStateMask & XSAVE_C_YMM) 2663 2658 { … … 2889 2884 */ 2890 2885 rc = SSMR3GetStructEx(pSSM, pGstCtx, sizeof(*pGstCtx), 0, g_aCpumCtxFields, NULL); 2891 rc = SSMR3GetStructEx(pSSM, &pGstCtx-> pXStateR3->x87, sizeof(pGstCtx->pXStateR3->x87),0, g_aCpumX87Fields, NULL);2886 rc = SSMR3GetStructEx(pSSM, &pGstCtx->XState.x87, sizeof(pGstCtx->XState.x87), 0, g_aCpumX87Fields, NULL); 2892 2887 AssertRCReturn(rc, rc); 2893 2888 … … 2934 2929 if (pGstCtx->fXStateMask != 0) 2935 2930 { 2936 rc = SSMR3GetStructEx(pSSM, &pGstCtx-> pXStateR3->Hdr, sizeof(pGstCtx->pXStateR3->Hdr),2931 rc = SSMR3GetStructEx(pSSM, &pGstCtx->XState.Hdr, sizeof(pGstCtx->XState.Hdr), 2937 2932 0, g_aCpumXSaveHdrFields, NULL); 2938 2933 AssertRCReturn(rc, rc); 2939 AssertLogRelMsgReturn(!(pGstCtx-> pXStateR3->Hdr.bmXState & ~pGstCtx->fXStateMask),2934 AssertLogRelMsgReturn(!(pGstCtx->XState.Hdr.bmXState & ~pGstCtx->fXStateMask), 2940 2935 ("bmXState=%#RX64 fXStateMask=%#RX64\n", 2941 pGstCtx-> pXStateR3->Hdr.bmXState, pGstCtx->fXStateMask),2936 pGstCtx->XState.Hdr.bmXState, pGstCtx->fXStateMask), 2942 2937 VERR_CPUM_INVALID_XSAVE_HDR); 2943 2938 } … … 3049 3044 * Pre XSAVE saved state. 3050 3045 */ 3051 SSMR3GetStructEx(pSSM, &pGstCtx-> pXStateR3->x87, sizeof(pGstCtx->pXStateR3->x87),3046 SSMR3GetStructEx(pSSM, &pGstCtx->XState.x87, sizeof(pGstCtx->XState.x87), 3052 3047 fLoad | SSMSTRUCT_FLAGS_NO_TAIL_MARKER, paCpumCtx1Fields, NULL); 3053 3048 SSMR3GetStructEx(pSSM, pGstCtx, sizeof(*pGstCtx), fLoad | SSMSTRUCT_FLAGS_NO_LEAD_MARKER, paCpumCtx2Fields, NULL); … … 3439 3434 pszPrefix, pCtx->aXcr[0], pszPrefix, pCtx->aXcr[1], 3440 3435 pszPrefix, UINT64_C(0) /** @todo XSS */, pCtx->fXStateMask); 3441 if (pCtx->CTX_SUFF(pXState))3442 3436 { 3443 PX86FXSTATE pFpuCtx = &pCtx-> CTX_SUFF(pXState)->x87;3437 PX86FXSTATE pFpuCtx = &pCtx->XState.x87; 3444 3438 pHlp->pfnPrintf(pHlp, 3445 3439 "%sFCW=%04x %sFSW=%04x %sFTW=%04x %sFOP=%04x %sMXCSR=%08x %sMXCSR_MASK=%08x\n" -
trunk/src/VBox/VMM/VMMR3/CPUMDbg.cpp
r86179 r91281 111 111 { 112 112 PVMCPU pVCpu = (PVMCPU)pvUser; 113 void const *pv = (uint8_t const *)&pVCpu->cpum.s.Guest. pXStateR3+ pDesc->offRegister;113 void const *pv = (uint8_t const *)&pVCpu->cpum.s.Guest.XState + pDesc->offRegister; 114 114 115 115 VMCPU_ASSERT_EMT(pVCpu); … … 134 134 { 135 135 PVMCPU pVCpu = (PVMCPU)pvUser; 136 void *pv = (uint8_t *)&pVCpu->cpum.s.Guest. pXStateR3+ pDesc->offRegister;136 void *pv = (uint8_t *)&pVCpu->cpum.s.Guest.XState + pDesc->offRegister; 137 137 138 138 VMCPU_ASSERT_EMT(pVCpu); … … 378 378 if (iReg < 16) 379 379 { 380 pValue->u256.DQWords.dqw0 = pVCpu->cpum.s.Guest. pXStateR3->x87.aXMM[iReg].uXmm;381 pValue->u256.DQWords.dqw1 = pVCpu->cpum.s.Guest. pXStateR3->u.YmmHi.aYmmHi[iReg].uXmm;380 pValue->u256.DQWords.dqw0 = pVCpu->cpum.s.Guest.XState.x87.aXMM[iReg].uXmm; 381 pValue->u256.DQWords.dqw1 = pVCpu->cpum.s.Guest.XState.u.YmmHi.aYmmHi[iReg].uXmm; 382 382 return VINF_SUCCESS; 383 383 } … … 400 400 { 401 401 RTUINT128U Val; 402 RTUInt128AssignAnd(&pVCpu->cpum.s.Guest. pXStateR3->x87.aXMM[iReg].uXmm,402 RTUInt128AssignAnd(&pVCpu->cpum.s.Guest.XState.x87.aXMM[iReg].uXmm, 403 403 RTUInt128AssignBitwiseNot(RTUInt128Assign(&Val, &pfMask->u256.DQWords.dqw0))); 404 RTUInt128AssignOr(&pVCpu->cpum.s.Guest. pXStateR3->u.YmmHi.aYmmHi[iReg].uXmm,404 RTUInt128AssignOr(&pVCpu->cpum.s.Guest.XState.u.YmmHi.aYmmHi[iReg].uXmm, 405 405 RTUInt128AssignAnd(RTUInt128Assign(&Val, &pValue->u128), &pfMask->u128)); 406 406 … … 666 666 Assert(pDesc->enmType == DBGFREGVALTYPE_R80); 667 667 668 PX86FXSTATE pFpuCtx = &pVCpu->cpum.s.Guest. CTX_SUFF(pXState)->x87;668 PX86FXSTATE pFpuCtx = &pVCpu->cpum.s.Guest.XState.x87; 669 669 unsigned iReg = (pFpuCtx->FSW >> 11) & 7; 670 670 iReg += pDesc->offRegister; -
trunk/src/VBox/VMM/VMMR3/CPUMR3CpuId.cpp
r91276 r91281 42 42 /** For sanity and avoid wasting hyper heap on buggy config / saved state. */ 43 43 #define CPUM_CPUID_MAX_LEAVES 2048 44 /* Max size we accept for the XSAVE area. */ 45 #define CPUM_MAX_XSAVE_AREA_SIZE 10240 44 /** Max size we accept for the XSAVE area. 45 * @see CPUMCTX::abXSave */ 46 #define CPUM_MAX_XSAVE_AREA_SIZE (0x4000 - 0x300) 46 47 /* Min size we accept for the XSAVE area. */ 47 48 #define CPUM_MIN_XSAVE_AREA_SIZE 0x240 … … 2458 2459 */ 2459 2460 PVMCPU pVCpu0 = pVM->apCpusR3[0]; 2461 AssertCompile(sizeof(pVCpu0->cpum.s.Guest.abXState) == CPUM_MAX_XSAVE_AREA_SIZE); 2460 2462 memset(&pVCpu0->cpum.s.Guest.aoffXState[0], 0xff, sizeof(pVCpu0->cpum.s.Guest.aoffXState)); 2461 2463 pVCpu0->cpum.s.Guest.aoffXState[XSAVE_C_X87_BIT] = 0; -
trunk/src/VBox/VMM/VMMR3/DBGFCoreWrite.cpp
r83122 r91281 380 380 pDbgfCpu->aXcr[0] = pCtx->aXcr[0]; 381 381 pDbgfCpu->aXcr[1] = pCtx->aXcr[1]; 382 AssertCompile(sizeof(pDbgfCpu->ext) == sizeof( *pCtx->pXStateR3));382 AssertCompile(sizeof(pDbgfCpu->ext) == sizeof(pCtx->XState)); 383 383 pDbgfCpu->cbExt = pVM->cpum.ro.GuestFeatures.cbMaxExtendedState; 384 384 if (RT_LIKELY(pDbgfCpu->cbExt)) 385 memcpy(&pDbgfCpu->ext, pCtx->pXStateR3, pDbgfCpu->cbExt);385 memcpy(&pDbgfCpu->ext, &pCtx->XState, pDbgfCpu->cbExt); 386 386 387 387 #undef DBGFCOPYSEL -
trunk/src/VBox/VMM/VMMRZ/CPUMRZA.asm
r87361 r91281 173 173 174 174 ; Load the guest XMM register values we already saved in HMR0VMXStartVMWrapXMM. 175 mov pXState, [pCpumCpu + CPUMCPU.Guest.pXStateR0]175 lea pXState, [pCpumCpu + CPUMCPU.Guest.XState] 176 176 movdqa xmm0, [pXState + X86FXSTATE.xmm0] 177 177 movdqa xmm1, [pXState + X86FXSTATE.xmm1] … … 256 256 mov xCX, dword [ebp + 8] 257 257 %endif 258 %ifdef IN_RING0 259 mov xCX, [xCX + CPUMCPU.Guest.pXStateR0] 260 %elifdef IN_RC 261 mov xCX, [xCX + CPUMCPU.Guest.pXStateRC] 262 %else 263 %error "Invalid context!" 264 %endif 258 lea xCX, [xCX + CPUMCPU.Guest.XState] 265 259 266 260 %ifdef IN_RC … … 336 330 mov xCX, dword [ebp + 8] 337 331 %endif 338 %ifdef IN_RING0 339 mov xCX, [xCX + CPUMCPU.Guest.pXStateR0] 340 %elifdef IN_RC 341 mov xCX, [xCX + CPUMCPU.Guest.pXStateRC] 342 %else 343 %error "Invalid context!" 344 %endif 332 lea xCX, [xCX + CPUMCPU.Guest.XState] 345 333 346 334 %ifdef IN_RC -
trunk/src/VBox/VMM/include/CPUMInternal.mac
r91271 r91281 213 213 .Guest.msrKERNELGSBASE resb 8 214 214 .Guest.uMsrPadding0 resb 8 215 216 alignb 8 217 .Guest.fExtrn resq 1 218 219 alignb 32 220 .Guest.aPaePdpes resq 4 221 215 222 alignb 8 216 223 .Guest.aXcr resq 2 217 224 .Guest.fXStateMask resq 1 218 .Guest.pXStateR0 RTR0PTR_RES 1 219 alignb 8 220 .Guest.pXStateR3 RTR3PTR_RES 1 225 .Guest.fUsedFpuGuest resb 1 221 226 alignb 8 222 227 .Guest.aoffXState resw 64 223 .Guest.fUsedFpuGuest resb 1224 alignb 8225 .Guest. fExtrn resq 1226 .Guest.aPaePdpes resq 4 227 alignb 8228 alignb 256 229 .Guest.abXState resb 0x4000-0x300 230 .Guest.XState EQU .Guest.abXState 231 232 alignb 4096 228 233 .Guest.hwvirt.svm.uMsrHSavePa resq 1 229 234 .Guest.hwvirt.svm.GCPhysVmcb resq 1 … … 606 611 ; 607 612 %ifdef IN_RING0 608 mov pXState, [pCpumCpu + CPUMCPU.Guest.pXStateR0]613 lea pXState, [pCpumCpu + CPUMCPU.Guest.XState] 609 614 %else 610 615 %error "Unsupported context!" … … 675 680 ; 676 681 %ifdef IN_RING0 677 mov pXState, [pCpumCpu + CPUMCPU.Guest.pXStateR0]682 lea pXState, [pCpumCpu + CPUMCPU.Guest.XState] 678 683 %else 679 684 %error "Unsupported context!" -
trunk/src/VBox/VMM/testcase/tstAsmStructsAsm-lst.sed
r82968 r91281 40 40 /<gap>/b member 41 41 /^\.[[:alpha:]_][[:alnum:]_.:]* res.*$/b member_two 42 /^\.[[:alpha:]_][[:alnum:]_.:]* EQU .*$/b member_two 42 43 /^\.[[:alpha:]_][[:alnum:]_.:]*:$/b member_alias 43 44 b error … … 79 80 :member_two 80 81 s/[:]* *res[bwdtq] .*$// 82 s/[:]* *EQU .*$// 81 83 s/$/ / 82 84 /^\.[[:alnum:]_.]* *$/!t error -
trunk/src/VBox/VMM/testcase/tstIEMCheckMc.cpp
r82968 r91281 704 704 #define IEM_MC_CALL_SSE_AIMPL_3(a_pfnAImpl, a0, a1, a2) \ 705 705 do { (void)fSseHost; (void)fSseWrite; CHK_CALL_ARG(a0, 0); CHK_CALL_ARG(a1, 1); CHK_CALL_ARG(a2, 2); (void)fMcBegin; } while (0) 706 #define IEM_MC_IMPLICIT_AVX_AIMPL_ARGS() do { IEM_MC_ARG_CONST(PX86XSAVEAREA, pXState, pVCpu->cpum.GstCtx.CTX_SUFF(pXState), 0); (void)fMcBegin; } while (0)706 #define IEM_MC_IMPLICIT_AVX_AIMPL_ARGS() do { IEM_MC_ARG_CONST(PX86XSAVEAREA, pXState, &pVCpu->cpum.GstCtx.XState, 0); (void)fMcBegin; } while (0) 707 707 #define IEM_MC_CALL_AVX_AIMPL_2(a_pfnAImpl, a1, a2) \ 708 708 do { (void)fAvxHost; (void)fAvxWrite; CHK_CALL_ARG(a1, 1); CHK_CALL_ARG(a2, 2); (void)fMcBegin; } while (0) -
trunk/src/VBox/VMM/testcase/tstVMStruct.h
r91016 r91281 192 192 /** @todo NSTVMX: add rest of hwvirt fields when code is more 193 193 * finalized. */ 194 GEN_CHECK_OFF(CPUMCTX, pXStateR0); 195 GEN_CHECK_OFF(CPUMCTX, pXStateR3); 194 GEN_CHECK_OFF(CPUMCTX, XState); 196 195 GEN_CHECK_OFF(CPUMCTX, rdi); 197 196 GEN_CHECK_OFF(CPUMCTX, rsi);
Note:
See TracChangeset
for help on using the changeset viewer.

