Changeset 84560 in vbox
- Timestamp:
- May 27, 2020 12:45:28 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Bus/DevIommuAmd.cpp
r84539 r84560 4668 4668 if (Irte.n.u1RemapEnable) 4669 4669 { 4670 if ( !Irte.n.u1GuestMode 4671 && Irte.n.u3IntrType < VBOX_MSI_DELIVERY_MODE_LOWEST_PRIO) 4670 if (!Irte.n.u1GuestMode) 4672 4671 { 4673 MSI_ADDR_T MsiAddrIn; 4674 MsiAddrIn.u64 = GCPhysIn; 4675 4676 MSI_DATA_T MsiDataIn; 4677 MsiDataIn.u32 = uDataIn; 4678 4679 PMSI_ADDR_T pMsiAddrOut = (PMSI_ADDR_T)pGCPhysOut; 4680 PMSI_DATA_T pMsiDataOut = (PMSI_DATA_T)puDataOut; 4681 4682 /* Preserve all bits from the source MSI address that don't map 1:1 from the IRTE. */ 4683 pMsiAddrOut->u64 = GCPhysIn; 4684 pMsiAddrOut->n.u1DestMode = Irte.n.u1DestMode; 4685 pMsiAddrOut->n.u8DestId = Irte.n.u8Dest; 4686 4687 /* Preserve all bits from the source MSI data that don't map 1:1 from the IRTE. */ 4688 pMsiDataOut->u32 = uDataIn; 4689 pMsiDataOut->n.u8Vector = Irte.n.u8Vector; 4690 pMsiDataOut->n.u3DeliveryMode = Irte.n.u3IntrType; 4691 4692 return VINF_SUCCESS; 4672 if (Irte.n.u3IntrType < VBOX_MSI_DELIVERY_MODE_LOWEST_PRIO) 4673 { 4674 MSI_ADDR_T MsiAddrIn; 4675 MsiAddrIn.u64 = GCPhysIn; 4676 4677 MSI_DATA_T MsiDataIn; 4678 MsiDataIn.u32 = uDataIn; 4679 4680 PMSI_ADDR_T pMsiAddrOut = (PMSI_ADDR_T)pGCPhysOut; 4681 PMSI_DATA_T pMsiDataOut = (PMSI_DATA_T)puDataOut; 4682 4683 /* Preserve all bits from the source MSI address that don't map 1:1 from the IRTE. */ 4684 pMsiAddrOut->u64 = GCPhysIn; 4685 pMsiAddrOut->n.u1DestMode = Irte.n.u1DestMode; 4686 pMsiAddrOut->n.u8DestId = Irte.n.u8Dest; 4687 4688 /* Preserve all bits from the source MSI data that don't map 1:1 from the IRTE. */ 4689 pMsiDataOut->u32 = uDataIn; 4690 pMsiDataOut->n.u8Vector = Irte.n.u8Vector; 4691 pMsiDataOut->n.u3DeliveryMode = Irte.n.u3IntrType; 4692 4693 return VINF_SUCCESS; 4694 } 4695 4696 Log((IOMMU_LOG_PFX ": Interrupt type (%#x) invalid -> IOPF", Irte.n.u3IntrType)); 4697 EVT_IO_PAGE_FAULT_T EvtIoPageFault; 4698 iommuAmdInitIoPageFaultEvent(uDevId, pDte->n.u16DomainId, GCPhysIn, Irte.n.u1RemapEnable, true /* fRsvdNotZero */, 4699 false /* fPermDenied */, enmOp, &EvtIoPageFault); 4700 iommuAmdRaiseIoPageFaultEvent(pDevIns, pDte, &Irte, enmOp, &EvtIoPageFault, kIoPageFaultType_IrteRsvdIntType); 4701 return VERR_IOMMU_ADDR_TRANSLATION_FAILED; 4693 4702 } 4694 /** @todo IOMMU: Raise IOPF. */ 4695 return VERR_NOT_IMPLEMENTED; 4696 4697 } 4698 /** @todo IOMMU: Raise IOPF. */ 4699 return VERR_NOT_IMPLEMENTED; 4700 } 4701 4702 RT_NOREF(pGCPhysOut, puDataOut); 4703 4704 Log((IOMMU_LOG_PFX ": Guest mode not supported -> IOPF")); 4705 EVT_IO_PAGE_FAULT_T EvtIoPageFault; 4706 iommuAmdInitIoPageFaultEvent(uDevId, pDte->n.u16DomainId, GCPhysIn, Irte.n.u1RemapEnable, true /* fRsvdNotZero */, 4707 false /* fPermDenied */, enmOp, &EvtIoPageFault); 4708 iommuAmdRaiseIoPageFaultEvent(pDevIns, pDte, &Irte, enmOp, &EvtIoPageFault, kIoPageFaultType_IrteRsvdNotZero); 4709 return VERR_IOMMU_ADDR_TRANSLATION_FAILED; 4710 } 4711 4712 Log((IOMMU_LOG_PFX ": Remapping disabled -> IOPF")); 4713 EVT_IO_PAGE_FAULT_T EvtIoPageFault; 4714 iommuAmdInitIoPageFaultEvent(uDevId, pDte->n.u16DomainId, GCPhysIn, Irte.n.u1RemapEnable, false /* fRsvdNotZero */, 4715 false /* fPermDenied */, enmOp, &EvtIoPageFault); 4716 iommuAmdRaiseIoPageFaultEvent(pDevIns, pDte, &Irte, enmOp, &EvtIoPageFault, kIoPageFaultType_IrteRemapEn); 4717 return VERR_IOMMU_ADDR_TRANSLATION_FAILED; 4718 } 4719 4703 4720 return rc; 4704 4721 }
Note:
See TracChangeset
for help on using the changeset viewer.