VirtualBox

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


Ignore:
Timestamp:
May 9, 2023 4:17:08 AM (21 months ago)
Author:
vboxsync
Message:

VMM: Nested VMX: bugref:10318 Moved vmxHCGetGuestIntrStateWithUpdate() back into vmxHCEvaluatePendingEvent[Nested] as it implicitly ensures ordering.

Location:
trunk/src/VBox/VMM
Files:
3 edited

Legend:

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

    r99665 r99687  
    48594859 *
    48604860 * @returns Strict VBox status code (i.e. informational status codes too).
    4861  * @param   pVCpu       The cross context virtual CPU structure.
    4862  * @param   pVmcsInfo   The VMCS information structure.
    4863  */
    4864 static VBOXSTRICTRC vmxHCEvaluatePendingEvent(PVMCPUCC pVCpu, PVMXVMCSINFO pVmcsInfo)
    4865 {
     4861 * @param   pVCpu           The cross context virtual CPU structure.
     4862 * @param   pVmcsInfo       The VMCS information structure.
     4863 * @param   pfIntrState     Where to store the updated VMX guest-interruptibility
     4864 *                          state.
     4865 */
     4866static VBOXSTRICTRC vmxHCEvaluatePendingEvent(PVMCPUCC pVCpu, PVMXVMCSINFO pVmcsInfo, uint32_t *pfIntrState)
     4867{
     4868    Assert(pfIntrState);
    48664869    Assert(!TRPMHasTrap(pVCpu));
     4870
     4871    *pfIntrState = vmxHCGetGuestIntrStateWithUpdate(pVCpu);
    48674872
    48684873    /*
     
    49844989 *
    49854990 * @returns Strict VBox status code (i.e. informational status codes too).
    4986  * @param   pVCpu       The cross context virtual CPU structure.
    4987  * @param   pVmcsInfo   The VMCS information structure.
     4991 * @param   pVCpu           The cross context virtual CPU structure.
     4992 * @param   pVmcsInfo       The VMCS information structure.
     4993 * @param   pfIntrState     Where to store the updated VMX guest-interruptibility
     4994 *                          state.
    49884995 *
    49894996 * @remarks The guest must be in VMX non-root mode.
    49904997 */
    4991 static VBOXSTRICTRC vmxHCEvaluatePendingEventNested(PVMCPUCC pVCpu, PVMXVMCSINFO pVmcsInfo)
     4998static VBOXSTRICTRC vmxHCEvaluatePendingEventNested(PVMCPUCC pVCpu, PVMXVMCSINFO pVmcsInfo, uint32_t *pfIntrState)
    49924999{
    49935000    PCCPUMCTX pCtx = &pVCpu->cpum.GstCtx;
    49945001
     5002    Assert(pfIntrState);
    49955003    Assert(CPUMIsGuestInVmxNonRootMode(pCtx));
    49965004    Assert(!TRPMHasTrap(pVCpu));
     5005
     5006    *pfIntrState = vmxHCGetGuestIntrStateWithUpdate(pVCpu);
    49975007
    49985008    /*
  • trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp

    r99663 r99687  
    59235923        vmxHCTrpmTrapToPendingEvent(pVCpu);
    59245924
    5925     uint32_t const fIntrState = vmxHCGetGuestIntrStateWithUpdate(pVCpu);
     5925    uint32_t fIntrState;
    59265926#ifdef VBOX_WITH_NESTED_HWVIRT_VMX
    59275927    if (!pVmxTransient->fIsNestedGuest)
    5928         rcStrict = vmxHCEvaluatePendingEvent(pVCpu, pVmxTransient->pVmcsInfo);
     5928        rcStrict = vmxHCEvaluatePendingEvent(pVCpu, pVmxTransient->pVmcsInfo, &fIntrState);
    59295929    else
    5930         rcStrict = vmxHCEvaluatePendingEventNested(pVCpu, pVmxTransient->pVmcsInfo);
     5930        rcStrict = vmxHCEvaluatePendingEventNested(pVCpu, pVmxTransient->pVmcsInfo, &fIntrState);
    59315931
    59325932    /*
     
    59435943    }
    59445944#else
    5945     rcStrict = vmxHCEvaluatePendingEvent(pVCpu, pVmxTransient->pVmcsInfo);
     5945    rcStrict = vmxHCEvaluatePendingEvent(pVCpu, pVmxTransient->pVmcsInfo, &fIntrState);
    59465946    Assert(rcStrict == VINF_SUCCESS);
    59475947#endif
  • trunk/src/VBox/VMM/VMMR3/NEMR3Native-darwin.cpp

    r99663 r99687  
    37383738        vmxHCTrpmTrapToPendingEvent(pVCpu);
    37393739
    3740     uint32_t const fIntrState = vmxHCGetGuestIntrStateWithUpdate(pVCpu);
    3741     rcStrict = vmxHCEvaluatePendingEvent(pVCpu, &pVCpu->nem.s.VmcsInfo);
     3740    uint32_t fIntrState;
     3741    rcStrict = vmxHCEvaluatePendingEvent(pVCpu, &pVCpu->nem.s.VmcsInfo, &fIntrState);
    37423742
    37433743    /*
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