Changeset 47660 in vbox for trunk/src/VBox/VMM/VMMSwitcher/LegacyandAMD64.mac
- Timestamp:
- Aug 12, 2013 12:37:34 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMSwitcher/LegacyandAMD64.mac
r47652 r47660 445 445 mov esi, [rdx + CPUMCPU.fUseFlags] ; esi == use flags. 446 446 test esi, CPUM_SYNC_FPU_STATE 447 jz near gth_fpu_no447 jz near htg_fpu_no 448 448 449 449 %ifdef VBOX_WITH_CRASHDUMP_MAGIC … … 460 460 and dword [rdx + CPUMCPU.fUseFlags], ~CPUM_SYNC_FPU_STATE 461 461 462 gth_fpu_no:462 htg_fpu_no: 463 463 ; Check if we need to restore the guest debug state 464 test esi, CPUM_SYNC_DEBUG_ STATE465 jz near gth_debug_no464 test esi, CPUM_SYNC_DEBUG_REGS_GUEST | CPUM_SYNC_DEBUG_REGS_HYPER 465 jz htg_debug_done 466 466 467 467 %ifdef VBOX_WITH_CRASHDUMP_MAGIC 468 468 mov dword [rdx + CPUMCPU.Guest.dr + 4*8], 8 469 469 %endif 470 470 test esi, CPUM_SYNC_DEBUG_REGS_HYPER 471 jnz htg_debug_hyper 472 473 ; Guest values in DRx, letting the guest access them directly. 471 474 mov rax, qword [rdx + CPUMCPU.Guest.dr + 0*8] 472 475 mov dr0, rax … … 480 483 mov dr6, rax ; not required for AMD-V 481 484 482 and dword [rdx + CPUMCPU.fUseFlags], ~CPUM_SYNC_DEBUG_STATE 483 484 gth_debug_no: 485 and dword [rdx + CPUMCPU.fUseFlags], ~CPUM_SYNC_DEBUG_REGS_GUEST 486 or dword [rdx + CPUMCPU.fUseFlags], CPUM_USED_DEBUG_REGS_GUEST 487 jmp htg_debug_done 488 489 htg_debug_hyper: 490 ; Combined values in DRx, intercepting all accesses. 491 mov rax, qword [rdx + CPUMCPU.Hyper.dr + 0*8] 492 mov dr0, rax 493 mov rax, qword [rdx + CPUMCPU.Hyper.dr + 1*8] 494 mov dr1, rax 495 mov rax, qword [rdx + CPUMCPU.Hyper.dr + 2*8] 496 mov dr2, rax 497 mov rax, qword [rdx + CPUMCPU.Hyper.dr + 3*8] 498 mov dr3, rax 499 mov rax, qword [rdx + CPUMCPU.Hyper.dr + 6*8] 500 mov dr6, rax ; not required for AMD-V 501 502 and dword [rdx + CPUMCPU.fUseFlags], ~CPUM_SYNC_DEBUG_REGS_HYPER 503 or dword [rdx + CPUMCPU.fUseFlags], CPUM_USED_DEBUG_REGS_HYPER 504 505 htg_debug_done: 485 506 486 507 %ifdef VBOX_WITH_CRASHDUMP_MAGIC 487 508 mov dword [rdx + CPUMCPU.Guest.dr + 4*8], 9 488 509 %endif 510 511 ; 512 ; "Call" the specified helper function. 513 ; 489 514 490 515 ; parameter for all helper functions (pCtx) 491 516 DEBUG64_CHAR('9') 492 517 lea rsi, [rdx + CPUMCPU.Guest.fpu] 493 lea rax, [ gth_return wrt rip]518 lea rax, [htg_return wrt rip] 494 519 push rax ; return address 495 520 … … 505 530 jz NAME(HMRCTestSwitcher64) 506 531 mov eax, VERR_HM_INVALID_HM64ON32OP 507 gth_return:532 htg_return: 508 533 DEBUG64_CHAR('r') 509 534
Note:
See TracChangeset
for help on using the changeset viewer.