VirtualBox

Changeset 15490 in vbox for trunk/src


Ignore:
Timestamp:
Dec 15, 2008 10:06:50 AM (16 years ago)
Author:
vboxsync
Message:

Disabled VMX_VMCS_GUEST_EFER_FULL code. (crashes my Nehalem host)

File:
1 edited

Legend:

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

    r15440 r15490  
    994994        AssertRC(rc);
    995995
     996#if 0 /* @todo deal with 32/64 */
     997        /* Restore the host EFER - on CPUs that support it. */
     998        if (pVM->hwaccm.s.vmx.msr.vmx_exit.n.allowed1 & VMX_VMCS_CTRL_EXIT_CONTROLS_LOAD_HOST_EFER_MSR)
     999        {
     1000            uint64_t msrEFER = ASMRdMsr(MSR_IA32_EFER);
     1001            rc = VMXWriteVMCS64(VMX_VMCS_HOST_FIELD_EFER_FULL, msrEFER);
     1002            AssertRC(rc);
     1003        }
     1004#endif
    9961005        pVCpu->hwaccm.s.fContextUseFlags &= ~HWACCM_CHANGED_HOST_CONTEXT;
    9971006    }
     
    10901099    /* Load guest debug controls (dr7 & IA32_DEBUGCTL_MSR) (forced to 1 on the 'first' VT-x capable CPUs; this actually includes the newest Nehalem CPUs) */
    10911100    val |= VMX_VMCS_CTRL_ENTRY_CONTROLS_LOAD_DEBUG;
    1092     /* Required for the EFER write below, not supported on all CPUs. */ /** @todo Sander, check this. */
     1101#if 0 /* @todo deal with 32/64 */
     1102    /* Required for the EFER write below, not supported on all CPUs. */
    10931103    val |= VMX_VMCS_CTRL_ENTRY_CONTROLS_LOAD_GUEST_EFER_MSR;
    1094 
     1104#endif
    10951105    /* 64 bits guest mode? */
    10961106    if (pCtx->msrEFER & MSR_K6_EFER_LMA)
     
    11091119
    11101120    /* Save debug controls (dr7 & IA32_DEBUGCTL_MSR) (forced to 1 on the 'first' VT-x capable CPUs; this actually includes the newest Nehalem CPUs) */
     1121#if 0 /* @todo deal with 32/64 */
     1122    val |= VMX_VMCS_CTRL_EXIT_CONTROLS_SAVE_DEBUG | VMX_VMCS_CTRL_EXIT_CONTROLS_LOAD_HOST_EFER_MSR;
     1123#else
    11111124    val |= VMX_VMCS_CTRL_EXIT_CONTROLS_SAVE_DEBUG;
     1125#endif
     1126
    11121127#if HC_ARCH_BITS == 64 || defined(VBOX_WITH_HYBRID_32BIT_KERNEL)
    11131128    if (VMX_IS_64BIT_HOST_MODE())
     
    11181133        val |= VMX_VMCS_CTRL_EXIT_CONTROLS_HOST_AMD64;      /* our switcher goes to long mode */
    11191134    else
    1120         val &= ~VMX_VMCS_CTRL_EXIT_CONTROLS_HOST_AMD64;
     1135        Assert(!(val & VMX_VMCS_CTRL_EXIT_CONTROLS_HOST_AMD64));
    11211136#endif
    11221137    val &= pVM->hwaccm.s.vmx.msr.vmx_exit.n.allowed1;
     
    15811596    }
    15821597
     1598#if 0 /* @todo deal with 32/64 */
    15831599    /* Unconditionally update the guest EFER - on CPUs that supports it. */
    15841600    if (pVM->hwaccm.s.vmx.msr.vmx_entry.n.allowed1 & VMX_VMCS_CTRL_ENTRY_CONTROLS_LOAD_GUEST_EFER_MSR)
     
    15871603        AssertRC(rc);
    15881604    }
     1605#endif
    15891606
    15901607    vmxR0UpdateExceptionBitmap(pVM, pVCpu, pCtx);
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