VirtualBox

Changeset 64882 in vbox


Ignore:
Timestamp:
Dec 15, 2016 3:17:35 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
112289
Message:

VMM/HMVMXR0: Avoid setting HM_CHANGED_VMX_GUEST_APIC_STATE in TprBelowThreshold VM-exit as it should've already been set in hmR0VmxPostRunGuest.

File:
1 edited

Legend:

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

    r64881 r64882  
    89808980
    89818981        /*
    8982          * If the TPR was raised by the guest, it wouldn't cause a VM-exit immediately. Instead we sync the TPR lazily whenever
    8983          * we eventually get a VM-exit for any reason.
    8984          *
    8985          * This maybe expensive as PDMApicSetTPR() can longjmp to ring-3 and which is why it's done here as it's easier and
    8986          * no less efficient to deal with it here than making hmR0VmxSaveGuestState() cope with longjmps safely
    8987          * (see VMCPU_FF_HM_UPDATE_CR3 handling).
     8982         * Sync the TPR shadow with our APIC state.
    89888983         */
    8989         /** @todo r=ramshankar: The 2nd para in the above comment is
    8990          *        outdated, we no longer longjmp to ring-3 on setting
    8991          *        the TPR, but regardless we can probably rework this
    8992          *        portion of the code a bit. */
    89938984        if (   (pVCpu->hm.s.vmx.u32ProcCtls & VMX_VMCS_CTRL_PROC_EXEC_USE_TPR_SHADOW)
    89948985            && pVmxTransient->u8GuestTpr != pVCpu->hm.s.vmx.pbVirtApic[XAPIC_OFF_TPR])
     
    1224012231
    1224112232    /*
    12242      * The TPR has already been updated, see hmR0VMXPostRunGuest(). RIP is also updated as part of the VM-exit by VT-x. Update
    12243      * the threshold in the VMCS, deliver the pending interrupt via hmR0VmxPreRunGuest()->hmR0VmxInjectPendingEvent() and
    12244      * resume guest execution.
     12233     * The TPR shadow would've been synced with the APIC TPR in hmR0VmxPostRunGuest(). We'll re-evaluate
     12234     * pending interrupts and inject them before the next VM-entry so we can just continue execution here.
    1224512235     */
    12246     HMCPU_CF_SET(pVCpu, HM_CHANGED_VMX_GUEST_APIC_STATE);
    1224712236    STAM_COUNTER_INC(&pVCpu->hm.s.StatExitTprBelowThreshold);
    1224812237    return VINF_SUCCESS;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette