VirtualBox

Changeset 97055 in vbox


Ignore:
Timestamp:
Oct 7, 2022 11:12:54 PM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
154004
Message:

VMM/HMVMXR0: Just go with the better option in vmxHCExitEptViolationNested. bugref:10092

File:
1 edited

Legend:

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

    r97054 r97055  
    1032910329    Assert(pVCpu->CTX_SUFF(pVM)->hmr0.s.fNestedPaging);
    1033010330
    10331 //#  define DSL_IRQ_FIX_1
    10332 #  define DSL_IRQ_FIX_2
    10333 
    1033410331    PVMXVMCSINFO pVmcsInfo = pVmxTransient->pVmcsInfo;
    1033510332    if (CPUMIsGuestVmxProcCtls2Set(&pVCpu->cpum.GstCtx, VMX_PROC_CTLS2_EPT))
     
    1033810335        AssertRCReturn(rc, rc);
    1033910336
    10340 #  ifdef DSL_IRQ_FIX_2
    1034110337        vmxHCReadToTransient<  HMVMX_READ_EXIT_QUALIFICATION
    1034210338                             | HMVMX_READ_EXIT_INSTR_LEN
     
    1036110357        }
    1036210358        bool const fClearEventOnForward = VCPU_2_VMXSTATE(pVCpu).Event.fPending; /* paranoia. should not inject events below.  */
    10363 #  else
    10364         vmxHCReadExitQualVmcs(pVCpu, pVmxTransient);
    10365         vmxHCReadGuestPhysicalAddrVmcs(pVCpu, pVmxTransient);
    10366         VBOXSTRICTRC rcStrict;
    10367 #  endif
    1036810359
    1036910360        RTGCPHYS const GCPhysNestedFault = pVmxTransient->uGuestPhysicalAddr;
     
    1039410385                  uExitQual, GCPhysNestedFault, GCPtrNestedFault, VBOXSTRICTRC_VAL(rcStrict), Walk.fFailed));
    1039510386        if (RT_SUCCESS(rcStrict))
    10396         {
    10397 #  ifdef DSL_IRQ_FIX_1
    10398             /*
    10399              * If it's our VMEXIT, we're responsible for re-injecting any event which delivery
    10400              * might have triggered this VMEXIT.  If we forward the problem to the inner VMM,
    10401              * it's its problem to deal with that issue.  This means that it's troublesome to
    10402              * call vmxHCCheckExitDueToEventDelivery before PGMR0NestedTrap0eHandlerNestedPaging
    10403              * have decided who's VMEXIT it is. Unfortunately, we're a bit of a pickle then if
    10404              * we end up with an informational status here, as we _must_ _not_ drop events either.
    10405              */
    10406             /** @todo need better solution for this.  Better solution should probably be
    10407              *        applied to other exits too...   */
    10408             if (rcStrict == VINF_SUCCESS)
    10409             {
    10410                 vmxHCReadExitIntInfoVmcs(pVCpu, pVmxTransient);
    10411                 vmxHCReadExitIntErrorCodeVmcs(pVCpu, pVmxTransient);
    10412                 vmxHCReadExitInstrLenVmcs(pVCpu, pVmxTransient);
    10413                 vmxHCReadIdtVectoringInfoVmcs(pVCpu, pVmxTransient);
    10414                 vmxHCReadIdtVectoringErrorCodeVmcs(pVCpu, pVmxTransient);
    10415 
    10416                 vmxHCCheckExitDueToEventDelivery(pVCpu, pVmxTransient);
    10417             }
    10418 #  endif
    1041910387            return rcStrict;
    10420         }
    10421 
    10422 #  ifndef DSL_IRQ_FIX_2
    10423         vmxHCReadExitInstrLenVmcs(pVCpu, pVmxTransient);
    10424         vmxHCReadIdtVectoringInfoVmcs(pVCpu, pVmxTransient);
    10425         vmxHCReadIdtVectoringErrorCodeVmcs(pVCpu, pVmxTransient);
    10426 #  else
     10388
    1042710389        if (fClearEventOnForward)
    1042810390            VCPU_2_VMXSTATE(pVCpu).Event.fPending = false;
    10429 #  endif
    1043010391
    1043110392        VMXVEXITEVENTINFO const ExitEventInfo = VMXVEXITEVENTINFO_INIT_ONLY_IDT(pVmxTransient->uIdtVectoringInfo,
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