提交 8a9c1b77 编写于 作者: T Thomas Huth 提交者: David Gibson

hw/ppc/spapr: Halt CPU when powering off via RTAS call

The LoPAPR specification defines the following for the RTAS
power-off call: "On successful operation, does not return".
However, the implementation in QEMU currently returns and runs
the guest CPU again for some more cycles. This caused some
trouble with the new ppc implementation of the kvm-unit-tests
recently. So let's make sure that the QEMU implementation
follows the spec, thus stop the CPU to make sure that the
RTAS call does not return to the guest anymore.
Signed-off-by: NThomas Huth <thuth@redhat.com>
Tested-by: NAndrew Jones <drjones@redhat.com>
Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
上级 1c81003a
......@@ -113,6 +113,7 @@ static void rtas_power_off(PowerPCCPU *cpu, sPAPRMachineState *spapr,
return;
}
qemu_system_shutdown_request();
cpu_stop_current();
rtas_st(rets, 0, RTAS_OUT_SUCCESS);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册