Skip to content

accel/tcg: keep requested insn count for mmio code fetch - #109

Closed
sylvioalves wants to merge 1 commit into
Xilinx:masterfrom
sylvioalves:bugfix/tcg-icount-mmio-insn-count-xlnx
Closed

accel/tcg: keep requested insn count for mmio code fetch#109
sylvioalves wants to merge 1 commit into
Xilinx:masterfrom
sylvioalves:bugfix/tcg-icount-mmio-insn-count-xlnx

Conversation

@sylvioalves

Copy link
Copy Markdown

The Xilinx change that allows translating more than one instruction from MMIO regions cleared CF_COUNT_MASK whenever the code page is not directly addressable. This also discards an instruction count explicitly requested by the icount execution loop when refilling a budget smaller than the next block. The translator then regenerates an oversized block that exits before executing anything, so the CPU retires no instructions and the virtual clock freezes, livelocking the machine.

Keep a non-zero requested count and only leave the count unconstrained when none was requested. Observed as a permanent hang of Zephyr llext tests on qemu_cortex_r5 with icount shift=3, where the extension text is covered by sub-page MPU regions and every code fetch takes the MMIO path.

The Xilinx change that allows translating more than one
instruction from MMIO regions cleared CF_COUNT_MASK whenever the
code page is not directly addressable. This also discards an
instruction count explicitly requested by the icount execution
loop when refilling a budget smaller than the next block. The
translator then regenerates an oversized block that exits before
executing anything, so the CPU retires no instructions and the
virtual clock freezes, livelocking the machine.

Keep a non-zero requested count and only leave the count
unconstrained when none was requested. Observed as a permanent
hang of Zephyr llext tests on qemu_cortex_r5 with icount
shift=3, where the extension text is covered by sub-page MPU
regions and every code fetch takes the MMIO path.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
@sylvioalves sylvioalves closed this by deleting the head repository Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant