VirtualBox

Changeset 20535 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jun 13, 2009 8:58:29 PM (16 years ago)
Author:
vboxsync
Message:

CPUMR0A.asm: must disable interrupt while messing with CR0 on darwin.

File:
1 edited

Legend:

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

    r16113 r20535  
    8282    mov     xDX, dword [esp + 4]
    8383%endif
     84    pushf                               ; The darwin kernel can get upset or upset things if an
     85    cli                                 ; interrupt occurs while we're doing fxsave/fxrstor/cr0.
    8486
    8587    ; Switch the state.
     
    104106.done:
    105107    mov     cr0, xCX                    ; and restore old CR0 again ;; @todo optimize this.
    106 .fpu_not_used:
     108    popf
    107109    xor     eax, eax
    108110    ret
     
    176178    jz short .fpu_not_used
    177179
     180    pushf                               ; The darwin kernel can get upset or upset things if an
     181    cli                                 ; interrupt occurs while we're doing fxsave/fxrstor/cr0.
     182
    178183    mov     xAX, cr0                    ; Make sure it's safe to access the FPU state.
    179184    mov     xCX, xAX                    ; save old CR0
     
    195200    mov     cr0, xCX                    ; and restore old CR0 again ;; @todo optimize this.
    196201    and     dword [xDX + CPUMCPU.fUseFlags], ~CPUM_USED_FPU
     202    popf
    197203.fpu_not_used:
    198204    xor     eax, eax
     
    237243    jz short .fpu_not_used
    238244
     245    pushf                               ; The darwin kernel can get upset or upset things if an
     246    cli                                 ; interrupt occurs while we're doing fxsave/fxrstor/cr0.
     247
    239248    mov     xAX, cr0
    240249    mov     xCX, xAX                    ; save old CR0
     
    255264    mov     cr0, xCX                    ; and restore old CR0 again
    256265    and     dword [xDX + CPUMCPU.fUseFlags], ~CPUM_USED_FPU
     266    popf
    257267.fpu_not_used:
    258268    xor     eax, eax
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