Changeset 72266 in vbox for trunk/src/VBox/VMM/VMMR3/TRPM.cpp
- Timestamp:
- May 20, 2018 4:14:53 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/TRPM.cpp
r70948 r72266 87 87 #include <VBox/vmm/csam.h> 88 88 #include <VBox/vmm/patm.h> 89 #include <VBox/vmm/iem.h> 89 90 #include "TRPMInternal.h" 90 91 #include <VBox/vmm/vm.h> … … 1520 1521 if (EMIsSupervisorCodeRecompiled(pVM) || !VM_IS_RAW_MODE_ENABLED(pVM)) 1521 1522 { 1522 rc = TRPMAssertTrap(pVCpu, u8Interrupt, enmEvent);1523 AssertRC(rc);1524 1523 STAM_COUNTER_INC(&pVM->trpm.s.paStatForwardedIRQR3[u8Interrupt]); 1525 return HMR3IsActive(pVCpu) ? VINF_EM_RESCHEDULE_HM : VINF_EM_RESCHEDULE_REM; 1526 } 1524 if (!VM_IS_NEM_ENABLED(pVM)) 1525 { 1526 rc = TRPMAssertTrap(pVCpu, u8Interrupt, enmEvent); 1527 AssertRC(rc); 1528 return HMR3IsActive(pVCpu) ? VINF_EM_RESCHEDULE_HM : VINF_EM_RESCHEDULE_REM; 1529 } 1530 VBOXSTRICTRC rcStrict = IEMInjectTrap(pVCpu, u8Interrupt, enmEvent, 0, 0, 0); 1531 if (rcStrict == VINF_SUCCESS) 1532 return VINF_EM_RESCHEDULE; 1533 return VBOXSTRICTRC_TODO(rcStrict); 1534 } 1535 1527 1536 /* If the guest gate is not patched, then we will check (again) if we can patch it. */ 1528 1537 if (pVM->trpm.s.aGuestTrapHandler[u8Interrupt] == TRPM_INVALID_HANDLER) … … 1559 1568 /* Can happen if the interrupt is masked by TPR or APIC is disabled. */ 1560 1569 AssertMsg(rc == VERR_APIC_INTR_MASKED_BY_TPR || rc == VERR_NO_DATA, ("PDMGetInterrupt failed. rc=%Rrc\n", rc)); 1561 return HMR3IsActive(pVCpu) ? VINF_EM_RESCHEDULE_HM : VINF_EM_RESCHEDULE_REM; /* (Heed the halted state if this is changed!) */ 1570 return HMR3IsActive(pVCpu) ? VINF_EM_RESCHEDULE_HM 1571 : VM_IS_NEM_ENABLED(pVM) ? VINF_EM_RESCHEDULE 1572 : VINF_EM_RESCHEDULE_REM; /* (Heed the halted state if this is changed!) */ 1562 1573 } 1563 1574 … … 1577 1588 if (RT_SUCCESS(rc)) 1578 1589 { 1579 rc = TRPMAssertTrap(pVCpu, u8Interrupt, TRPM_HARDWARE_INT); 1580 AssertRC(rc); 1590 if (!VM_IS_NEM_ENABLED(pVM)) 1591 { 1592 rc = TRPMAssertTrap(pVCpu, u8Interrupt, TRPM_HARDWARE_INT); 1593 AssertRC(rc); 1594 } 1595 else 1596 { 1597 VBOXSTRICTRC rcStrict = IEMInjectTrap(pVCpu, u8Interrupt, enmEvent, 0, 0, 0); 1598 if (rcStrict != VINF_SUCCESS) 1599 return VBOXSTRICTRC_TODO(rcStrict); 1600 } 1581 1601 STAM_COUNTER_INC(&pVM->trpm.s.paStatForwardedIRQR3[u8Interrupt]); 1582 1602 } … … 1586 1606 AssertMsg(rc == VERR_APIC_INTR_MASKED_BY_TPR || rc == VERR_NO_DATA, ("PDMGetInterrupt failed. rc=%Rrc\n", rc)); 1587 1607 } 1588 return HMR3IsActive(pVCpu) ? VINF_EM_RESCHEDULE_HM : VINF_EM_RESCHEDULE_REM; /* (Heed the halted state if this is changed!) */ 1608 return HMR3IsActive(pVCpu) ? VINF_EM_RESCHEDULE_HM 1609 : VM_IS_NEM_ENABLED(pVM) ? VINF_EM_RESCHEDULE 1610 : VINF_EM_RESCHEDULE_REM; /* (Heed the halted state if this is changed!) */ 1589 1611 #endif /* !TRPM_FORWARD_TRAPS_IN_GC || IEM_VERIFICATION_MODE */ 1590 1591 1612 } 1592 1613
Note:
See TracChangeset
for help on using the changeset viewer.