VirtualBox

Changeset 51741 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Jun 27, 2014 8:05:01 AM (10 years ago)
Author:
vboxsync
Message:

VMM/HMVMXR0: Load guest-state after injection of events; simplifies state-handling a tiny bit.

File:
1 edited

Legend:

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

    r51685 r51741  
    83288328#endif /* !IEM_VERIFICATION_MODE_FULL */
    83298329
    8330     /* Load the guest state bits, we can handle longjmps/getting preempted here. */
    8331     hmR0VmxLoadGuestStateOptimal(pVM, pVCpu, pMixedCtx);
    8332 
    83338330    /*
    83348331     * Evaluate events as pending-for-injection into the guest. Toggling of force-flags here is safe as long as
     
    83508347        return rc;
    83518348    }
     8349
     8350    /*
     8351     * Load the guest state bits, we can handle longjmps/getting preempted here.
     8352     *
     8353     * If we are injecting events to a real-on-v86 mode guest, we will have to update
     8354     * RIP and some segment registers, i.e. hmR0VmxInjectPendingEvent()->hmR0VmxInjectEventVmcs().
     8355     * Hence, this needs to be done -after- injection of events.
     8356     */
     8357    hmR0VmxLoadGuestStateOptimal(pVM, pVCpu, pMixedCtx);
    83528358
    83538359    /*
     
    84188424    VMCPU_ASSERT_STATE(pVCpu, VMCPUSTATE_STARTED_HM);
    84198425    VMCPU_SET_STATE(pVCpu, VMCPUSTATE_STARTED_EXEC);            /* Indicate the start of guest execution. */
    8420 
    8421     /*
    8422      * If we are injecting events to a real-on-v86 mode guest, we may have to update
    8423      * RIP and some other registers, i.e. hmR0VmxInjectPendingEvent()->hmR0VmxInjectEventVmcs().
    8424      * Reload only the necessary state, the assertion will catch if other parts of the code
    8425      * change.
    8426      */
    8427     if (pVCpu->hm.s.vmx.RealMode.fRealOnV86Active)
    8428     {
    8429         hmR0VmxLoadGuestRipRspRflags(pVCpu, pMixedCtx);
    8430         hmR0VmxLoadGuestSegmentRegs(pVCpu, pMixedCtx);
    8431     }
    84328426
    84338427#ifdef HMVMX_ALWAYS_SWAP_FPU_STATE
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