VirtualBox

Changeset 84566 in vbox


Ignore:
Timestamp:
May 27, 2020 2:34:25 PM (5 years ago)
Author:
vboxsync
Message:

AMD IOMMU: bugref:9654 Interrupt remapping bits.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Bus/DevIommuAmd.cpp

    r84560 r84566  
    46834683                    /* Preserve all bits from the source MSI address that don't map 1:1 from the IRTE. */
    46844684                    pMsiAddrOut->u64 = GCPhysIn;
    4685                     pMsiAddrOut->n.u1DestMode  = Irte.n.u1DestMode;
    4686                     pMsiAddrOut->n.u8DestId    = Irte.n.u8Dest;
     4685                    pMsiAddrOut->n.u1DestMode = Irte.n.u1DestMode;
     4686                    pMsiAddrOut->n.u8DestId   = Irte.n.u8Dest;
    46874687
    46884688                    /* Preserve all bits from the source MSI data that don't map 1:1 from the IRTE. */
    46894689                    pMsiDataOut->u32 = uDataIn;
    4690                     pMsiDataOut->n.u8Vector = Irte.n.u8Vector;
     4690                    pMsiDataOut->n.u8Vector       = Irte.n.u8Vector;
    46914691                    pMsiDataOut->n.u3DeliveryMode = Irte.n.u3IntrType;
    46924692
     
    48144814                            uint32_t const uIntTabLen = Dte.n.u4IntrTableLength;
    48154815                            if (Dte.n.u4IntrTableLength < 12)
    4816                             { /* likely */ }
    4817                             else
    48184816                            {
    4819                                 Log((IOMMU_LOG_PFX ": Invalid interrupt table length %#x -> Illegal DTE\n", uIntTabLen));
    4820                                 EVT_ILLEGAL_DTE_T Event;
    4821                                 iommuAmdInitIllegalDteEvent(uDevId, GCPhysIn, false /* fRsvdNotZero */, enmOp, &Event);
    4822                                 iommuAmdRaiseIllegalDteEvent(pDevIns, enmOp, &Event, kIllegalDteType_RsvdIntTabLen);
    4823                                 return VERR_IOMMU_INTR_REMAP_FAILED;
     4817                                /*
     4818                                 * We don't support guest interrupt remapping yet. When we do, we'll need to
     4819                                 * check Ctrl.u1GstVirtApicEn and use the guest Virtual APIC Table Root Pointer
     4820                                 * in the DTE rather than the Interrupt Root Table Pointer. Since the caller
     4821                                 * already reads the control register, add that as a parameter when we eventually
     4822                                 * support guest interrupt remapping. For now, just assert.
     4823                                 */
     4824                                PIOMMU pThis = PDMDEVINS_2_DATA(pDevIns, PIOMMU);
     4825                                Assert(!pThis->ExtFeat.n.u1GstVirtApicSup);
     4826                                NOREF(pThis);
     4827
     4828                                return iommuAmdRemapIntr(pDevIns, uDevId, &Dte, GCPhysIn, uDataIn, enmOp, pGCPhysOut, puDataOut);
    48244829                            }
    48254830
    4826                             /*
    4827                              * We don't support guest interrupt remapping yet. When we do, we'll need to
    4828                              * check Ctrl.u1GstVirtApicEn and use the guest Virtual APIC Table Root Pointer
    4829                              * in the DTE rather than the Interrupt Root Table Pointer. Since the caller
    4830                              * already reads the control register, add that as a parameter when we eventually
    4831                              * support guest interrupt remapping. For now, just assert.
    4832                              */
    4833                             PIOMMU pThis = PDMDEVINS_2_DATA(pDevIns, PIOMMU);
    4834                             Assert(!pThis->ExtFeat.n.u1GstVirtApicSup);
    4835                             NOREF(pThis);
    4836 
    4837                             return iommuAmdRemapIntr(pDevIns, uDevId, &Dte, GCPhysIn, uDataIn, enmOp, pGCPhysOut, puDataOut);
     4831                            Log((IOMMU_LOG_PFX ": Invalid interrupt table length %#x -> Illegal DTE\n", uIntTabLen));
     4832                            EVT_ILLEGAL_DTE_T Event;
     4833                            iommuAmdInitIllegalDteEvent(uDevId, GCPhysIn, false /* fRsvdNotZero */, enmOp, &Event);
     4834                            iommuAmdRaiseIllegalDteEvent(pDevIns, enmOp, &Event, kIllegalDteType_RsvdIntTabLen);
     4835                            return VERR_IOMMU_INTR_REMAP_FAILED;
    48384836                        }
    48394837
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette