VirtualBox

Changeset 54496 in vbox for trunk/src/VBox/VMM/VMMSwitcher


Ignore:
Timestamp:
Feb 25, 2015 2:33:18 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
98605
Message:

VMMSwitcher: test code for disabling the Extended LVT APIC registers on newer AMD boxes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMSwitcher/AMD64andLegacy.mac

    r54474 r54496  
    131131    and     dword [r8 + APIC_REG_LVT_CMCI], ~APIC_REG_LVT_MASKED
    132132gth64_nocmci:
     133    shr     ecx, 1
     134    jnc     gth64_noeilvt0
     135    and     dword [r8 + APIC_REG_EILVT0], ~APIC_REG_LVT_MASKED
     136gth64_noeilvt0:
     137    shr     ecx, 1
     138    jnc     gth64_noeilvt1
     139    and     dword [r8 + APIC_REG_EILVT1], ~APIC_REG_LVT_MASKED
     140gth64_noeilvt1:
     141    shr     ecx, 1
     142    jnc     gth64_noeilvt2
     143    and     dword [r8 + APIC_REG_EILVT2], ~APIC_REG_LVT_MASKED
     144gth64_noeilvt2:
     145    shr     ecx, 1
     146    jnc     gth64_noeilvt3
     147    and     dword [r8 + APIC_REG_EILVT3], ~APIC_REG_LVT_MASKED
     148gth64_noeilvt3:
     149
    133150    jmp     gth64_apic_done
    134151
     
    376393    mov     eax, [rbx + APIC_REG_VERSION]
    377394    shr     eax, 16
     395    push    rax
    378396    cmp     al, 5
    379397    jb      htg_notherm
     
    399417    mov     eax, [rbx + APIC_REG_LVT_THMR] ; write completion
    400418htg_notherm:
     419    pop     rax
     420    test    ah, ah
     421    jns     htg_noeilvt
     422
     423    ; AMD Extended LVT registers
     424    mov     eax, [rbx + APIC_REG_EILVT0]
     425    mov     ecx, eax
     426    and     ecx, (APIC_REG_LVT_MASKED | APIC_REG_LVT_MODE_MASK)
     427    cmp     ecx, APIC_REG_LVT_MODE_NMI
     428    jne     htg_noeilvt0
     429    or      edi, 0x20
     430    or      eax, APIC_REG_LVT_MASKED
     431    mov     [rbx + APIC_REG_EILVT0], eax
     432    mov     eax, [rbx + APIC_REG_EILVT0] ; write completion
     433htg_noeilvt0:
     434    mov     eax, [rbx + APIC_REG_EILVT1]
     435    mov     ecx, eax
     436    and     ecx, (APIC_REG_LVT_MASKED | APIC_REG_LVT_MODE_MASK)
     437    cmp     ecx, APIC_REG_LVT_MODE_NMI
     438    jne     htg_noeilvt1
     439    or      edi, 0x40
     440    or      eax, APIC_REG_LVT_MASKED
     441    mov     [rbx + APIC_REG_EILVT1], eax
     442    mov     eax, [rbx + APIC_REG_EILVT1] ; write completion
     443htg_noeilvt1:
     444    mov     eax, [rbx + APIC_REG_EILVT2]
     445    mov     ecx, eax
     446    and     ecx, (APIC_REG_LVT_MASKED | APIC_REG_LVT_MODE_MASK)
     447    cmp     ecx, APIC_REG_LVT_MODE_NMI
     448    jne     htg_noeilvt2
     449    or      edi, 0x80
     450    or      eax, APIC_REG_LVT_MASKED
     451    mov     [rbx + APIC_REG_EILVT2], eax
     452    mov     eax, [rbx + APIC_REG_EILVT2] ; write completion
     453htg_noeilvt2:
     454    mov     eax, [rbx + APIC_REG_EILVT3]
     455    mov     ecx, eax
     456    and     ecx, (APIC_REG_LVT_MASKED | APIC_REG_LVT_MODE_MASK)
     457    cmp     ecx, APIC_REG_LVT_MODE_NMI
     458    jne     htg_noeilvt
     459    or      edi, 0x100
     460    or      eax, APIC_REG_LVT_MASKED
     461    mov     [rbx + APIC_REG_EILVT3], eax
     462    mov     eax, [rbx + APIC_REG_EILVT3] ; write completion
     463
     464htg_noeilvt:
    401465    mov     [rdx + r8 + CPUMCPU.fApicDisVectors], edi
    402466    jmp     htg_apic_done
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