VirtualBox

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


Ignore:
Timestamp:
Jul 1, 2013 12:10:22 PM (11 years ago)
Author:
vboxsync
Message:

VMM/HMVMXR0: Avoid reloading guest state on multiple reschedules on longjmp trips.

File:
1 edited

Legend:

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

    r46871 r46881  
    66666666 * @remarks No-long-jump zone!!!
    66676667 */
    6668 VMMR0DECL(int) VMXR0LoadGuestState(PVM pVM, PVMCPU pVCpu, PCPUMCTX pMixedCtx)
     6668static int hmR0VmxLoadGuestState(PVM pVM, PVMCPU pVCpu, PCPUMCTX pMixedCtx)
    66696669{
    66706670    AssertPtr(pVM);
     
    67456745    STAM_PROFILE_ADV_STOP(&pVCpu->hm.s.StatLoadGuestState, x);
    67466746    return rc;
     6747}
     6748
     6749
     6750/**
     6751 * Loads the guest state into the VMCS guest-state area.
     6752 *
     6753 * @returns VBox status code.
     6754 * @param   pVM         Pointer to the VM.
     6755 * @param   pVCpu       Pointer to the VMCPU.
     6756 * @param   pMixedCtx   Pointer to the guest-CPU context. The data may be
     6757 *                      out-of-sync. Make sure to update the required fields
     6758 *                      before using them.
     6759 *
     6760 * @remarks No-long-jump zone!!!
     6761 */
     6762VMMR0DECL(int) VMXR0LoadGuestState(PVM pVM, PVMCPU pVCpu, PCPUMCTX pMixedCtx)
     6763{
     6764    /*
     6765     * Avoid reloading the guest state on longjmp reentrants and do it lazily just before executing the guest.
     6766     * This only helps when we get rescheduled more than once to a different host CPU on a longjmp trip before
     6767     * finally executing guest code.
     6768     */
     6769    return VINF_SUCCESS;
    67476770}
    67486771
     
    68786901    else if (pVCpu->hm.s.fContextUseFlags)
    68796902    {
    6880         rc = VMXR0LoadGuestState(pVM, pVCpu, pMixedCtx);
     6903        rc = hmR0VmxLoadGuestState(pVM, pVCpu, pMixedCtx);
    68816904        STAM_COUNTER_INC(&pVCpu->hm.s.StatLoadFull);
    68826905    }
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