Changeset 86117 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Sep 14, 2020 8:03:03 AM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 140350
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/NEMAllNativeTemplate-win.cpp.h
r86116 r86117 3346 3346 break; 3347 3347 3348 /* 3349 * Workaround the lovely mesa driver assuming that vmsvga means vmware 3350 * hypervisor and tries to log stuff to the host. 3351 */ 3348 3352 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()); */ 3351 3357 if ( !pVCpu->hm.s.fTrapXcptGpForLovelyMesaDrv 3352 || !nemHcWinIsMesaDrvGp(pVCpu, pCtx, pMsg->InstructionBytes, pMsg->InstructionByteCount))3358 || !nemHcWinIsMesaDrvGp(pVCpu, &pVCpu->cpum.GstCtx, pMsg->InstructionBytes, pMsg->InstructionByteCount)) 3353 3359 { 3354 3360 # if 1 /** @todo Need to emulate instruction or we get a triple fault when trying to inject the #GP... */ 3355 3361 rcStrict = IEMExecOneWithPrefetchedByPC(pVCpu, CPUMCTX2CORE(&pVCpu->cpum.GstCtx), pMsg->Header.Rip, 3356 3362 pMsg->InstructionBytes, pMsg->InstructionByteCount); … … 3358 3364 pVCpu->idCpu, pMsg->Header.CsSegment.Selector, pMsg->Header.Rip, 3359 3365 nemHCWinExecStateToLogStr(&pMsg->Header), VBOXSTRICTRC_VAL(rcStrict) )); 3360 STAM_REL_COUNTER_INC(&pVCpu->nem.s.StatExitExceptionUdHandled);3361 3366 return rcStrict; 3367 # else 3368 break; 3369 # endif 3362 3370 } 3363 return nemHcWinHandleMesaDrvGp(pVCpu, pCtx);3364 }3371 STAM_REL_COUNTER_INC(&pVCpu->nem.s.StatExitExceptionGpMesa); 3372 return nemHcWinHandleMesaDrvGp(pVCpu, &pVCpu->cpum.GstCtx); 3365 3373 3366 3374 /* … … 3464 3472 break; 3465 3473 3474 /* 3475 * Workaround the lovely mesa driver assuming that vmsvga means vmware 3476 * hypervisor and tries to log stuff to the host. 3477 */ 3466 3478 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()); */ 3469 3483 if ( !pVCpu->nem.s.fTrapXcptGpForLovelyMesaDrv 3470 || !nemHcWinIsMesaDrvGp(pVCpu, pCtx, pExit->VpException.InstructionBytes,3484 || !nemHcWinIsMesaDrvGp(pVCpu, &pVCpu->cpum.GstCtx, pExit->VpException.InstructionBytes, 3471 3485 pExit->VpException.InstructionByteCount)) 3472 3486 { 3473 3487 # if 1 /** @todo Need to emulate instruction or we get a triple fault when trying to inject the #GP... */ 3474 3488 rcStrict = IEMExecOneWithPrefetchedByPC(pVCpu, CPUMCTX2CORE(&pVCpu->cpum.GstCtx), pExit->VpContext.Rip, 3475 3489 pExit->VpException.InstructionBytes, … … 3480 3494 STAM_REL_COUNTER_INC(&pVCpu->nem.s.StatExitExceptionUdHandled); 3481 3495 return rcStrict; 3496 # else 3497 break; 3498 # endif 3482 3499 } 3483 return nemHcWinHandleMesaDrvGp(pVCpu, pCtx);3484 }3500 STAM_REL_COUNTER_INC(&pVCpu->nem.s.StatExitExceptionGpMesa); 3501 return nemHcWinHandleMesaDrvGp(pVCpu, &pVCpu->cpum.GstCtx); 3485 3502 3486 3503 /* -
trunk/src/VBox/VMM/VMMR3/NEMR3.cpp
r86115 r86117 109 109 #endif 110 110 111 /** @cfgm{/ HM/LovelyMesaDrvWorkaround,bool}111 /** @cfgm{/NEM/LovelyMesaDrvWorkaround, bool, false} 112 112 * Workaround for mesa vmsvga 3d driver making incorrect assumptions about 113 113 * the hypervisor it is running under. */ -
trunk/src/VBox/VMM/VMMR3/NEMR3Native-win.cpp
r86115 r86117 1258 1258 STAMR3RegisterF(pVM, &pNemCpu->StatExitExceptionBp, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES, "Number of #BP exits", "/NEM/CPU%u/ExitExceptionBp", idCpu); 1259 1259 STAMR3RegisterF(pVM, &pNemCpu->StatExitExceptionDb, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES, "Number of #DB exits", "/NEM/CPU%u/ExitExceptionDb", idCpu); 1260 STAMR3RegisterF(pVM, &pNemCpu->StatExitExceptionGp, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES, "Number of #GP exits", "/NEM/CPU%u/ExitExceptionGp", idCpu); 1261 STAMR3RegisterF(pVM, &pNemCpu->StatExitExceptionGpMesa, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES, "Number of #GP exits from mesa driver", "/NEM/CPU%u/ExitExceptionGpMesa", idCpu); 1260 1262 STAMR3RegisterF(pVM, &pNemCpu->StatExitExceptionUd, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES, "Number of #UD exits", "/NEM/CPU%u/ExitExceptionUd", idCpu); 1261 1263 STAMR3RegisterF(pVM, &pNemCpu->StatExitExceptionUdHandled, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES, "Number of handled #UD exits", "/NEM/CPU%u/ExitExceptionUdHandled", idCpu); -
trunk/src/VBox/VMM/include/NEMInternal.h
r86115 r86117 307 307 STAMCOUNTER StatExitExceptionBp; 308 308 STAMCOUNTER StatExitExceptionDb; 309 STAMCOUNTER StatExitExceptionGp; 310 STAMCOUNTER StatExitExceptionGpMesa; 309 311 STAMCOUNTER StatExitExceptionUd; 310 312 STAMCOUNTER StatExitExceptionUdHandled;
Note:
See TracChangeset
for help on using the changeset viewer.