Changeset 86117 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Sep 14, 2020 8:03:03 AM (4 years ago)
- File:
-
- 1 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 /*
Note:
See TracChangeset
for help on using the changeset viewer.