When I do "poweroff" from debian/mips64el on qemu, qemu will hang in
the end, rather than quitting the process. See the kernel messages
below. Last time when I tried 32bit debian/mipsel I was able to quit
qemu completely. Any thoughts?
On Sun, 19 Jan 2020 at 22:40, Jun Sun <jsun@junsun.net> wrote:
When I do "poweroff" from debian/mips64el on qemu, qemu will hang in
the end, rather than quitting the process. See the kernel messages
below. Last time when I tried 32bit debian/mipsel I was able to quit
qemu completely. Any thoughts?
Whether this is expected to work depends on the board model
(you don't give your QEMU command line). "exit the QEMU process"
happens when the guest powers down the emulated hardware,
so for this to work:
* the h/w board being modelled needs to actually have a
software-controllable powerdown feature (eg some device
register the guest has to prod)
* the QEMU model of that board needs to actually implement
whatever the powerdown control is
* the guest OS has to know about the control feature and
use it
thanks
-- PMM
Here are more testing results
- qemu 2.5 + debian10.2 + Malta + kernel4.19.0 : hangs on
poweroff ("reboot: System halted") for both 32bit and 64bit mipsel
- qemu 2.6 + debian9.11 + Malta + kernel4.9.0 : poweroff successfully
for both 32bit and 64bit mipsel
Given these results, who is likely to blame? Debian? or kernel?
Thanks.
On Mon, Jan 20, 2020 at 5:31 PM Jun Sun <jsun@junsun.net> wrote:
Thanks, Peter.
Here is the commandline. The board is Malta board. On the 32bit
version which worked, it is also Malta board, but it could be the
kernel difference.
If you could point out where the code is, I'd be more than happy to fix
it.
Cheers.
Jun
qemu-system-mips64el \
-M malta \
-cpu MIPS64R2-generic \
-m $GUEST_MEM \
-hda hda.qcow2 \
-kernel vmlinux \
-initrd initrd.img \
-append "root=/dev/sda1 console=ttyS0 nokaslr" \
-nographic \
-net
user,hostfwd=tcp::2222-:22,hostfwd=tcp::8080-:80,hostfwd=tcp::8443-:443
\
-net nic \
-serial mon:stdio \
On Mon, Jan 20, 2020 at 2:41 AM Peter Maydell <peter.maydell@linaro.org>
wrote:
On Sun, 19 Jan 2020 at 22:40, Jun Sun <jsun@junsun.net> wrote:
When I do "poweroff" from debian/mips64el on qemu, qemu will hang in
the end, rather than quitting the process. See the kernel messages
below. Last time when I tried 32bit debian/mipsel I was able to quit
qemu completely. Any thoughts?
Whether this is expected to work depends on the board model
(you don't give your QEMU command line). "exit the QEMU process"
happens when the guest powers down the emulated hardware,
so for this to work:
* the h/w board being modelled needs to actually have a
software-controllable powerdown feature (eg some device
register the guest has to prod)
* the QEMU model of that board needs to actually implement
whatever the powerdown control is
* the guest OS has to know about the control feature and
use it
thanks
-- PMM
Here are more testing results
- qemu 2.5 + debian10.2 + Malta + kernel4.19.0 : hangs on
poweroff ("reboot: System halted") for both 32bit and 64bit mipsel
- qemu 2.6 + debian9.11 + Malta + kernel4.9.0 : poweroff successfully
for both 32bit and 64bit mipsel
Given these results, who is likely to blame? Debian? or kernel?
On 2020-01-24 19:05, Jun Sun wrote:
Here are more testing results
- qemu 2.5 + debian10.2 + Malta + kernel4.19.0 : hangs on
poweroff ("reboot: System halted") for both 32bit and 64bit mipsel
- qemu 2.6 + debian9.11 + Malta + kernel4.9.0 : poweroff successfully
for both 32bit and 64bit mipsel
Given these results, who is likely to blame? Debian? or kernel?
Probably a bit of both ;-) The poweroff implementation has changed in
kernel 4.19 (commit dd129c6374) and requires that the kernel is built
with CONFIG_POWER_RESET_PIIX4_POWEROFF=y to work.
I have pushed the fix to the Debian kernel repository. However I am not
sure it will be fixed for Debian 10.3, maybe it will only appear in
Debian 10.4.
Aurelien
--
Aurelien Jarno GPG: 4096R/1DDD8C9B aurelien@aurel32.net http://www.aurel32.net
Wow! That is it! Thank you, Aurlien!
I'm using debian 10.2 and clearly the kernel config option is not there. After adding it back, the guest machine powers off correctly.
Now I only need to figure out how to properly update initrd in a
crossbuild environment ...
Cheers.
Jun
On Sat, Jan 25, 2020 at 4:49 AM Aurelien Jarno <aurelien@aurel32.net>
wrote:
On 2020-01-24 19:05, Jun Sun wrote:
Here are more testing results
- qemu 2.5 + debian10.2 + Malta + kernel4.19.0 : hangs on
poweroff ("reboot: System halted") for both 32bit and 64bit mipsel
- qemu 2.6 + debian9.11 + Malta + kernel4.9.0 : poweroff successfully >> > for both 32bit and 64bit mipsel
Given these results, who is likely to blame? Debian? or kernel?
Probably a bit of both ;-) The poweroff implementation has changed in
kernel 4.19 (commit dd129c6374) and requires that the kernel is built
with CONFIG_POWER_RESET_PIIX4_POWEROFF=y to work.
I have pushed the fix to the Debian kernel repository. However I am not
sure it will be fixed for Debian 10.3, maybe it will only appear in
Debian 10.4.
Aurelien
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien@aurel32.net http://www.aurel32.net
Wow! That is it! Thank you, Aurlien!
I'm using debian 10.2 and clearly the kernel config option is not there. After adding it back, the guest machine powers off correctly.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 461 |
Nodes: | 16 (2 / 14) |
Uptime: | 44:15:52 |
Calls: | 9,369 |
Files: | 13,545 |
Messages: | 6,085,799 |