VirtualBox

Ignore:
Timestamp:
Sep 9, 2020 3:23:22 PM (4 years ago)
Author:
vboxsync
Message:

AMD IOMMU: bugref:9654 Set the ComWaitInt bit in the Status register only when the COMPLETION_WAIT command requests it explicitly.

File:
1 edited

Legend:

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

    r86031 r86075  
    28182818    IOMMU_ASSERT_NOT_LOCKED(pDevIns);
    28192819
    2820     LogFlowFunc(("\n"));
    2821 
    28222820    PIOMMU pThis = PDMDEVINS_2_DATA(pDevIns, PIOMMU);
    28232821    STAM_COUNTER_INC(&pThis->StatCmd);
     
    28362834            if (!(pCmdComWait->au64[0] & ~IOMMU_CMD_COM_WAIT_QWORD_0_VALID_MASK))
    28372835            {
    2838                 /* If Completion Store is requested, write the StoreData to the specified address.*/
     2836                /* If Completion Store is requested, write the StoreData to the specified address. */
    28392837                if (pCmdComWait->n.u1Store)
    28402838                {
     
    28512849                }
    28522850
    2853                 IOMMU_LOCK(pDevIns);
    2854 
    2855                 /* Indicate that this command has completed. */
    2856                 ASMAtomicOrU64(&pThis->Status.u64, IOMMU_STATUS_COMPLETION_WAIT_INTR);
    2857 
    28582851                /* If the command requests an interrupt and completion wait interrupts are enabled, raise it. */
    28592852                if (pCmdComWait->n.u1Interrupt)
    28602853                {
     2854                    IOMMU_LOCK(pDevIns);
     2855                    ASMAtomicOrU64(&pThis->Status.u64, IOMMU_STATUS_COMPLETION_WAIT_INTR);
    28612856                    IOMMU_CTRL_T const Ctrl = iommuAmdGetCtrl(pThis);
    2862                     if (Ctrl.n.u1CompWaitIntrEn)
     2857                    bool const fRaiseInt = Ctrl.n.u1CompWaitIntrEn;
     2858                    IOMMU_UNLOCK(pDevIns);
     2859
     2860                    if (fRaiseInt)
    28632861                        iommuAmdRaiseMsiInterrupt(pDevIns);
    28642862                }
    28652863
    2866                 IOMMU_UNLOCK(pDevIns);
    28672864                return VINF_SUCCESS;
    28682865            }
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