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=-9.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT 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 56AE6C7618F for ; Sat, 20 Jul 2019 01:29:20 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (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 1D03620873 for ; Sat, 20 Jul 2019 01:29:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1D03620873 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ozlabs.ru Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:49098 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hoeBb-0000WF-7l for qemu-devel@archiver.kernel.org; Fri, 19 Jul 2019 21:29:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43842) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hoeBQ-0008T2-Of for qemu-devel@nongnu.org; Fri, 19 Jul 2019 21:29:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hoeBP-0003EX-MC for qemu-devel@nongnu.org; Fri, 19 Jul 2019 21:29:08 -0400 Received: from ozlabs.ru ([107.173.13.209]:59038) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hoeBP-0003A2-HN; Fri, 19 Jul 2019 21:29:07 -0400 Received: from fstn1-p1.ozlabs.ibm.com (localhost [IPv6:::1]) by ozlabs.ru (Postfix) with ESMTP id CF18EAE807F3; Fri, 19 Jul 2019 21:28:57 -0400 (EDT) From: Alexey Kardashevskiy To: qemu-devel@nongnu.org Date: Sat, 20 Jul 2019 11:28:49 +1000 Message-Id: <20190720012850.14369-4-aik@ozlabs.ru> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190720012850.14369-1-aik@ozlabs.ru> References: <20190720012850.14369-1-aik@ozlabs.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 107.173.13.209 Subject: [Qemu-devel] [PATCH qemu RFC 3/4] spapr: Advertise H_RTAS to the guest X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paul Mackerras , Michael Ellerman , qemu-ppc@nongnu.org, Alexey Kardashevskiy , David Gibson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Since day 1 QEMU implemented RTAS as a custom hypercall wrapped into a small 20 bytes blob which guest would call to enter RTAS. Although it works fine, it is still a separate binary image which requires signing at no additional benefit. This adds a flag into /chosen to tell a modified guest that if the flag is there, it can call H_RTAS directly and avoid calling into the RTAS blob. Signed-off-by: Alexey Kardashevskiy --- hw/ppc/spapr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 81ad6a6f28de..b097a99951f1 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -1230,6 +1230,9 @@ static void spapr_dt_chosen(SpaprMachineState *spapr, void *fdt) _FDT(fdt_setprop_cell(fdt, chosen, "linux,pci-probe-only", 0)); } + /* We always implemented RTAS as hcall, tell guests to call it directly */ + _FDT(fdt_setprop_cell(fdt, chosen, "qemu,h_rtas", 1)); + spapr_dt_ov5_platform_support(spapr, fdt, chosen); g_free(stdout_path); -- 2.17.1