VirtualBox

Changeset 9815 in vbox for trunk/src/VBox/VMM/VMMR0


Ignore:
Timestamp:
Jun 19, 2008 11:14:38 AM (17 years ago)
Author:
vboxsync
Message:

Removed unnecessary guest msr saving.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/HWACCMR0A.asm

    r9814 r9815  
    7777
    7878  ; Save a guest and load the corresponding host MSR (trashes rdx & rcx)
    79   %macro LOADHOSTMSR 2
     79  %macro LOADHOSTMSR 1
    8080    mov     rcx, %1
    81     rdmsr
    82     mov     qword [xSI + %2], rax
    8381    pop     rax
    8482    pop     rdx
     
    575573    pop     xSI         ; pCtx (needed in rsi by the macros below)
    576574
    577     ; Save the guest LSTAR, CSTAR, SFMASK & KERNEL_GSBASE MSRs and restore the host MSRs
     575    ; Restore the host LSTAR, CSTAR, SFMASK & KERNEL_GSBASE MSRs
    578576    ; @todo use the automatic load feature for MSRs
    579     LOADHOSTMSR MSR_K8_KERNEL_GS_BASE, CPUMCTX.msrKERNELGSBASE
    580     LOADHOSTMSR MSR_K8_SF_MASK, CPUMCTX.msrSFMASK
    581     LOADHOSTMSR MSR_K8_CSTAR, CPUMCTX.msrCSTAR
    582     LOADHOSTMSR MSR_K8_LSTAR, CPUMCTX.msrLSTAR
     577    LOADHOSTMSR MSR_K8_KERNEL_GS_BASE
     578    LOADHOSTMSR MSR_K8_SF_MASK
     579    LOADHOSTMSR MSR_K8_CSTAR
     580    LOADHOSTMSR MSR_K8_LSTAR
    583581
    584582    ; Restore segment registers
     
    608606    pop     xSI         ; pCtx (needed in rsi by the macros below)
    609607
    610     ; Save the guest LSTAR, CSTAR, SFMASK & KERNEL_GSBASE MSRs and restore the host MSRs
     608    ; Restore the host LSTAR, CSTAR, SFMASK & KERNEL_GSBASE MSRs
    611609    ; @todo use the automatic load feature for MSRs
    612     LOADHOSTMSR MSR_K8_KERNEL_GS_BASE, CPUMCTX.msrKERNELGSBASE
    613     LOADHOSTMSR MSR_K8_SF_MASK, CPUMCTX.msrSFMASK
    614     LOADHOSTMSR MSR_K8_CSTAR, CPUMCTX.msrCSTAR
    615     LOADHOSTMSR MSR_K8_LSTAR, CPUMCTX.msrLSTAR
     610    LOADHOSTMSR MSR_K8_KERNEL_GS_BASE
     611    LOADHOSTMSR MSR_K8_SF_MASK
     612    LOADHOSTMSR MSR_K8_CSTAR
     613    LOADHOSTMSR MSR_K8_LSTAR
    616614
    617615    ; Restore segment registers
     
    635633    pop     xSI         ; pCtx (needed in rsi by the macros below)
    636634
    637     ; Save the guest LSTAR, CSTAR, SFMASK & KERNEL_GSBASE MSRs and restore the host MSRs
     635    ; Restore the host LSTAR, CSTAR, SFMASK & KERNEL_GSBASE MSRs
    638636    ; @todo use the automatic load feature for MSRs
    639     LOADHOSTMSR MSR_K8_KERNEL_GS_BASE, CPUMCTX.msrKERNELGSBASE
    640     LOADHOSTMSR MSR_K8_SF_MASK, CPUMCTX.msrSFMASK
    641     LOADHOSTMSR MSR_K8_CSTAR, CPUMCTX.msrCSTAR
    642     LOADHOSTMSR MSR_K8_LSTAR, CPUMCTX.msrLSTAR
     637    LOADHOSTMSR MSR_K8_KERNEL_GS_BASE
     638    LOADHOSTMSR MSR_K8_SF_MASK
     639    LOADHOSTMSR MSR_K8_CSTAR
     640    LOADHOSTMSR MSR_K8_LSTAR
    643641
    644642    ; Restore segment registers
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette