From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg Kurz Date: Wed, 25 Mar 2020 10:34:12 +0000 Subject: Re: [PATCH] powerpc/prom_init: Include the termination message in ibm,os-term RTAS call Message-Id: <20200325113412.1fed2d82@bahia.lan> List-Id: References: <20200324201211.1055236-1-farosas@linux.ibm.com> <87zhc4wxy9.fsf@mpe.ellerman.id.au> In-Reply-To: <87zhc4wxy9.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: Michael Ellerman Cc: linuxram@us.ibm.com, paulus@samba.org, linuxppc-dev@lists.ozlabs.org, kvm-ppc@vger.kernel.org, Fabiano Rosas On Wed, 25 Mar 2020 21:06:22 +1100 Michael Ellerman wrote: > Fabiano Rosas writes: >=20 > > QEMU can now print the ibm,os-term message[1], so let's include it in > > the RTAS call. E.g.: > > > > qemu-system-ppc64: OS terminated: Switch to secure mode failed. > > > > 1- https://git.qemu.org/?p=3Dqemu.git;a=3Dcommitdiff;h=A4c3791ae0 > > > > Signed-off-by: Fabiano Rosas > > --- > > arch/powerpc/kernel/prom_init.c | 3 +++ > > 1 file changed, 3 insertions(+) >=20 > I have this queued: > https://patchwork.ozlabs.org/patch/1253390/ >=20 > Which I think does the same thing? >=20 Alexey's patch also sets os_term_args.nret as indicated in PAPR. Even if QEMU's handler for "ibm,os-term" doesn't seem to have a use for nret, I think it's better to stick to the spec. Cheers, -- Greg > cheers >=20 > > diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom= _init.c > > index 577345382b23..d543fb6d29c5 100644 > > --- a/arch/powerpc/kernel/prom_init.c > > +++ b/arch/powerpc/kernel/prom_init.c > > @@ -1773,6 +1773,9 @@ static void __init prom_rtas_os_term(char *str) > > if (token =3D 0) > > prom_panic("Could not get token for ibm,os-term\n"); > > os_term_args.token =3D cpu_to_be32(token); > > + os_term_args.nargs =3D cpu_to_be32(1); > > + os_term_args.args[0] =3D cpu_to_be32(__pa(str)); > > + > > prom_rtas_hcall((uint64_t)&os_term_args); > > } > > #endif /* CONFIG_PPC_SVM */ > > --=20 > > 2.23.0