VirtualBox

Changeset 48477 in vbox for trunk/src/VBox/VMM/VMMR0


Ignore:
Timestamp:
Sep 13, 2013 3:46:29 PM (11 years ago)
Author:
vboxsync
Message:

VMM/HMVMXR0: Debug macro switch HMVMX_ALWAYS_SWAP_FPU_STATE.

File:
1 edited

Legend:

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

    r48476 r48477  
    4242#define HMVMX_ALWAYS_TRAP_ALL_XCPTS
    4343#define HMVMX_ALWAYS_TRAP_PF
     44#define HMVMX_ALWAYS_SWAP_FPU_STATE
    4445#endif
    4546
     
    75347535    Assert(!(pVCpu->hm.s.fContextUseFlags & HM_CHANGED_HOST_CONTEXT));
    75357536
     7537#ifdef HMVMX_ALWAYS_SWAP_FPU_STATE
     7538    if (!CPUMIsGuestFPUStateActive(pVCpu))
     7539        CPUMR0LoadGuestFPU(pVM, pVCpu, pMixedCtx);
     7540    pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_GUEST_CR0;
     7541#endif
     7542
    75367543    /*
    75377544     * Load the state shared between host and guest (FPU, debug).
     
    76277634    Assert(!(ASMGetFlags() & X86_EFL_IF));
    76287635    VMCPU_SET_STATE(pVCpu, VMCPUSTATE_STARTED_HM);
     7636
     7637#ifdef HMVMX_ALWAYS_SWAP_FPU_STATE
     7638    if (CPUMIsGuestFPUStateActive(pVCpu))
     7639    {
     7640        hmR0VmxSaveGuestCR0(pVCpu, pMixedCtx);
     7641        CPUMR0SaveGuestFPU(pVM, pVCpu, pMixedCtx);
     7642        pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_GUEST_CR0;
     7643    }
     7644#endif
    76297645
    76307646    pVCpu->hm.s.vmx.fRestoreHostFlags |= VMX_RESTORE_HOST_REQUIRED;   /* Host state messed up by VT-x, we must restore. */
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