]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/ppc: Fix non-maskable interrupt while halted
authorNicholas Piggin <npiggin@gmail.com>
Mon, 11 Nov 2024 06:37:49 +0000 (16:37 +1000)
committerMichael Tokarev <mjt@tls.msk.ru>
Mon, 2 Dec 2024 06:09:12 +0000 (09:09 +0300)
commit2b2df86088203a7203fe0c3f4f2d292913804bc4
treea39cd6d3f174635d6d64596af5e5f736d2e3fc0c
parent2bc5c92625454be025f85896f233c62ebb07efdb
target/ppc: Fix non-maskable interrupt while halted

The ppc (pnv and spapr) NMI injection code does not go through the
asynchronous interrupt path and set a bit in env->pending_interrupts
and raise an interrupt request that the cpu_exec() loop can see.
Instead it injects the exception directly into registers.

This can lead to cpu_exec() missing that the thread has work to do,
if a NMI is injected while it was idle.

Fix this by clearing halted when injecting the interrupt. Probably
NMI injection should be reworked to use the interrupt request interface,
but this seems to work as a minimal fix.

Fixes: 3431648272d3 ("spapr: Add support for new NMI interface")
Reviewed-by: Glenn Miles <milesg@linux.ibm.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
(cherry picked from commit fa416ae6157a933ad3f7106090684759baaaf3c9)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
target/ppc/excp_helper.c