]> 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, 16 Dec 2024 12:27:45 +0000 (15:27 +0300)
commitdec1eee77fc548049c8cb443a1f8176fa0c2d3c4
tree133639cc8975a4c8c2e9db7598404bc59c837efb
parentbc024c0bb7f36baae2917d1f40a651b43e041aa7
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