VirtualBox

Changeset 45341 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 4, 2013 3:52:10 PM (12 years ago)
Author:
vboxsync
Message:

VMM/VMMR0: HM bits, fix CR2 handling in the switcher.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/HMR0Mixed.mac

    r43387 r45341  
    131131
    132132    ; Restore CR2
    133     mov     ebx, [xSI + CPUMCTX.cr2]
     133    mov     xBX, [xSI + CPUMCTX.cr2]
     134    mov     xDX, cr2
     135    cmp     xBX, xDX
     136    je      .skipcr2write32
    134137    mov     cr2, xBX
    135138
     139.skipcr2write32:
    136140    mov     eax, VMX_VMCS_HOST_RSP
    137141    vmwrite xAX, xSP
     
    185189    mov     [ss:xDI + CPUMCTX.esi], esi
    186190    mov     [ss:xDI + CPUMCTX.ebp], ebp
     191%ifndef VBOX_WITH_OLD_VTX_CODE
     192    mov     xAX, cr2
     193    mov     [ss:xDI + CPUMCTX.cr2], xAX
     194%endif
     195
    187196%ifdef RT_ARCH_AMD64
    188197    pop     xAX                                 ; the guest edi we pushed above
     
    233242.no_cached_reads:
    234243
     244%ifdef VBOX_WITH_OLD_VTX_CODE
    235245    ; Save CR2 for EPT
    236246    mov     xAX, cr2
    237247    mov     [ss:xDX + VMCSCACHE.cr2], xAX
     248%endif
    238249%endif
    239250
     
    440451    ; Restore CR2
    441452    mov     rbx, qword [xSI + CPUMCTX.cr2]
     453    mov     rdx, cr2
     454    cmp     rbx, rdx
     455    je      .skipcr2write
    442456    mov     cr2, rbx
    443457
     458.skipcr2write:
    444459    mov     eax, VMX_VMCS_HOST_RSP
    445460    vmwrite xAX, xSP
     
    509524    mov     qword [xDI + CPUMCTX.r14], r14
    510525    mov     qword [xDI + CPUMCTX.r15], r15
     526%ifndef VBOX_WITH_OLD_VTX_CODE
     527    mov     rax, cr2
     528    mov     qword [xDI + CPUMCTX.cr2], rax
     529%endif
    511530
    512531    pop     xAX                                 ; the guest edi we pushed above
     
    563582.no_cached_reads:
    564583
     584%ifdef VBOX_WITH_OLD_VTX_CODE
    565585    ; Save CR2 for EPT
    566586    mov     xAX, cr2
    567587    mov     [xDX + VMCSCACHE.cr2], xAX
     588%endif
    568589%endif
    569590
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