Changeset 77902 in vbox
- Timestamp:
- Mar 27, 2019 8:49:11 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/hm.h
r76993 r77902 166 166 * in CPUM. 167 167 * @{ */ 168 VMM_INT_DECL(TRPMEVENT) HMSvmEventToTrpmEventType(PCSVMEVENT pSvmEvent );168 VMM_INT_DECL(TRPMEVENT) HMSvmEventToTrpmEventType(PCSVMEVENT pSvmEvent, uint8_t uVector); 169 169 /** @} */ 170 170 -
trunk/src/VBox/VMM/VMMAll/HMSVMAll.cpp
r77714 r77902 437 437 * 438 438 * @param pEvent Pointer to the SVM event. 439 */ 440 VMM_INT_DECL(TRPMEVENT) HMSvmEventToTrpmEventType(PCSVMEVENT pEvent) 439 * @param uVector The vector associated with the event. 440 */ 441 VMM_INT_DECL(TRPMEVENT) HMSvmEventToTrpmEventType(PCSVMEVENT pEvent, uint8_t uVector) 441 442 { 442 443 uint8_t const uType = pEvent->n.u3Type; … … 445 446 case SVM_EVENT_EXTERNAL_IRQ: return TRPM_HARDWARE_INT; 446 447 case SVM_EVENT_SOFTWARE_INT: return TRPM_SOFTWARE_INT; 448 case SVM_EVENT_NMI: return TRPM_TRAP; 447 449 case SVM_EVENT_EXCEPTION: 448 case SVM_EVENT_NMI: return TRPM_TRAP; 450 { 451 if ( uVector == X86_XCPT_BP 452 || uVector == X86_XCPT_OF) 453 return TRPM_SOFTWARE_INT; 454 return TRPM_TRAP; 455 } 449 456 default: 450 457 break; -
trunk/src/VBox/VMM/VMMAll/IEMAllCImplSvmInstr.cpp.h
r76993 r77902 769 769 { 770 770 uint8_t const uVector = pEventInject->n.u8Vector; 771 TRPMEVENT const enmType = HMSvmEventToTrpmEventType(pEventInject );771 TRPMEVENT const enmType = HMSvmEventToTrpmEventType(pEventInject, uVector); 772 772 uint16_t const uErrorCode = pEventInject->n.u1ErrorCodeValid ? pEventInject->n.u32ErrorCode : 0; 773 773 -
trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp
r77281 r77902 3587 3587 uint8_t uVector = Event.n.u8Vector; 3588 3588 uint8_t uVectorType = Event.n.u3Type; 3589 TRPMEVENT enmTrapType = HMSvmEventToTrpmEventType(&Event );3589 TRPMEVENT enmTrapType = HMSvmEventToTrpmEventType(&Event, uVector); 3590 3590 3591 3591 Log4(("HM event->TRPM: uVector=%#x enmTrapType=%d\n", uVector, uVectorType)); … … 3597 3597 TRPMSetErrorCode(pVCpu, Event.n.u32ErrorCode); 3598 3598 3599 if ( uVectorType == SVM_EVENT_EXCEPTION3599 if ( enmTrapType == TRPM_TRAP 3600 3600 && uVector == X86_XCPT_PF) 3601 3601 { … … 3603 3603 Assert(pVCpu->hm.s.Event.GCPtrFaultAddress == CPUMGetGuestCR2(pVCpu)); 3604 3604 } 3605 else if (uVectorType == SVM_EVENT_SOFTWARE_INT) 3606 { 3607 AssertMsg( uVectorType == SVM_EVENT_SOFTWARE_INT 3608 || (uVector == X86_XCPT_BP || uVector == X86_XCPT_OF), 3609 ("Invalid vector: uVector=%#x uVectorType=%#x\n", uVector, uVectorType)); 3605 else if (enmTrapType == TRPM_SOFTWARE_INT) 3610 3606 TRPMSetInstrLength(pVCpu, pVCpu->hm.s.Event.cbInstr); 3611 }3612 3607 pVCpu->hm.s.Event.fPending = false; 3613 3608 }
Note:
See TracChangeset
for help on using the changeset viewer.