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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4160CC43331 for ; Wed, 25 Mar 2020 11:17:47 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E500620771 for ; Wed, 25 Mar 2020 11:17:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E500620771 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kaod.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 48nQZc34JnzDqfy for ; Wed, 25 Mar 2020 22:17:44 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kaod.org (client-ip=188.165.48.29; helo=11.mo1.mail-out.ovh.net; envelope-from=groug@kaod.org; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=kaod.org X-Greylist: delayed 1798 seconds by postgrey-1.36 at bilbo; Wed, 25 Mar 2020 22:13:49 AEDT Received: from 11.mo1.mail-out.ovh.net (11.mo1.mail-out.ovh.net [188.165.48.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 48nQV52jhTzDqNW for ; Wed, 25 Mar 2020 22:13:46 +1100 (AEDT) Received: from player159.ha.ovh.net (unknown [10.108.35.122]) by mo1.mail-out.ovh.net (Postfix) with ESMTP id 398121B5E53 for ; Wed, 25 Mar 2020 11:34:19 +0100 (CET) Received: from kaod.org (lns-bzn-46-82-253-208-248.adsl.proxad.net [82.253.208.248]) (Authenticated sender: groug@kaod.org) by player159.ha.ovh.net (Postfix) with ESMTPSA id 2E76410C032CE; Wed, 25 Mar 2020 10:34:13 +0000 (UTC) Date: Wed, 25 Mar 2020 11:34:12 +0100 From: Greg Kurz To: Michael Ellerman Subject: Re: [PATCH] powerpc/prom_init: Include the termination message in ibm,os-term RTAS call Message-ID: <20200325113412.1fed2d82@bahia.lan> In-Reply-To: <87zhc4wxy9.fsf@mpe.ellerman.id.au> References: <20200324201211.1055236-1-farosas@linux.ibm.com> <87zhc4wxy9.fsf@mpe.ellerman.id.au> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Ovh-Tracer-Id: 3723069520371227057 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedrudehfedgudeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepfffhvffukfgjfhfogggtgfesthejredtredtvdenucfhrhhomhepifhrvghgucfmuhhriicuoehgrhhouhhgsehkrghougdrohhrgheqnecuffhomhgrihhnpehqvghmuhdrohhrghdpohiilhgrsghsrdhorhhgnecukfhppedtrddtrddtrddtpdekvddrvdehfedrvddtkedrvdegkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehplhgrhigvrhduheelrdhhrgdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomhepghhrohhugheskhgrohgurdhorhhgpdhrtghpthhtoheplhhinhhugihpphgtqdguvghvsehlihhsthhsrdhoiihlrggsshdrohhrgh X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linuxram@us.ibm.com, paulus@samba.org, linuxppc-dev@lists.ozlabs.org, kvm-ppc@vger.kernel.org, Fabiano Rosas Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Wed, 25 Mar 2020 21:06:22 +1100 Michael Ellerman wrote: > Fabiano Rosas writes: > > > 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=qemu.git;a=commitdiff;h=a4c3791ae0 > > > > Signed-off-by: Fabiano Rosas > > --- > > arch/powerpc/kernel/prom_init.c | 3 +++ > > 1 file changed, 3 insertions(+) > > I have this queued: > https://patchwork.ozlabs.org/patch/1253390/ > > Which I think does the same thing? > 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 > > > 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 == 0) > > prom_panic("Could not get token for ibm,os-term\n"); > > os_term_args.token = cpu_to_be32(token); > > + os_term_args.nargs = cpu_to_be32(1); > > + os_term_args.args[0] = cpu_to_be32(__pa(str)); > > + > > prom_rtas_hcall((uint64_t)&os_term_args); > > } > > #endif /* CONFIG_PPC_SVM */ > > -- > > 2.23.0