Changeset 108976 in vbox for trunk/src/VBox/VMM/VMMAll/GICAll.cpp
- Timestamp:
- Apr 15, 2025 12:30:07 PM (4 weeks ago)
- svn:sync-xref-src-repo-rev:
- 168496
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/GICAll.cpp
r108946 r108976 661 661 662 662 663 static void gicDistReadLpiConfigTableFromMemory(PPDMDEVINS pDevIns, PGICDEV pGicDev) 664 { 665 Assert(pGicDev->fEnableLpis); 666 LogFlowFunc(("\n")); 667 668 /* Check if the guest is disabling LPIs by setting GICR_PROPBASER.IDBits < 13. */ 669 uint8_t const cIdBits = RT_BF_GET(pGicDev->uLpiConfigBaseReg.u, GIC_BF_REDIST_REG_PROPBASER_ID_BITS) + 1; 670 if (cIdBits < GIC_LPI_ID_BITS_MIN) 671 return; 672 673 /* Copy the LPI config table from guest memory to our internal cache. */ 674 Assert(UINT32_C(2) << pGicDev->uMaxLpi <= RT_ELEMENTS(pGicDev->abLpiConfig)); 675 RTGCPHYS const GCPhysLpiConfigTable = pGicDev->uLpiConfigBaseReg.u & GIC_BF_REDIST_REG_PROPBASER_PHYS_ADDR_MASK; 676 uint32_t const cbLpiConfigTable = sizeof(pGicDev->abLpiConfig); 677 678 /** @todo Try releasing and re-acquiring the device critical section here. 679 * Probably safe, but haven't verified this... */ 680 int const rc = PDMDevHlpPhysReadMeta(pDevIns, GCPhysLpiConfigTable, (void *)&pGicDev->abLpiConfig[0], cbLpiConfigTable); 681 AssertRC(rc); 682 } 683 684 663 685 /** 664 686 * Updates the internal IRQ state and sets or clears the appropriate force action … … 2050 2072 | (pGicDev->fMbi ? GIC_DIST_REG_TYPER_MBIS : 0) 2051 2073 | (pGicDev->fRangeSel ? GIC_DIST_REG_TYPER_RSS : 0) 2052 | GIC_DIST_REG_TYPER_IDBITS_SET(1 6) /* We only support 16-bit interrupt IDs. */2074 | GIC_DIST_REG_TYPER_IDBITS_SET(15) /* We only support 16-bit interrupt IDs. */ 2053 2075 | (pGicDev->fAff3Levels ? GIC_DIST_REG_TYPER_A3V : 0); 2054 2076 if (pGicDev->fExtSpi) … … 2461 2483 case GIC_REDIST_REG_CTLR_OFF: 2462 2484 pGicDev->fEnableLpis = RT_BOOL(uValue & GIC_REDIST_REG_CTLR_ENABLE_LPI); 2485 if (pGicDev->fEnableLpis) 2486 gicDistReadLpiConfigTableFromMemory(pDevIns, pGicDev); 2463 2487 break; 2464 2488 case GIC_REDIST_REG_PROPBASER_OFF:
Note:
See TracChangeset
for help on using the changeset viewer.