VirtualBox

Ignore:
Timestamp:
Dec 13, 2010 11:20:04 AM (14 years ago)
Author:
vboxsync
Message:

VMMSwitcher/PAEand32Bit,LegacyandAMD64: restore the Local APIC NMI vectors _after_ we restored the host CS

File:
1 edited

Legend:

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

    r33935 r34991  
    8080    push    cs                          ; allow for far return and restore cs correctly.
    8181    call    NAME(vmmR0HostToGuestAsm)
     82
     83%ifdef VBOX_WITH_VMMR0_DISABLE_LAPIC_NMI
     84    CPUM_FROM_CPUMCPU(edx)
     85    ; Restore blocked Local APIC NMI vectors
     86    ; Do this here to ensure the host CS is already restored
     87    mov     ecx, [edx + CPUM.fApicDisVectors]
     88    mov     edx, [edx + CPUM.pvApicBase]
     89    shr     ecx, 1
     90    jnc     gth_nolint0
     91    and     dword [edx + APIC_REG_LVT_LINT0], ~APIC_REG_LVT_MASKED
     92gth_nolint0:
     93    shr     ecx, 1
     94    jnc     gth_nolint1
     95    and     dword [edx + APIC_REG_LVT_LINT1], ~APIC_REG_LVT_MASKED
     96gth_nolint1:
     97    shr     ecx, 1
     98    jnc     gth_nopc
     99    and     dword [edx + APIC_REG_LVT_PC], ~APIC_REG_LVT_MASKED
     100gth_nopc:
     101    shr     ecx, 1
     102    jnc     gth_notherm
     103    and     dword [edx + APIC_REG_LVT_THMR], ~APIC_REG_LVT_MASKED
     104gth_notherm:
     105%endif
    82106
    83107%ifdef VBOX_WITH_STATISTICS
     
    9941018gth_debug_regs_no:
    9951019
    996 %ifdef VBOX_WITH_VMMR0_DISABLE_LAPIC_NMI
    997     mov     esi, edx
    998     CPUM_FROM_CPUMCPU(edx)
    999     ; Restore blocked Local APIC NMI vectors
    1000     mov     ebx, [edx + CPUM.pvApicBase]
    1001     mov     ecx, [edx + CPUM.fApicDisVectors]
    1002     mov     edx, esi
    1003     shr     ecx, 1
    1004     jnc     gth_nolint0
    1005     and     dword [ebx + APIC_REG_LVT_LINT0], ~APIC_REG_LVT_MASKED
    1006 gth_nolint0:
    1007     shr     ecx, 1
    1008     jnc     gth_nolint1
    1009     and     dword [ebx + APIC_REG_LVT_LINT1], ~APIC_REG_LVT_MASKED
    1010 gth_nolint1:
    1011     shr     ecx, 1
    1012     jnc     gth_nopc
    1013     and     dword [ebx + APIC_REG_LVT_PC], ~APIC_REG_LVT_MASKED
    1014 gth_nopc:
    1015     shr     ecx, 1
    1016     jnc     gth_notherm
    1017     and     dword [ebx + APIC_REG_LVT_THMR], ~APIC_REG_LVT_MASKED
    1018 gth_notherm:
    1019 %endif
    1020 
    10211020    ; restore general registers.
    10221021    mov     eax, edi                    ; restore return code. eax = return code !!
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