VirtualBox

Changeset 47378 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jul 24, 2013 4:32:46 PM (12 years ago)
Author:
vboxsync
Message:

VMM/HMVMXR0: Typos and make re-checking of CR4.VMXE on VMXR0Enter() only for strict builds.

File:
1 edited

Legend:

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

    r47353 r47378  
    126126 *
    127127 * We need to intercept all exceptions manually (except #PF). #NM is also
    128  * handled spearetely, see hmR0VmxLoadGuestControlRegs(). #PF need not be
     128 * handled separately, see hmR0VmxLoadGuestControlRegs(). #PF need not be
    129129 * intercepted even in real-mode if we have Nested Paging support.
    130130 */
     
    219219    bool            fUpdateTscOffsettingAndPreemptTimer;
    220220    /** Whether the VM-exit was caused by a page-fault during delivery of a
    221      *  contributary exception or a page-fault. */
     221     *  contributory exception or a page-fault. */
    222222    bool            fVectoringPF;
    223223} VMXTRANSIENT, *PVMXTRANSIENT;
     
    19911991/**
    19921992 * Sets up the VM for execution under VT-x.
    1993  * This function is only called once per-VM during initalization.
     1993 * This function is only called once per-VM during initialization.
    19941994 *
    19951995 * @returns VBox status code.
     
    54325432     * See Intel spec. 27.3.2 "Saving Segment Registers and Descriptor-Table Registers".
    54335433     *
    5434      * bird: This isn't quite as simple.  VT-x and VBox(!) requires the DPL for SS to be the the same as CPL.  In 64-bit mode it
     5434     * bird: This isn't quite as simple.  VT-x and VBox(!) requires the DPL for SS to be the same as CPL.  In 64-bit mode it
    54355435     *       is possible (int/trap/xxx injects does this when switching rings) to load SS with a NULL selector and RPL=CPL.
    54365436     *       The Attr.u = X86DESCATTR_UNUSABLE works fine as long as nobody uses ring-1 or ring-2.  VT-x updates the DPL
    5437      *       correctly in the attributes of SS even when the unusable bit is set, we need to preseve the DPL or we get invalid
     5437     *       correctly in the attributes of SS even when the unusable bit is set, we need to preserve the DPL or we get invalid
    54385438     *       guest state trouble.  Try bs2-cpu-hidden-regs-1.
    54395439     */
     
    66206620    LogFlowFunc(("pVM=%p pVCpu=%p\n", pVM, pVCpu));
    66216621
     6622#ifdef VBOX_STRICT
    66226623    /* Make sure we're in VMX root mode. */
    66236624    RTCCUINTREG u32HostCR4 = ASMGetCR4();
     
    66276628        return VERR_VMX_X86_CR4_VMXE_CLEARED;
    66286629    }
     6630#endif
    66296631
    66306632    /* Load the active VMCS as the current one. */
     
    66336635        return rc;
    66346636
    6635     /** @todo this will change with preemption hooks where can can VMRESUME as long
     6637    /** @todo this will change with preemption hooks where can VMRESUME as long
    66366638     *        as we're no preempted. */
    66376639    pVCpu->hm.s.fResumeVM = false;
     
    68496851 * This may cause longjmps to ring-3 and may even result in rescheduling to the
    68506852 * recompiler. We must be cautious what we do here regarding committing
    6851  * guest-state information into the the VMCS assuming we assuredly execute the
     6853 * guest-state information into the VMCS assuming we assuredly execute the
    68526854 * guest in VT-x. If we fall back to the recompiler after updating the VMCS and
    68536855 * clearing the common-state (TRPM/forceflags), we must undo those changes so
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