From nobody Tue Nov 11 14:21:18 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1563586168; cv=none; d=zoho.com; s=zohoarc; b=ErBZYWeH9Vvio/pxZa59Jf5nc3PkbIdgnRweWcPB1IBnPLUEiEUFSe0Ce7msNjngzVPAPCNrJqaoOG9aMP2UFFj6KUBBe6RWBR+VjfzS68hOyM8X2UAUKmrN2oLg3H0MsR5aUhKNNDRWjoVwazMqkSDY8rz9XV2q7/p2ysW0+NQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1563586168; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=utBHYjKYlJ4ebKMrklFSJVjcasyRt/MP69BNAkPWr64=; b=DxVItfyQd2vv+miTWh9jet7d2Sf9rmjvnU6zTAqMAC+o7GHNJWFqoX8JwQj/ZmSrhMdRanGJ2paRmPlV8/DTcDrtmhxo34OzcLh27Iip2b9Kl+bBj/qjx7lmPye9sUz/3+xpBjySbnhmtgxVpF7nHtbwApSCgUj99N0HbGvP0ks= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1563586168288493.06423092438956; Fri, 19 Jul 2019 18:29:28 -0700 (PDT) Received: from localhost ([::1]:49098 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hoeBb-0000WF-KA for importer@patchew.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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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)); } =20 + /* We always implemented RTAS as hcall, tell guests to call it directl= y */ + _FDT(fdt_setprop_cell(fdt, chosen, "qemu,h_rtas", 1)); + spapr_dt_ov5_platform_support(spapr, fdt, chosen); =20 g_free(stdout_path); --=20 2.17.1