VirtualBox

Ignore:
Timestamp:
Dec 16, 2008 9:25:08 AM (16 years ago)
Author:
vboxsync
Message:

Save and restore the host's EFER msr in the 32->64 switcher.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMSwitcher/LegacyandAMD64.mac

    r15392 r15563  
    145145    mov     [edx + CPUMCPU.Host.cr4], eax
    146146
     147    ; save the host EFER msr
     148    mov     ebx, edx
     149    mov     ecx, MSR_K6_EFER
     150    rdmsr
     151    mov     [ebx + CPUMCPU.Host.efer], eax
     152    mov     [ebx + CPUMCPU.Host.efer + 4], edx
     153    mov     edx, ebx
     154
    147155    CPUM_FROM_CPUMCPU(edx)
    148156    ; Load new gdt so we can do a far jump after going into 64 bits mode
     
    440448    CPUMCPU_FROM_CPUM(edx)
    441449
    442        
     450    ; restore the host EFER
     451    mov     ebx, edx
     452    mov     ecx, MSR_K6_EFER
     453    mov     eax, [ebx + CPUMCPU.Host.efer]
     454    mov     edx, [ebx + CPUMCPU.Host.efer + 4]
     455    wrmsr
     456    mov     edx, ebx
     457   
    443458    ; activate host gdt and idt
    444459    lgdt    [edx + CPUMCPU.Host.gdtr]
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