VirtualBox

Changeset 86117 in vbox for trunk/src/VBox/VMM/VMMAll


Ignore:
Timestamp:
Sep 14, 2020 8:03:03 AM (4 years ago)
Author:
vboxsync
Message:

NEM: Some adjustments to r140349.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/NEMAllNativeTemplate-win.cpp.h

    r86116 r86117  
    33463346            break;
    33473347
     3348        /*
     3349         * Workaround the lovely mesa driver assuming that vmsvga means vmware
     3350         * hypervisor and tries to log stuff to the host.
     3351         */
    33483352        case X86_XCPT_GP:
    3349         {
    3350             PCPUMCTX pCtx = &pVCpu->cpum.GstCtx;
     3353            STAM_REL_COUNTER_INC(&pVCpu->nem.s.StatExitExceptionGp);
     3354            /** @todo r=bird: Need workaround in IEM for this, right?
     3355            EMHistoryAddExit(pVCpu, EMEXIT_MAKE_FT(EMEXIT_F_KIND_NEM, NEMEXITTYPE_XCPT_GP),
     3356                             pMsg->Header.Rip + pMsg->Header.CsSegment.Base, ASMReadTSC()); */
    33513357            if (   !pVCpu->hm.s.fTrapXcptGpForLovelyMesaDrv
    3352                 || !nemHcWinIsMesaDrvGp(pVCpu, pCtx, pMsg->InstructionBytes, pMsg->InstructionByteCount))
     3358                || !nemHcWinIsMesaDrvGp(pVCpu, &pVCpu->cpum.GstCtx, pMsg->InstructionBytes, pMsg->InstructionByteCount))
    33533359            {
    3354                 /** @todo Need to emulate instruction or we get a triple fault when trying to inject the #GP... */
     3360# if 1 /** @todo Need to emulate instruction or we get a triple fault when trying to inject the #GP... */
    33553361                rcStrict = IEMExecOneWithPrefetchedByPC(pVCpu, CPUMCTX2CORE(&pVCpu->cpum.GstCtx), pMsg->Header.Rip,
    33563362                                                        pMsg->InstructionBytes, pMsg->InstructionByteCount);
     
    33583364                      pVCpu->idCpu, pMsg->Header.CsSegment.Selector, pMsg->Header.Rip,
    33593365                      nemHCWinExecStateToLogStr(&pMsg->Header), VBOXSTRICTRC_VAL(rcStrict) ));
    3360                 STAM_REL_COUNTER_INC(&pVCpu->nem.s.StatExitExceptionUdHandled);
    33613366                return rcStrict;
     3367# else
     3368                break;
     3369# endif
    33623370            }
    3363             return nemHcWinHandleMesaDrvGp(pVCpu, pCtx);
    3364         }
     3371            STAM_REL_COUNTER_INC(&pVCpu->nem.s.StatExitExceptionGpMesa);
     3372            return nemHcWinHandleMesaDrvGp(pVCpu, &pVCpu->cpum.GstCtx);
    33653373
    33663374        /*
     
    34643472            break;
    34653473
     3474        /*
     3475         * Workaround the lovely mesa driver assuming that vmsvga means vmware
     3476         * hypervisor and tries to log stuff to the host.
     3477         */
    34663478        case X86_XCPT_GP:
    3467         {
    3468             PCPUMCTX pCtx = &pVCpu->cpum.GstCtx;
     3479            STAM_REL_COUNTER_INC(&pVCpu->nem.s.StatExitExceptionGp);
     3480            /** @todo r=bird: Need workaround in IEM for this, right?
     3481            EMHistoryAddExit(pVCpu, EMEXIT_MAKE_FT(EMEXIT_F_KIND_NEM, NEMEXITTYPE_XCPT_GP),
     3482                             pExit->VpContext.Rip + pExit->VpContext.Cs.Base, ASMReadTSC()); */
    34693483            if (   !pVCpu->nem.s.fTrapXcptGpForLovelyMesaDrv
    3470                 || !nemHcWinIsMesaDrvGp(pVCpu, pCtx, pExit->VpException.InstructionBytes,
     3484                || !nemHcWinIsMesaDrvGp(pVCpu, &pVCpu->cpum.GstCtx, pExit->VpException.InstructionBytes,
    34713485                                        pExit->VpException.InstructionByteCount))
    34723486            {
    3473                 /** @todo Need to emulate instruction or we get a triple fault when trying to inject the #GP... */
     3487# if 1 /** @todo Need to emulate instruction or we get a triple fault when trying to inject the #GP... */
    34743488                rcStrict = IEMExecOneWithPrefetchedByPC(pVCpu, CPUMCTX2CORE(&pVCpu->cpum.GstCtx), pExit->VpContext.Rip,
    34753489                                                        pExit->VpException.InstructionBytes,
     
    34803494                STAM_REL_COUNTER_INC(&pVCpu->nem.s.StatExitExceptionUdHandled);
    34813495                return rcStrict;
     3496# else
     3497                break;
     3498# endif
    34823499            }
    3483             return nemHcWinHandleMesaDrvGp(pVCpu, pCtx);
    3484         }
     3500            STAM_REL_COUNTER_INC(&pVCpu->nem.s.StatExitExceptionGpMesa);
     3501            return nemHcWinHandleMesaDrvGp(pVCpu, &pVCpu->cpum.GstCtx);
    34853502
    34863503        /*
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