From: Daniel Henrique Barboza <danielhb413@gmail.com>
To: Alexey Kardashevskiy <aik@ozlabs.ru>, qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org, David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [PATCH qemu] spapr/rtas: Print message from "ibm,os-term"
Date: Mon, 3 Feb 2020 17:51:26 -0300 [thread overview]
Message-ID: <e3e2311c-8a34-d395-9ae0-c104d3a224a0@gmail.com> (raw)
In-Reply-To: <20200203032044.118585-1-aik@ozlabs.ru>
On 2/3/20 12:20 AM, Alexey Kardashevskiy wrote:
> 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 <aik@ozlabs.ru>
> ---
> hw/ppc/spapr_rtas.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
> diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c
> index 883fe28465e6..656fdd221665 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);
>
next prev parent reply other threads:[~2020-02-03 20:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-03 3:20 [PATCH qemu] spapr/rtas: Print message from "ibm,os-term" Alexey Kardashevskiy
2020-02-03 20:51 ` Daniel Henrique Barboza [this message]
2020-02-04 5:58 ` David Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e3e2311c-8a34-d395-9ae0-c104d3a224a0@gmail.com \
--to=danielhb413@gmail.com \
--cc=aik@ozlabs.ru \
--cc=david@gibson.dropbear.id.au \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).