Bug 13234

Summary: [2.7 M3 RC1] qemumips & qemumips64: failed to shutdown
Product: [Build System, Metadata & Runtime] OE-Core Reporter: yeoh ee peng <ee.peng.yeoh>
Component: virtual machinesAssignee: Kevin Hao <kexin.hao>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: High CC: bruce.ashfield, randy.macleod, richard.purdie
Version: 2.7   
Target Milestone: 2.7 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description yeoh ee peng 2019-03-25 06:59:35 UTC
Both qemumips and qemumips64 both failed to shutdown for 2.7 M3 rc1, where these qemus were able to shutdown prior to 2.7 M3 rc1. 
Currently, both qemumips and qemumips64 hang/stuck while shutting down, need to manually click on the "x" button to close the qemu.

Steps to reproduce:
1. Git clone poky
2. Git checkout poky: 753e2a0ede4449917c75353b57f13bbafe70fac8
3. Configure MACHINE to be qemumips or qemumips64
4. Bitbake core-image-minimal
5. Runqemu to boot qemumips or qemumips64
6. Perform shutdown in command line (eg. shutdown -h now)

Expected:
Qemu instance to close automatically
Comment 1 Richard Purdie 2019-04-02 19:46:49 UTC
As a data point this works with the 4.18 kernel but fails with the 4.19 kernel for qemumips so something changed between those two kernel versions.
Comment 2 Richard Purdie 2019-04-02 20:02:58 UTC
qemumips and qemumips64 need new defconfig entries:

CONFIG_POWER_RESET=y
CONFIG_POWER_RESET_PIIX4_POWEROFF=y

See https://github.com/torvalds/linux/commit/dd129c6374e90e665ec022019bcc2f392f25cf2c
Comment 3 Richard Purdie 2019-04-02 20:03:13 UTC
(I can confirm that 5.0 works with this added)
Comment 4 Bruce Ashfield 2019-04-03 02:53:42 UTC
Makes sense to me. If Kevin hasn't gotten to this by next week, I can also take care of it.
Comment 5 Kevin Hao 2019-04-03 11:39:47 UTC
Thanks Richard, patch sent out.