VirtualBox

Changeset 88636 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 21, 2021 5:54:15 PM (4 years ago)
Author:
vboxsync
Message:

AMD IOMMU: bugref:9654 Fix pdmIommuIsPresent to refer to ring-3 pointer and a todo for the future.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/PDMAllIommu.cpp

    r88631 r88636  
    7575bool pdmIommuIsPresent(PPDMDEVINS pDevIns)
    7676{
    77     PPDMIOMMU pIommu = PDMDEVINS_TO_IOMMU(pDevIns);
    78     return pIommu != 0;
     77#ifdef IN_RING0
     78    PCPDMIOMMUR3 pIommuR3 = &pDevIns->Internal.s.pGVM->pdm.s.aIommus[0];
     79#else
     80    PCPDMIOMMUR3 pIommuR3 = &pDevIns->Internal.s.pVMR3->pdm.s.aIommus[0];
     81#endif
     82    return pIommuR3->pDevInsR3 != NULL;
    7983}
    8084
     
    96100        return rc;
    97101    }
     102    /** @todo Should we return an rc such that we can reschedule to R3 if R0 isn't
     103     *        enabled?  Is that even viable with the state the I/O APIC would be in? */
    98104    return VERR_IOMMU_NOT_PRESENT;
    99105}
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