VirtualBox

Changeset 20540 in vbox for trunk/src


Ignore:
Timestamp:
Jun 13, 2009 9:23:51 PM (16 years ago)
Author:
vboxsync
Message:

CPUMR0A.asm: More pushf;cli ... popf paranoia.

File:
1 edited

Legend:

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

    r20538 r20540  
    124124ENDPROC   cpumR0SaveHostRestoreGuestFPUState
    125125
     126
    126127%ifndef RT_ARCH_AMD64
    127128%ifdef  VBOX_WITH_64_BITS_GUESTS
     
    136137BEGINPROC cpumR0SaveHostFPUState
    137138    mov     xDX, dword [esp + 4]
     139    pushf                               ; The darwin kernel can get upset or upset things if an
     140    cli                                 ; interrupt occurs while we're doing fxsave/fxrstor/cr0.
    138141
    139142    ; Switch the state.
     
    148151
    149152    mov     cr0, xCX                    ; and restore old CR0 again ;; @todo optimize this.
     153    popf
    150154    xor     eax, eax
    151155    ret
     
    154158%endif
    155159%endif
     160
    156161
    157162;;
     
    295300%else
    296301    mov     xCX, dword [esp + 4]
     302%endif
     303    pushf                               ; Just to be on the safe side.
     304    cli
    297305%ifdef VBOX_WITH_HYBRID_32BIT_KERNEL
    298306    cmp     byte [NAME(g_fCPUMIs64bitHost)], 0
     
    302310.legacy_mode:
    303311%endif ; VBOX_WITH_HYBRID_32BIT_KERNEL
    304 %endif
    305312
    306313    ;
     
    317324
    318325.done:
     326    popf
    319327    ret
    320328
     
    352360%else
    353361    mov     xCX, dword [esp + 4]
     362%endif
     363    pushf                               ; Just to be on the safe side.
     364    cli
    354365%ifdef VBOX_WITH_HYBRID_32BIT_KERNEL
    355366    cmp     byte [NAME(g_fCPUMIs64bitHost)], 0
     
    359370.legacy_mode:
    360371%endif ; VBOX_WITH_HYBRID_32BIT_KERNEL
    361 %endif
    362372
    363373    ;
     
    374384
    375385.done:
     386    popf
    376387    ret
    377388
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