VirtualBox

Changeset 37094 in vbox


Ignore:
Timestamp:
May 16, 2011 6:56:22 AM (14 years ago)
Author:
vboxsync
Message:

tabs

Location:
trunk/src/VBox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Serial/DevSerial.cpp

    r35772 r37094  
    278278        f->count++;
    279279    else if (fifo == XMIT_FIFO) /* need to at least adjust tail to maintain pipe state consistency */
    280         ++f->tail;
     280        ++f->tail;
    281281    else if (fifo == RECV_FIFO)
    282282        s->lsr |= UART_LSR_OE;
  • trunk/src/VBox/VMM/VMMR3/PATMA.asm

    r35348 r37094  
    7575    DD      PATM_ALLPATCHCALLS
    7676    DD      0
    77     DD      PATM_PERPATCHCALLS
     77    DD      PATM_PERPATCHCALLS
    7878    DD      0
    7979    DD      PATM_INTERRUPTFLAG
     
    124124    DD      0
    125125    DD      PATMClearPIF_End - PATMClearPIF_Start
    126         DD              1
     126    DD      1
    127127    DD      PATM_INTERRUPTFLAG
    128128    DD      0
     
    138138    pushf
    139139
    140         test    dword [ss:PATM_VMFLAGS], X86_EFL_IF
    141         jz              PATMClearInhibitIRQFaultIF0_Fault
     140    test    dword [ss:PATM_VMFLAGS], X86_EFL_IF
     141    jz      PATMClearInhibitIRQFaultIF0_Fault
    142142
    143143    ; if interrupts are pending, then we must go back to the host context to handle them!
     
    177177    DD      0
    178178    DD      PATMClearInhibitIRQFaultIF0_End - PATMClearInhibitIRQFaultIF0_Start
    179         DD              12
     179    DD      12
    180180    DD      PATM_INTERRUPTFLAG
    181181    DD      0
     
    213213    pushf
    214214
    215         test    dword [ss:PATM_VMFLAGS], X86_EFL_IF
    216         jz              PATMClearInhibitIRQContIF0_Continue
     215    test    dword [ss:PATM_VMFLAGS], X86_EFL_IF
     216    jz      PATMClearInhibitIRQContIF0_Continue
    217217
    218218    ; if interrupts are pending, then we must go back to the host context to handle them!
     
    247247    DD      0
    248248    DD      PATMClearInhibitIRQContIF0_End - PATMClearInhibitIRQContIF0_Start
    249         DD              11
     249    DD      11
    250250    DD      PATM_INTERRUPTFLAG
    251251    DD      0
     
    416416PATMTrapNoRing1:
    417417
    418         ; correct EFLAGS on the stack to include the current IOPL
    419         push    eax
    420         mov     eax, dword [ss:PATM_VMFLAGS]
    421         and     eax, X86_EFL_IOPL
    422         and     dword [esp+16], ~X86_EFL_IOPL           ; esp+16 = eflags = esp+8+4(efl)+4(eax)
    423         or      dword [esp+16], eax
    424     pop         eax
     418    ; correct EFLAGS on the stack to include the current IOPL
     419    push    eax
     420    mov     eax, dword [ss:PATM_VMFLAGS]
     421    and     eax, X86_EFL_IOPL
     422    and     dword [esp+16], ~X86_EFL_IOPL       ; esp+16 = eflags = esp+8+4(efl)+4(eax)
     423    or      dword [esp+16], eax
     424    pop     eax
    425425
    426426    popf
     
    501501PATMTrapErrorCodeNoRing1:
    502502
    503         ; correct EFLAGS on the stack to include the current IOPL
    504         push    eax
    505         mov     eax, dword [ss:PATM_VMFLAGS]
    506         and     eax, X86_EFL_IOPL
    507         and     dword [esp+20], ~X86_EFL_IOPL           ; esp+20 = eflags = esp+8+4(efl)+4(error code)+4(eax)
    508         or      dword [esp+20], eax
    509     pop         eax
     503    ; correct EFLAGS on the stack to include the current IOPL
     504    push    eax
     505    mov     eax, dword [ss:PATM_VMFLAGS]
     506    and     eax, X86_EFL_IOPL
     507    and     dword [esp+20], ~X86_EFL_IOPL       ; esp+20 = eflags = esp+8+4(efl)+4(error code)+4(eax)
     508    or      dword [esp+20], eax
     509    pop     eax
    510510
    511511    popf
     
    586586PATMIntNoRing1:
    587587
    588         ; correct EFLAGS on the stack to include the current IOPL
    589         push    eax
    590         mov     eax, dword [ss:PATM_VMFLAGS]
    591         and     eax, X86_EFL_IOPL
    592         and     dword [esp+16], ~X86_EFL_IOPL           ; esp+16 = eflags = esp+8+4(efl)+4(eax)
    593         or      dword [esp+16], eax
    594     pop         eax
     588    ; correct EFLAGS on the stack to include the current IOPL
     589    push    eax
     590    mov     eax, dword [ss:PATM_VMFLAGS]
     591    and     eax, X86_EFL_IOPL
     592    and     dword [esp+16], ~X86_EFL_IOPL       ; esp+16 = eflags = esp+8+4(efl)+4(eax)
     593    or      dword [esp+16], eax
     594    pop     eax
    595595
    596596    popf
     
    668668PATMIntNoRing1_ErrorCode:
    669669
    670         ; correct EFLAGS on the stack to include the current IOPL
    671         push    eax
    672         mov     eax, dword [ss:PATM_VMFLAGS]
    673         and     eax, X86_EFL_IOPL
    674         and     dword [esp+20], ~X86_EFL_IOPL           ; esp+20 = eflags = esp+8+4(efl)+4(eax)+4(error code)
    675         or      dword [esp+20], eax
    676     pop         eax
     670    ; correct EFLAGS on the stack to include the current IOPL
     671    push    eax
     672    mov     eax, dword [ss:PATM_VMFLAGS]
     673    and     eax, X86_EFL_IOPL
     674    and     dword [esp+20], ~X86_EFL_IOPL       ; esp+20 = eflags = esp+8+4(efl)+4(eax)+4(error code)
     675    or      dword [esp+20], eax
     676    pop     eax
    677677
    678678    popf
     
    12521252
    12531253iret_continue :
    1254         ; This section must *always* be executed (!!)
    1255         ; Extract the IOPL from the return flags, save them to our virtual flags and
    1256         ; put them back to zero
     1254    ; This section must *always* be executed (!!)
     1255    ; Extract the IOPL from the return flags, save them to our virtual flags and
     1256    ; put them back to zero
    12571257    ; @note we assume iretd doesn't fault!!!
    1258         push    eax
    1259         mov     eax, dword [esp+16]
    1260         and     eax, X86_EFL_IOPL
    1261         and     dword [ss:PATM_VMFLAGS], ~X86_EFL_IOPL
    1262         or      dword [ss:PATM_VMFLAGS], eax
    1263     pop         eax
    1264         and             dword [esp+12], ~X86_EFL_IOPL
     1258    push    eax
     1259    mov     eax, dword [esp+16]
     1260    and     eax, X86_EFL_IOPL
     1261    and     dword [ss:PATM_VMFLAGS], ~X86_EFL_IOPL
     1262    or      dword [ss:PATM_VMFLAGS], eax
     1263    pop     eax
     1264    and     dword [esp+12], ~X86_EFL_IOPL
    12651265
    12661266    ; Set IF again; below we make sure this won't cause problems.
     
    13061306    or      dword [esp+8], 1
    13071307
    1308         ; This section must *always* be executed (!!)
    1309         ; Extract the IOPL from the return flags, save them to our virtual flags and
    1310         ; put them back to zero
    1311         push    eax
    1312         mov     eax, dword [esp+16]
    1313         and     eax, X86_EFL_IOPL
    1314         and     dword [ss:PATM_VMFLAGS], ~X86_EFL_IOPL
    1315         or      dword [ss:PATM_VMFLAGS], eax
    1316     pop         eax
    1317         and             dword [esp+12], ~X86_EFL_IOPL
     1308    ; This section must *always* be executed (!!)
     1309    ; Extract the IOPL from the return flags, save them to our virtual flags and
     1310    ; put them back to zero
     1311    push    eax
     1312    mov     eax, dword [esp+16]
     1313    and     eax, X86_EFL_IOPL
     1314    and     dword [ss:PATM_VMFLAGS], ~X86_EFL_IOPL
     1315    or      dword [ss:PATM_VMFLAGS], eax
     1316    pop     eax
     1317    and     dword [esp+12], ~X86_EFL_IOPL
    13181318
    13191319    ; Clear IF
     
    24422442    mov     dword [ss:PATM_INTERRUPTFLAG], 0
    24432443    pushf
    2444         test    dword [ss:PATM_VMFLAGS], X86_EFL_IF
    2445         jnz             PATMCheckIF_Safe
    2446         nop
    2447 
    2448         ; IF=0 -> unsafe, so we must call the duplicated function (which we don't do here)
    2449         popf
    2450     mov     dword [ss:PATM_INTERRUPTFLAG], 1
    2451         jmp     PATMCheckIF_End
     2444    test    dword [ss:PATM_VMFLAGS], X86_EFL_IF
     2445    jnz     PATMCheckIF_Safe
     2446    nop
     2447
     2448    ; IF=0 -> unsafe, so we must call the duplicated function (which we don't do here)
     2449    popf
     2450    mov     dword [ss:PATM_INTERRUPTFLAG], 1
     2451    jmp     PATMCheckIF_End
    24522452
    24532453PATMCheckIF_Safe:
     
    24652465    pop     eax
    24662466%endif
    2467         popf
    2468     mov     dword [ss:PATM_INTERRUPTFLAG], 1
    2469         ; IF=1 -> we can safely jump back to the original instruction
     2467    popf
     2468    mov     dword [ss:PATM_INTERRUPTFLAG], 1
     2469    ; IF=1 -> we can safely jump back to the original instruction
    24702470    DB      0xE9
    24712471PATMCheckIF_Jump:
     
    25092509    mov     dword [ss:PATM_INTERRUPTFLAG], 0
    25102510    pushf
    2511         test    dword [ss:PATM_VMFLAGS], X86_EFL_IF
    2512         jnz             PATMJumpToGuest_IF1_Safe
    2513         nop
    2514 
    2515         ; IF=0 -> unsafe, so fault
    2516         popf
    2517     mov     dword [ss:PATM_INTERRUPTFLAG], 1
    2518         PATM_INT3
     2511    test    dword [ss:PATM_VMFLAGS], X86_EFL_IF
     2512    jnz     PATMJumpToGuest_IF1_Safe
     2513    nop
     2514
     2515    ; IF=0 -> unsafe, so fault
     2516    popf
     2517    mov     dword [ss:PATM_INTERRUPTFLAG], 1
     2518    PATM_INT3
    25192519
    25202520PATMJumpToGuest_IF1_Safe:
    2521         ; IF=1 -> we can safely jump back to the original instruction
    2522         popf
     2521    ; IF=1 -> we can safely jump back to the original instruction
     2522    popf
    25232523    mov     dword [ss:PATM_INTERRUPTFLAG], 1
    25242524    DB      0xE9
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