Changeset 108448 in vbox for trunk/src/VBox/VMM/VMMAll/GICAll.cpp
- Timestamp:
- Mar 5, 2025 9:20:57 AM (7 weeks ago)
- svn:sync-xref-src-repo-rev:
- 167822
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/GICAll.cpp
r108447 r108448 1653 1653 1654 1654 1655 #if 0 1655 1656 /** 1656 1657 * Gets the highest priority pending distributor interrupt that can be forwarded to … … 1811 1812 return uIntId; 1812 1813 } 1814 #endif 1813 1815 1814 1816 … … 1987 1989 LogFlowFunc(("fGroup0=%RTbool fGroup1=%RTbool\n", fGroup0, fGroup1)); 1988 1990 1989 /** @todo Later combine the redistributor and distributor interrupt1990 * gathering. */1991 1992 1991 /* Get highest priority pending interrupt from the distributor. */ 1993 uint8_t bPriority; 1994 uint16_t idxIntr; 1995 uint16_t uIntId = gicDistGetHighestPrioPendingIntr(pGicDev, fGroup0, fGroup1, &idxIntr, &bPriority); 1996 1997 /* Compare with the highest priority pending interrupt from the redistributor. */ 1998 PGICCPU pGicCpu = VMCPU_TO_GICCPU(pVCpu); 1999 bool fInRedist = false; 2000 uint8_t bPriorityRedist; 2001 uint16_t idxRedistIntr; 2002 uint16_t const uIntIdRedist = gicReDistGetHighestPrioPendingIntr(pGicCpu, fGroup0, fGroup1, &idxRedistIntr, &bPriorityRedist); 2003 if ( uIntIdRedist != GIC_INTID_RANGE_SPECIAL_NO_INTERRUPT 2004 && bPriorityRedist < bPriority) 2005 { 2006 fInRedist = true; 2007 bPriority = bPriorityRedist; 2008 uIntId = uIntIdRedist; 2009 idxIntr = idxRedistIntr; 2010 } 2011 2012 /* Sanity check if the interrupt ID is within known ranges. */ 2013 Assert( GIC_IS_INTR_SGI_OR_PPI(uIntId) 2014 || GIC_IS_INTR_SPI(uIntId) 2015 || GIC_IS_INTR_EXT_PPI(uIntId) 2016 || GIC_IS_INTR_EXT_SPI(uIntId) 2017 || uIntId == GIC_INTID_RANGE_SPECIAL_NO_INTERRUPT); 2018 /* Ensure that if no interrupt is pending, the priority is appropriate. */ 2019 Assert(uIntId != GIC_INTID_RANGE_SPECIAL_NO_INTERRUPT || bPriority == GIC_IDLE_PRIORITY); 1992 uint8_t bPriority; 1993 uint16_t idxIntr; 1994 PGICCPU pGicCpu = VMCPU_TO_GICCPU(pVCpu); 1995 uint16_t const uIntId = gicGetHighestPrioPendingIntrEx(pGicDev, pGicCpu, fGroup0, fGroup1, &idxIntr, &bPriority); 2020 1996 2021 1997 /* Acknowledge the interrupt. */ 2022 1998 if (uIntId != GIC_INTID_RANGE_SPECIAL_NO_INTERRUPT) 2023 1999 { 2024 if (fInRedist) 2000 bool const fIsRedistIntId = GIC_IS_INTR_SGI_OR_PPI(uIntId) || GIC_IS_INTR_EXT_PPI(uIntId); 2001 if (fIsRedistIntId) 2025 2002 { 2026 2003 /** @todo Check if the interrupt has sufficient priority (preemption level … … 2053 2030 * checking?). */ 2054 2031 2032 /* Sanity check if the interrupt ID belongs to the distirbutor. */ 2033 Assert(GIC_IS_INTR_SPI(uIntId) || GIC_IS_INTR_EXT_SPI(uIntId)); 2034 2055 2035 /* Mark the interrupt as active. */ 2056 2036 Assert(idxIntr < sizeof(pGicDev->bmIntrActive) * 8); … … 2070 2050 } 2071 2051 } 2052 else 2053 Assert(bPriority == GIC_IDLE_PRIORITY); 2072 2054 2073 2055 LogFlowFunc(("uIntId=%u\n", uIntId));
Note:
See TracChangeset
for help on using the changeset viewer.