Changeset 9815 in vbox for trunk/src/VBox/VMM/VMMR0
- Timestamp:
- Jun 19, 2008 11:14:38 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HWACCMR0A.asm
r9814 r9815 77 77 78 78 ; Save a guest and load the corresponding host MSR (trashes rdx & rcx) 79 %macro LOADHOSTMSR 279 %macro LOADHOSTMSR 1 80 80 mov rcx, %1 81 rdmsr82 mov qword [xSI + %2], rax83 81 pop rax 84 82 pop rdx … … 575 573 pop xSI ; pCtx (needed in rsi by the macros below) 576 574 577 ; Save the guest LSTAR, CSTAR, SFMASK & KERNEL_GSBASE MSRs and restore the hostMSRs575 ; Restore the host LSTAR, CSTAR, SFMASK & KERNEL_GSBASE MSRs 578 576 ; @todo use the automatic load feature for MSRs 579 LOADHOSTMSR MSR_K8_KERNEL_GS_BASE , CPUMCTX.msrKERNELGSBASE580 LOADHOSTMSR MSR_K8_SF_MASK , CPUMCTX.msrSFMASK581 LOADHOSTMSR MSR_K8_CSTAR , CPUMCTX.msrCSTAR582 LOADHOSTMSR MSR_K8_LSTAR , CPUMCTX.msrLSTAR577 LOADHOSTMSR MSR_K8_KERNEL_GS_BASE 578 LOADHOSTMSR MSR_K8_SF_MASK 579 LOADHOSTMSR MSR_K8_CSTAR 580 LOADHOSTMSR MSR_K8_LSTAR 583 581 584 582 ; Restore segment registers … … 608 606 pop xSI ; pCtx (needed in rsi by the macros below) 609 607 610 ; Save the guest LSTAR, CSTAR, SFMASK & KERNEL_GSBASE MSRs and restore the hostMSRs608 ; Restore the host LSTAR, CSTAR, SFMASK & KERNEL_GSBASE MSRs 611 609 ; @todo use the automatic load feature for MSRs 612 LOADHOSTMSR MSR_K8_KERNEL_GS_BASE , CPUMCTX.msrKERNELGSBASE613 LOADHOSTMSR MSR_K8_SF_MASK , CPUMCTX.msrSFMASK614 LOADHOSTMSR MSR_K8_CSTAR , CPUMCTX.msrCSTAR615 LOADHOSTMSR MSR_K8_LSTAR , CPUMCTX.msrLSTAR610 LOADHOSTMSR MSR_K8_KERNEL_GS_BASE 611 LOADHOSTMSR MSR_K8_SF_MASK 612 LOADHOSTMSR MSR_K8_CSTAR 613 LOADHOSTMSR MSR_K8_LSTAR 616 614 617 615 ; Restore segment registers … … 635 633 pop xSI ; pCtx (needed in rsi by the macros below) 636 634 637 ; Save the guest LSTAR, CSTAR, SFMASK & KERNEL_GSBASE MSRs and restore the hostMSRs635 ; Restore the host LSTAR, CSTAR, SFMASK & KERNEL_GSBASE MSRs 638 636 ; @todo use the automatic load feature for MSRs 639 LOADHOSTMSR MSR_K8_KERNEL_GS_BASE , CPUMCTX.msrKERNELGSBASE640 LOADHOSTMSR MSR_K8_SF_MASK , CPUMCTX.msrSFMASK641 LOADHOSTMSR MSR_K8_CSTAR , CPUMCTX.msrCSTAR642 LOADHOSTMSR MSR_K8_LSTAR , CPUMCTX.msrLSTAR637 LOADHOSTMSR MSR_K8_KERNEL_GS_BASE 638 LOADHOSTMSR MSR_K8_SF_MASK 639 LOADHOSTMSR MSR_K8_CSTAR 640 LOADHOSTMSR MSR_K8_LSTAR 643 641 644 642 ; Restore segment registers
Note:
See TracChangeset
for help on using the changeset viewer.