VirtualBox

Changeset 45711 in vbox


Ignore:
Timestamp:
Apr 24, 2013 4:24:19 PM (12 years ago)
Author:
vboxsync
Message:

VMM/VMMRC: Fix 64-bit guests on 32-bit hosts for the new VT-x code.

File:
1 edited

Legend:

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

    r45474 r45711  
    229229    ; */
    230230
     231%ifndef VBOX_WITH_AUTO_MSR_LOAD_RESTORE
    231232    ; Load the guest LSTAR, CSTAR, SFMASK & KERNEL_GSBASE MSRs
    232     ;; @todo use the automatic load feature for MSRs
    233233    LOADGUESTMSR MSR_K8_LSTAR,          CPUMCTX.msrLSTAR
    234234    LOADGUESTMSR MSR_K6_STAR,           CPUMCTX.msrSTAR
    235235    LOADGUESTMSR MSR_K8_SF_MASK,        CPUMCTX.msrSFMASK
     236%endif
     237    ; Kernel GS Base is special, we need to manually load/store it, see @bugref{6208}.
    236238    LOADGUESTMSR MSR_K8_KERNEL_GS_BASE, CPUMCTX.msrKERNELGSBASE
    237239
     
    245247    ; Restore CR2
    246248    mov     rbx, qword [rsi + CPUMCTX.cr2]
     249    mov     rdx, cr2
     250    cmp     rdx, rbx
     251    je      .skipcr2write64
    247252    mov     cr2, rbx
    248253
     254.skipcr2write64:
    249255    mov     eax, VMX_VMCS_HOST_RSP
    250256    vmwrite rax, rsp
     
    296302    mov     qword [rdi + CPUMCTX.r14], r14
    297303    mov     qword [rdi + CPUMCTX.r15], r15
     304%ifndef VBOX_WITH_OLD_VTX_CODE
     305    mov     rax, cr2
     306    mov     qword [rdi + CPUMCTX.cr2], rax
     307%endif
    298308
    299309    pop     rax                                 ; the guest edi we pushed above
     
    302312    pop     rsi         ; pCtx (needed in rsi by the macros below)
    303313
    304     ;; @todo use the automatic load feature for MSRs
     314%ifndef VBOX_WITH_AUTO_MSR_LOAD_RESTORE
    305315    SAVEGUESTMSR MSR_K8_LSTAR,          CPUMCTX.msrLSTAR
    306316    SAVEGUESTMSR MSR_K6_STAR,           CPUMCTX.msrSTAR
    307317    SAVEGUESTMSR MSR_K8_SF_MASK,        CPUMCTX.msrSFMASK
     318%endif
     319    ; Kernel GS Base is special, we need to manually load/store it, see @bugref{6208}.
    308320    SAVEGUESTMSR MSR_K8_KERNEL_GS_BASE, CPUMCTX.msrKERNELGSBASE
    309321
     
    335347.no_cached_reads:
    336348
     349 %ifdef VBOX_WITH_OLD_VTX_CODE
    337350    ; Save CR2 for EPT
    338351    mov     rax, cr2
    339352    mov     [rdi + VMCSCACHE.cr2], rax
     353 %endif
    340354 %ifdef VBOX_WITH_CRASHDUMP_MAGIC
    341355    mov     dword [rdi + VMCSCACHE.uPos], 8
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