VirtualBox

Changeset 49362 in vbox for trunk


Ignore:
Timestamp:
Nov 1, 2013 12:45:13 PM (11 years ago)
Author:
vboxsync
Message:

VMMRCA.asm/vmmRcSafeMsr*: See if making sure interrupts are disabled while reading/writing MSRs helps with the solaris host reboots.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMRC/VMMRCA.asm

    r49145 r49362  
    233233    push    ebp
    234234    mov     ebp, esp
    235     pushad
    236 
    237     mov     ecx, [ebp + 8]              ; the MSR to read.
     235    pushf
     236    cli
     237
     238    mov     ecx, [ebp + 8]              ; The MSR to read.
    238239    mov     eax, 0deadbeefh
    239240    mov     edx, 0deadbeefh
     
    246247    mov     [ecx + 4], edx
    247248
    248     popad
     249    popf
    249250    mov     eax, 1
    250251    leave
     
    252253
    253254.trapped:
    254     popad
     255    popf
    255256    mov     eax, 0
    256257    leave
    257258    ret
    258259ENDPROC vmmRCSafeMsrRead
     260
     261
     262;;
     263; Safely writes an MSR.
     264; @returns  boolean
     265; @param    uMsr        The MSR to red.
     266; @param    u64Value    The value to write.
     267;
     268GLOBALNAME vmmRCSafeMsrWrite
     269    push    ebp
     270    mov     ebp, esp
     271    pushf
     272    cli
     273
     274    mov     ecx, [ebp + 8]              ; The MSR to write to.
     275    mov     eax, [ebp + 12]             ; The value to write.
     276    mov     edx, [ebp + 16]
     277
     278TRPM_GP_HANDLER NAME(TRPMRCTrapHyperHandlerSetEIP), .trapped
     279    wrmsr
     280
     281    popf
     282    mov     eax, 1
     283    leave
     284    ret
     285
     286.trapped:
     287    popf
     288    mov     eax, 0
     289    leave
     290    ret
     291ENDPROC vmmRCSafeMsrWrite
    259292
    260293
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