Changeset 89035 in vbox for trunk/src/VBox/Devices/PC
- Timestamp:
- May 13, 2021 2:24:30 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/DevIoApic.cpp
r89032 r89035 611 611 * the origin of the interrupt, see @bugref{9654#c74}. 612 612 */ 613 MSIMSG MsiOut;614 613 MSIMSG MsiIn; 615 RT_ZERO(MsiOut);616 614 RT_ZERO(MsiIn); 617 615 ioapicGetMsiFromRte(u64Rte, pThis->enmType, &MsiIn); 616 617 MSIMSG MsiOut; 618 618 int const rcRemap = pThisCC->pIoApicHlp->pfnIommuMsiRemap(pDevIns, VBOX_PCI_BDF_SB_IOAPIC, &MsiIn, &MsiOut); 619 619 if ( rcRemap == VERR_IOMMU_NOT_PRESENT 620 620 || rcRemap == VERR_IOMMU_CANNOT_CALL_SELF) 621 MsiOut = MsiIn;621 { /* likely - assuming majority of VMs don't have IOMMU configured. */ } 622 622 else if (RT_SUCCESS(rcRemap)) 623 { 624 /* Update the APIC interrupt with the remapped data. */ 625 ioapicGetApicIntrFromMsi(&MsiOut, &ApicIntr); 626 627 /* Ensure polarity hasn't changed (trigger mode might change with Intel IOMMUs). */ 628 Assert(ApicIntr.u8Polarity == IOAPIC_RTE_GET_POLARITY(u64Rte)); 623 629 STAM_COUNTER_INC(&pThis->StatIommuRemappedIntr); 630 } 624 631 else 625 632 { … … 627 634 return; 628 635 } 629 630 /* Update the APIC interrupt with the remapped data. */631 ioapicGetApicIntrFromMsi(&MsiOut, &ApicIntr);632 633 /* Ensure polarity hasn't changed (trigger mode might change with Intel IOMMUs). */634 Assert(ApicIntr.u8Polarity == IOAPIC_RTE_GET_POLARITY(u64Rte));635 636 #endif 636 637 … … 1010 1011 { 1011 1012 MSIMSG MsiOut; 1012 RT_ZERO(MsiOut);1013 1013 int const rcRemap = pThisCC->pIoApicHlp->pfnIommuMsiRemap(pDevIns, uBusDevFn, pMsi, &MsiOut); 1014 1014 if ( rcRemap == VERR_IOMMU_NOT_PRESENT 1015 1015 || rcRemap == VERR_IOMMU_CANNOT_CALL_SELF) 1016 MsiOut = *pMsi;1016 { /* likely - assuming majority of VMs don't have IOMMU configured. */ } 1017 1017 else if (RT_SUCCESS(rcRemap)) 1018 { 1018 1019 STAM_COUNTER_INC(&pThis->StatIommuRemappedMsi); 1020 ioapicGetApicIntrFromMsi(&MsiOut, &ApicIntr); 1021 } 1019 1022 else 1020 1023 { … … 1022 1025 return; 1023 1026 } 1024 ioapicGetApicIntrFromMsi(&MsiOut, &ApicIntr);1025 1027 } 1026 1028 else
Note:
See TracChangeset
for help on using the changeset viewer.