]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/hppa: Fix OS reboot issues
authorHelge Deller <deller@gmx.de>
Fri, 23 Jun 2023 06:24:30 +0000 (08:24 +0200)
committerMichael Tokarev <mjt@tls.msk.ru>
Mon, 26 Jun 2023 16:34:58 +0000 (19:34 +0300)
commit8fa146229292ba420ef16427d766cc727d3e6b15
treef87d7d4f8f367359dfca05537c61488b27721b31
parentdeb40cf67ae4ac9750b8ebd289a06a9c056a238c
target/hppa: Fix OS reboot issues

When the OS triggers a reboot, the reset helper function sends a
qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET) together with an
EXCP_HLT exception to halt the CPUs.

So, at reboot when initializing the CPUs again, make sure to set all
instruction pointers to the firmware entry point, disable any interrupts,
disable data and instruction translations, enable PSW_Q bit  and tell qemu
to unhalt (halted=0) the CPUs again.

This fixes the various reboot issues which were seen when rebooting a
Linux VM, including the case where even the monarch CPU has been virtually
halted from the OS (e.g. via "chcpu -d 0" inside the Linux VM).

Signed-off-by: Helge Deller <deller@gmx.de>
(cherry picked from commit 50ba97e928b44ff5bc731c9ffe68d86acbe44639)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/hppa/machine.c