Changeset 84539 in vbox for trunk/src/VBox/Devices
- Timestamp:
- May 26, 2020 1:34:11 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Bus/DevIommuAmd.cpp
r84530 r84539 768 768 uint32_t u3IntrType : 1; /**< Bits 4:2 - IntType: Interrupt Type. */ 769 769 uint32_t u1ReqEoi : 1; /**< Bit 5 - RqEoi: Request EOI. */ 770 uint32_t u1D stMode : 1;/**< Bit 6 - DM: Destination Mode. */770 uint32_t u1DestMode : 1; /**< Bit 6 - DM: Destination Mode. */ 771 771 uint32_t u1GuestMode : 1; /**< Bit 7 - GuestMode. */ 772 uint32_t u8D st : 8;/**< Bits 15:8 - Destination. */772 uint32_t u8Dest : 8; /**< Bits 15:8 - Destination. */ 773 773 uint32_t u8Vector : 8; /**< Bits 23:16 - Vector. */ 774 774 uint32_t u8Rsvd0 : 8; /**< Bits 31:24 - Reserved. */ … … 4615 4615 /* Ensure the IRTE offset is within the specified table size. */ 4616 4616 Assert(pDte->n.u4IntrTableLength < 12); 4617 if (offIrte <(1 << pDte->n.u4IntrTableLength) << IOMMU_IRTE_SIZE_SHIFT)4617 if (offIrte + sizeof(IRTE_T) <= (1 << pDte->n.u4IntrTableLength) << IOMMU_IRTE_SIZE_SHIFT) 4618 4618 { /* likely */ } 4619 4619 else … … 4633 4633 return VINF_SUCCESS; 4634 4634 4635 /** @todo r=ramshankar: The IOMMU spec. does not tell what kind of erroris4636 * reported in this situation. Is it an I/O page fault or a device table4637 * hardware error? There's no interrupt table hardware error event, but4638 * it's unclear whatwe should do here. */4635 /** @todo The IOMMU spec. does not tell what kind of error is reported in this 4636 * situation. Is it an I/O page fault or a device table hardware error? 4637 * There's no interrupt table hardware error event, but it's unclear what 4638 * we should do here. */ 4639 4639 Log((IOMMU_LOG_PFX ": Failed to read interrupt table entry at %#RGp. rc=%Rrc -> ???\n", GCPhysIrte, rc)); 4640 4640 return VERR_IOMMU_IPE_4; … … 4666 4666 if (RT_SUCCESS(rc)) 4667 4667 { 4668 /** @todo Remap. */ 4668 if (Irte.n.u1RemapEnable) 4669 { 4670 if ( !Irte.n.u1GuestMode 4671 && Irte.n.u3IntrType < VBOX_MSI_DELIVERY_MODE_LOWEST_PRIO) 4672 { 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; 4693 } 4694 /** @todo IOMMU: Raise IOPF. */ 4695 return VERR_NOT_IMPLEMENTED; 4696 4697 } 4698 /** @todo IOMMU: Raise IOPF. */ 4669 4699 return VERR_NOT_IMPLEMENTED; 4670 4700 }
Note:
See TracChangeset
for help on using the changeset viewer.