VirtualBox

Changeset 16102 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jan 20, 2009 9:42:11 PM (16 years ago)
Author:
vboxsync
Message:

CPUMR0.cpp: VBOX_ENABLE_64_BITS_GUESTS is a HWACCM local macro, use VBOX_WITH_64_BITS_GUESTS instead. Fixes guest XMM8..15 and DRx0..3 corruption.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/CPUMR0.cpp

    r15439 r16102  
    168168    }
    169169
    170 #if HC_ARCH_BITS == 32 && defined(VBOX_ENABLE_64_BITS_GUESTS) && !defined(VBOX_WITH_HYBRID_32BIT_KERNEL)
     170#if HC_ARCH_BITS == 32 && defined(VBOX_WITH_64_BITS_GUESTS) && !defined(VBOX_WITH_HYBRID_32BIT_KERNEL)
    171171    if (CPUMIsGuestInLongModeEx(pCtx))
    172172    {
    173173        /* Restore the state on entry as we need to be in 64 bits mode to access the full state. */
    174174        pVCpu->cpum.s.fUseFlags |= CPUM_SYNC_FPU_STATE;
     175RTLogPrintf("setting CPUM_SYNC_FPU_STATE\n");
    175176    }
    176177    else
     
    258259    AssertReturn((pVCpu->cpum.s.fUseFlags & CPUM_USED_FPU), VINF_SUCCESS);
    259260
    260 #if HC_ARCH_BITS == 32 && defined(VBOX_ENABLE_64_BITS_GUESTS) && !defined(VBOX_WITH_HYBRID_32BIT_KERNEL)
     261#if HC_ARCH_BITS == 32 && defined(VBOX_WITH_64_BITS_GUESTS) && !defined(VBOX_WITH_HYBRID_32BIT_KERNEL)
    261262    if (CPUMIsGuestInLongModeEx(pCtx))
    262263    {
     264if (!(pVCpu->cpum.s.fUseFlags & CPUM_SYNC_FPU_STATE))
     265     RTLogPrintf("CPUMR0SaveGuestFPU: CPUM_SYNC_FPU_STATE is clear...\n");
     266else RTLogPrintf("CPUMR0SaveGuestFPU: CPUM_SYNC_FPU_STATE is still set\n");
    263267        if (!(pVCpu->cpum.s.fUseFlags & CPUM_SYNC_FPU_STATE))
    264268            HWACCMR0SaveFPUState(pVM, pVCpu, pCtx);
     269
    265270
    266271        cpumR0RestoreHostFPUState(&pVCpu->cpum.s);
     
    321326
    322327    /* Save the guest's debug state. The caller is responsible for DR7. */
    323 #if HC_ARCH_BITS == 32 && defined(VBOX_ENABLE_64_BITS_GUESTS) && !defined(VBOX_WITH_HYBRID_32BIT_KERNEL)
     328#if HC_ARCH_BITS == 32 && defined(VBOX_WITH_64_BITS_GUESTS) && !defined(VBOX_WITH_HYBRID_32BIT_KERNEL)
    324329    if (CPUMIsGuestInLongModeEx(pCtx))
    325330    {
     
    397402
    398403    /* Activate the guest state DR0-3; DR7 is left to the caller. */
    399 #if HC_ARCH_BITS == 32 && defined(VBOX_ENABLE_64_BITS_GUESTS) && !defined(VBOX_WITH_HYBRID_32BIT_KERNEL)
     404#if HC_ARCH_BITS == 32 && defined(VBOX_WITH_64_BITS_GUESTS) && !defined(VBOX_WITH_HYBRID_32BIT_KERNEL)
    400405    if (CPUMIsGuestInLongModeEx(pCtx))
    401406    {
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