From nobody Sat May 4 15:09:43 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.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 (zohomail.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=1584323685; cv=none; d=zohomail.com; s=zohoarc; b=FPDtK/lpwdn3ZSaUtobRprbeUbLBNIsDadYqWxdwJQBfWBHnOHDB5paSoa/HXJJhfpxJlsU5Z0RF5kM9LmbRgPkLKF6rxmQriHiqPEEf/v4NULUD2RVD6v1RXtNMnHqKWKZQZ8i8EAprsVv+YLRydkNozrlQm2ADz2hHoFHR5aQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584323685; h=Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:Sender:Subject:To; bh=Js8unN1S74YSUpFCRSCZPQvtIzeqKJymTiRQBvjvuwI=; b=SJAbQ0zZjAbipeBvZYec0vazUz3HGHj6pN8bg4GC6g3HNwfnezHgKMoEWCtXzOIQVRNg643zxC5VHGhhri2r8mg1BmtjjiQtjNN40Rj2RlHwwU485MtJxu/+QsmlE+j+UORhdxCYo8mUwHqjv/Oc5sYI7hesoR5lH48o6S5P0xk= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584323685560746.518488893935; Sun, 15 Mar 2020 18:54:45 -0700 (PDT) Received: from localhost ([::1]:33146 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jDexo-0003RQ-Ak for importer@patchew.org; Sun, 15 Mar 2020 21:54:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43779) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jDeP6-0001C0-RG for qemu-devel@nongnu.org; Sun, 15 Mar 2020 21:18:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jDeP0-00085Z-2o for qemu-devel@nongnu.org; Sun, 15 Mar 2020 21:18:49 -0400 Received: from [107.174.27.60] (port=33320 helo=ozlabs.ru) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jDeOz-0007rj-SK; Sun, 15 Mar 2020 21:18:46 -0400 Received: from fstn1-p1.ozlabs.ibm.com (localhost [IPv6:::1]) by ozlabs.ru (Postfix) with ESMTP id 3F003AE80048; Sun, 15 Mar 2020 21:17:00 -0400 (EDT) From: Alexey Kardashevskiy To: qemu-devel@nongnu.org Subject: [PATCH qemu] spapr/rtas: Reserve space for RTAS blob and log Date: Mon, 16 Mar 2020 12:18:41 +1100 Message-Id: <20200316011841.99970-1-aik@ozlabs.ru> X-Mailer: git-send-email 2.17.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 107.174.27.60 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: Alexey Kardashevskiy , qemu-ppc@nongnu.org, Nicholas Piggin , 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" At the moment SLOF reserves space for RTAS and instantiates the RTAS blob which is 20 bytes binary blob calling an hypercall. The rest of the RTAS area is a log which SLOF has no idea about but QEMU does. This moves RTAS sizing to QEMU and this overrides the size from SLOF. The only remaining problem is that SLOF copies the number of bytes it reserved (2KB for now) so QEMU needs to reserve at least this much; SLOF will be fixed separately to check that rtas-size from QEMU is enough for those 20 bytes the H_RTAS hcall. Signed-off-by: Alexey Kardashevskiy Reviewed-by: Greg Kurz --- include/hw/ppc/spapr.h | 1 + hw/ppc/spapr.c | 1 + 2 files changed, 2 insertions(+) diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h index 2015e37ac5c8..35b489a54929 100644 --- a/include/hw/ppc/spapr.h +++ b/include/hw/ppc/spapr.h @@ -736,6 +736,7 @@ void spapr_load_rtas(SpaprMachineState *spapr, void *fd= t, hwaddr addr); #define SPAPR_IS_PCI_LIOBN(liobn) (!!((liobn) & 0x80000000)) #define SPAPR_PCI_DMA_WINDOW_NUM(liobn) ((liobn) & 0xff) =20 +#define RTAS_SIZE 2048 #define RTAS_ERROR_LOG_MAX 2048 =20 /* Offset from rtas-base where error log is placed */ diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 64bc8b83e91e..d3db3ec56e9c 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -967,6 +967,7 @@ static void spapr_dt_rtas(SpaprMachineState *spapr, voi= d *fdt) _FDT(fdt_setprop(fdt, rtas, "ibm,max-associativity-domains", maxdomains, sizeof(maxdomains))); =20 + _FDT(fdt_setprop_cell(fdt, rtas, "rtas-size", RTAS_SIZE)); _FDT(fdt_setprop_cell(fdt, rtas, "rtas-error-log-max", RTAS_ERROR_LOG_MAX)); _FDT(fdt_setprop_cell(fdt, rtas, "rtas-event-scan-rate", --=20 2.17.1