[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 01/20] spapr/rtas: Print message from "ibm,os-term"
From: |
David Gibson |
Subject: |
[PULL 01/20] spapr/rtas: Print message from "ibm,os-term" |
Date: |
Fri, 21 Feb 2020 14:36:31 +1100 |
From: Alexey Kardashevskiy <address@hidden>
The "ibm,os-term" RTAS call has a single parameter which is a pointer to
a message from the guest kernel about the termination cause; this prints
it.
Signed-off-by: Alexey Kardashevskiy <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Daniel Henrique Barboza <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/spapr_rtas.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c
index 883fe28465..656fdd2216 100644
--- a/hw/ppc/spapr_rtas.c
+++ b/hw/ppc/spapr_rtas.c
@@ -345,6 +345,13 @@ static void rtas_ibm_os_term(PowerPCCPU *cpu,
target_ulong args,
uint32_t nret, target_ulong rets)
{
+ target_ulong msgaddr = rtas_ld(args, 0);
+ char msg[512];
+
+ cpu_physical_memory_read(msgaddr, msg, sizeof(msg) - 1);
+ msg[sizeof(msg) - 1] = 0;
+
+ error_report("OS terminated: %s", msg);
qemu_system_guest_panicked(NULL);
rtas_st(rets, 0, RTAS_OUT_SUCCESS);
--
2.24.1
- [PULL 00/20] ppc-for-5.0 queue 20200221, David Gibson, 2020/02/20
- [PULL 04/20] ppc: function to setup latest class options, David Gibson, 2020/02/20
- [PULL 01/20] spapr/rtas: Print message from "ibm,os-term",
David Gibson <=
- [PULL 03/20] ppc/pnv: Fix PCI_EXPRESS dependency, David Gibson, 2020/02/20
- [PULL 02/20] qtest: Fix rtas dependencies, David Gibson, 2020/02/20
- [PULL 05/20] mem: move nvdimm_device_list to utilities, David Gibson, 2020/02/20
- [PULL 06/20] nvdimm: add uuid property to nvdimm, David Gibson, 2020/02/20
- [PULL 08/20] spapr: Add Hcalls to support PAPR NVDIMM device, David Gibson, 2020/02/20
- [PULL 11/20] pnv/phb4: Fix error path in pnv_pec_realize(), David Gibson, 2020/02/20
- [PULL 09/20] target/ppc/cpu.h: Remove duplicate includes, David Gibson, 2020/02/20
- [PULL 10/20] pnv/phb3: Convert 1u to 1ull, David Gibson, 2020/02/20
- [PULL 07/20] spapr: Add NVDIMM device support, David Gibson, 2020/02/20