VirtualBox

Changeset 9161 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
May 27, 2008 1:56:46 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
31299
Message:

Have to save and restore MSR_K8_FS_BASE as well in the VMXStartVM/VMXResumeVM calls (MSR_K8_GS_BASE was already preserved). This fixes a crash upon returning to user land in the solaris pthreads code.

File:
1 edited

Legend:

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

    r9046 r9161  
    107107    mov     %2, ds
    108108    push    %1
     109
     110    ; Special case for FS; Windows and Linux either don't use it or restore it when leaving kernel mode, Solaris OTOH doesn't and we must save it.
     111    push    rcx
     112    mov     ecx, MSR_K8_FS_BASE
     113    rdmsr
     114    pop     rcx
     115    push    rdx
     116    push    rax
    109117    push    fs
     118
    110119    ; Special case for GS; OSes typically use swapgs to reset the hidden base register for GS on entry into the kernel. The same happens on exit
    111120    push    rcx
     
    127136    wrmsr
    128137    pop     rcx
     138
     139    pop     fs
     140    pop     rax
     141    pop     rdx
     142    push    rcx
     143    mov     ecx, MSR_K8_FS_BASE
     144    wrmsr
     145    pop     rcx
    129146    ; Now it's safe to step again
    130147
    131     pop     fs
    132148    pop     %1
    133149    mov     ds, %2
Note: See TracChangeset for help on using the changeset viewer.

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