VirtualBox

Changeset 79802 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jul 16, 2019 6:04:03 AM (5 years ago)
Author:
vboxsync
Message:

VMM/HMVMXR0: Nested VMX: bugref:9180 Update TPR-threshold and Virtual-APIC page address VMCS fields only when TPR-shadowing is enabled while merging the VMCS controls before executing the nested-guest. If this control is enabled for the nested-guest VMCS it implies it's also supported by the host CPU (added paranoia assert).

File:
1 edited

Legend:

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

    r79785 r79802  
    1082110821     * The virtual-APIC page has already been allocated (by CPUM during VM startup) and cached
    1082210822     * from guest memory as part of VMLAUNCH/VMRESUME instruction emulation. The host physical
    10823      * address has also been updated in the nested-guest VMCS.
     10823     * address has also been updated in the nested-guest VMCS object during allocation.
    1082410824     */
    1082510825    PVMXVMCSINFO pVmcsInfoNstGst = &pVCpu->hm.s.vmx.VmcsInfoNstGst;
     
    1082810828    if (u32ProcCtls & VMX_PROC_CTLS_USE_TPR_SHADOW)
    1082910829    {
     10830        Assert(pVM->hm.s.vmx.Msrs.ProcCtls.n.allowed1 & VMX_PROC_CTLS_USE_TPR_SHADOW);
    1083010831        HCPhysVirtApic  = pVmcsInfoNstGst->HCPhysVirtApic;
    1083110832        u32TprThreshold = pVmcsNstGst->u32TprThreshold;
     
    1088210883        rc |= VMXWriteVmcs32(VMX_VMCS32_CTRL_PLE_WINDOW, cPleWindowTicks);
    1088310884    }
    10884     rc |= VMXWriteVmcs32(VMX_VMCS32_CTRL_TPR_THRESHOLD, u32TprThreshold);
    10885     rc |= VMXWriteVmcs64(VMX_VMCS64_CTRL_VIRT_APIC_PAGEADDR_FULL, pVmcsInfoNstGst->HCPhysVirtApic);
     10885    if (u32ProcCtls & VMX_PROC_CTLS_USE_TPR_SHADOW)
     10886    {
     10887        rc |= VMXWriteVmcs32(VMX_VMCS32_CTRL_TPR_THRESHOLD, u32TprThreshold);
     10888        rc |= VMXWriteVmcs64(VMX_VMCS64_CTRL_VIRT_APIC_PAGEADDR_FULL, pVmcsInfoNstGst->HCPhysVirtApic);
     10889    }
    1088610890    AssertRCReturn(rc, rc);
    1088710891
     
    1469614700            }
    1469714701        }
     14702        /* else: inject pending event before resuming guest execution. */
    1469814703    }
    1469914704    else if (rcStrict == VINF_HM_DOUBLE_FAULT)
     
    1750917514    HMVMX_VALIDATE_NESTED_EXIT_HANDLER_PARAMS(pVCpu, pVmxTransient);
    1751017515
    17511     int rc  = hmR0VmxReadExitIntInfoVmcs(pVmxTransient);
    17512     rc     |= hmR0VmxReadExitIntErrorCodeVmcs(pVmxTransient);
    17513     rc     |= hmR0VmxReadExitInstrLenVmcs(pVmxTransient);
     17516    int rc  = hmR0VmxReadExitInstrLenVmcs(pVmxTransient);
    1751417517    rc     |= hmR0VmxReadIdtVectoringInfoVmcs(pVmxTransient);
    1751517518    rc     |= hmR0VmxReadIdtVectoringErrorCodeVmcs(pVmxTransient);
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