VirtualBox

Changeset 102852 in vbox for trunk/src


Ignore:
Timestamp:
Jan 12, 2024 9:39:18 AM (13 months ago)
Author:
vboxsync
Message:

VMM/VMXAllTemplate: Nested VMX: bugref:10318 Trying to narrow down the reason for the VM proc ctls assertion.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/VMXAllTemplate.cpp.h

    r102089 r102852  
    10391039        pVmcsInfoFrom = &pVCpu->hmr0.s.vmx.VmcsInfo;
    10401040        pVmcsInfoTo   = &pVCpu->hmr0.s.vmx.VmcsInfoNstGst;
     1041        Assert(!pVCpu->hm.s.vmx.fMergedNstGstCtls);
    10411042    }
    10421043    else
     
    14281429                        VERR_VMX_VMCS_FIELD_CACHE_INVALID);
    14291430
    1430     rc = VMX_VMCS_READ_64(pVCpu, VMX_VMCS64_CTRL_TSC_OFFSET_FULL, &u64Val);
    1431     AssertRC(rc);
    1432     AssertMsgReturnStmt(pVmcsInfo->u64TscOffset == u64Val,
    1433                         ("%s TSC offset mismatch: Cache=%#RX64 VMCS=%#RX64\n", pcszVmcs, pVmcsInfo->u64TscOffset, u64Val),
    1434                         VCPU_2_VMXSTATE(pVCpu).u32HMError = VMX_VCI_CTRL_TSC_OFFSET,
    1435                         VERR_VMX_VMCS_FIELD_CACHE_INVALID);
     1431    /*
     1432     * The TSC offset will only be used when RDTSC is not intercepted.
     1433     * Since we don't actively clear it while switching between intercepting or not,
     1434     * the value here could be stale.
     1435     */
     1436    if (!(pVmcsInfo->u32ProcCtls & VMX_PROC_CTLS_RDTSC_EXIT))
     1437    {
     1438        rc = VMX_VMCS_READ_64(pVCpu, VMX_VMCS64_CTRL_TSC_OFFSET_FULL, &u64Val);
     1439        AssertRC(rc);
     1440        AssertMsgReturnStmt(pVmcsInfo->u64TscOffset == u64Val,
     1441                            ("%s TSC offset mismatch: Cache=%#RX64 VMCS=%#RX64\n", pcszVmcs, pVmcsInfo->u64TscOffset, u64Val),
     1442                            VCPU_2_VMXSTATE(pVCpu).u32HMError = VMX_VCI_CTRL_TSC_OFFSET,
     1443                            VERR_VMX_VMCS_FIELD_CACHE_INVALID);
     1444    }
    14361445
    14371446    NOREF(pcszVmcs);
     
    77677776    /* Indicate that we no longer need to VM-exit when the guest is ready to receive interrupts, it is now ready. */
    77687777    PVMXVMCSINFO pVmcsInfo = pVmxTransient->pVmcsInfo;
     7778    Assert(!pVmxTransient->fIsNestedGuest);
    77697779    vmxHCClearIntWindowExitVmcs(pVCpu, pVmcsInfo);
    77707780
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