VirtualBox

Changeset 96962 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Oct 2, 2022 9:54:28 PM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
153881
Message:

VMM/HMVMX: Preliminary fix for the nested nested paging issue we've been having with DSL booting getting stuck. Logging. bugref:10092

File:
1 edited

Legend:

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

    r96927 r96962  
    30463046 */
    30473047DECLINLINE(void) vmxHCSetPendingEvent(PVMCPUCC pVCpu, uint32_t u32IntInfo, uint32_t cbInstr, uint32_t u32ErrCode,
    3048                                         RTGCUINTPTR GCPtrFaultAddress)
     3048                                      RTGCUINTPTR GCPtrFaultAddress)
    30493049{
    30503050    Assert(!VCPU_2_VMXSTATE(pVCpu).Event.fPending);
     
    39063906        STAM_COUNTER_INC(&VCPU_2_VMXSTATS(pVCpu).StatSwitchHmToR3FF);
    39073907        int rc = RT_LIKELY(!VM_FF_IS_SET(pVM, VM_FF_PGM_NO_MEMORY)) ? VINF_EM_RAW_TO_R3 : VINF_EM_NO_MEMORY;
    3908         Log4Func(("HM_TO_R3 forcing us back to ring-3. rc=%d\n", rc));
     3908        Log4Func(("HM_TO_R3 forcing us back to ring-3. rc=%d (fVM=%#RX64 fCpu=%#RX64)\n",
     3909                  rc, pVM->fGlobalForcedActions, pVCpu->fLocalForcedActions));
    39093910        return rc;
    39103911    }
     
    1021710218    HMVMX_VALIDATE_NESTED_EXIT_HANDLER_PARAMS(pVCpu, pVmxTransient);
    1021810219
    10219 #ifdef VBOX_STRICT
     10220# ifdef VBOX_STRICT
    1022010221    PCCPUMCTX pCtx = &pVCpu->cpum.GstCtx;
    1022110222    switch (pVmxTransient->uExitReason)
     
    1025010251            break;
    1025110252    }
    10252 #endif
     10253# endif
    1025310254
    1025410255    vmxHCReadExitInstrLenVmcs(pVCpu, pVmxTransient);
     
    1026510266}
    1026610267
    10267 
    1026810268# ifdef VBOX_WITH_NESTED_HWVIRT_VMX_EPT
     10269
    1026910270/**
    1027010271 * Nested-guest VM-exit handler for EPT violation (VMX_EXIT_EPT_VIOLATION).
     
    1030910310                                                                     GCPhysNestedFault, fIsLinearAddrValid, GCPtrNestedFault,
    1031010311                                                                     &Walk);
     10312        Log7Func(("PGM (uExitQual=%#RX64, %RGp, %RGv) -> %Rrc (fFailed=%d)\n",
     10313                  uExitQual, GCPhysNestedFault, GCPtrNestedFault, VBOXSTRICTRC_VAL(rcStrict), Walk.fFailed));
    1031110314        if (RT_SUCCESS(rcStrict))
     10315        {
     10316#if 1
     10317            /*
     10318             * If it's our VMEXIT, we're responsible for re-injecting any event which delivery
     10319             * might have triggered this VMEXIT.  If we forward the problem to the inner VMM,
     10320             * it's its problem to deal with that issue.  This means that it's troublesome to
     10321             * call vmxHCCheckExitDueToEventDelivery before PGMR0NestedTrap0eHandlerNestedPaging
     10322             * have decided who's VMEXIT it is. Unfortunately, we're a bit of a pickle then if
     10323             * we end up with an informational status here, as we _must_ _not_ drop events either.
     10324             */
     10325            /** @todo need better solution for this.  Better solution should probably be
     10326             *        applied to other exits too...   */
     10327            if (rcStrict == VINF_SUCCESS)
     10328            {
     10329                vmxHCReadExitIntInfoVmcs(pVCpu, pVmxTransient);
     10330                vmxHCReadExitIntErrorCodeVmcs(pVCpu, pVmxTransient);
     10331                vmxHCReadExitInstrLenVmcs(pVCpu, pVmxTransient);
     10332                vmxHCReadIdtVectoringInfoVmcs(pVCpu, pVmxTransient);
     10333                vmxHCReadIdtVectoringErrorCodeVmcs(pVCpu, pVmxTransient);
     10334
     10335                vmxHCCheckExitDueToEventDelivery(pVCpu, pVmxTransient);
     10336            }
     10337#endif
    1031210338            return rcStrict;
     10339        }
    1031310340
    1031410341        vmxHCReadExitInstrLenVmcs(pVCpu, pVmxTransient);
     
    1038410411    return vmxHCExitEptMisconfig(pVCpu, pVmxTransient);
    1038510412}
     10413
    1038610414# endif /* VBOX_WITH_NESTED_HWVIRT_VMX_EPT */
    1038710415
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