From nobody Sun Feb 8 12:19:42 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1658520235; cv=none; d=zohomail.com; s=zohoarc; b=LCwEWGRVRU9lZ46KZz+sTnofItlAzdFkHfI5JeOVn4nBu1+LEsjFQgG7q3s0/8me6yfQHjvCUBcgdAN805+ID7I7WEarCYlUZ60CUAwjZQkuEnrfVdvajM424vwTFOLGEN1Zned3ws2PB2Ye90XRYPuzqxsTX+nE6a9+kER3+zE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658520235; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=pES3OUwSggunbQU+tmgNIZG7n8J8b5Ja341if3roq2Y=; b=nGKLQrS9bPQaJz2QNnylb25BDN156CFBWG7JgHOqVfiGhdBHV7EVIfWnVP6Azb3Ehy7C6IGFWa8i5ozIMtxWvih8PF+ayEwtZkh43HWDNkWK73nOCBRJPGaZv0yQUKQJ6YmFNUo3kJo8qSip4ppcAmkSEeH8dpySYQBq6lee3Gw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1658520235645613.6127452657254; Fri, 22 Jul 2022 13:03:55 -0700 (PDT) Received: from localhost ([::1]:47234 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oEysL-0006Qr-Lz for importer@patchew.org; Fri, 22 Jul 2022 16:03:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51434) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oEyow-0002sp-LS; Fri, 22 Jul 2022 16:00:22 -0400 Received: from mail-oo1-xc32.google.com ([2607:f8b0:4864:20::c32]:45734) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oEyov-0005Ch-1P; Fri, 22 Jul 2022 16:00:22 -0400 Received: by mail-oo1-xc32.google.com with SMTP id v5-20020a4aa505000000b00435b0bb4227so1019258ook.12; Fri, 22 Jul 2022 13:00:20 -0700 (PDT) Received: from balboa.COMFAST ([152.254.206.198]) by smtp.gmail.com with ESMTPSA id n14-20020a9d740e000000b0061cae62aafcsm2388218otk.20.2022.07.22.13.00.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Jul 2022 13:00:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pES3OUwSggunbQU+tmgNIZG7n8J8b5Ja341if3roq2Y=; b=RhoQAtl8B3raRMcLKceRL8muFdTnFFb6yRxb5OdK/a56edKowub/AWYB53NHb9pnCN CEiGrR24BzNPDW5mKWnyW8uRb6Nay+n3aDN4yirYwQpLw9I6n2clDgX2705OeJ2R1Q0n dYl/I8t3VKYmkWlHfHYNWeE8dlBEF72qLhvWAUTrm2q///nV/P3bkKIuqYspyBFcDUD7 185xRcftw3hw+oGdaVv5/HNAzPSpxLFMKrSy9j9VF7KCycor+yPtwwBK08xbe9WoVyNU p/jV4Agld/8WaQ44GjvVR9Ll3+oteOWluEUkyt97e+enorADQU6dlzb34hG39hGNrv8A dNLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pES3OUwSggunbQU+tmgNIZG7n8J8b5Ja341if3roq2Y=; b=xQ+XsCpm47L50qT5dieTp9iMI3Vfn67Wi0jTnRuVPQRud2YpIyK8PvDEEt6r3CkxnC MwPFc0vltR0fY4bqnVG1R+0xCOSK7oRsgRG+39fNS01Mg0OMbDSOnkzB9PRZa9Ja7Iko ieJ3A88GlPTn+Nc772emY7gmvRCTPwgOV+28lejT770Fhuv4e24DTqbTCy9fUfxScIL+ MQBvIDUUfHPYX1Zfp2gZi8cefUqHnrZfywiKYXbNYcqbXBMeflft+Hxomo5/PGhpHOjY ZUsNtrupdt/EfBosxDWt1UJlfG3475bwRObS1gYnBufKCMIIl5+US+XNQqhlz3Z1UFvw c9Fg== X-Gm-Message-State: AJIora+rdI49l2GDUeUQuf7woqF3AVVsP7vVhgGQ/gkij/KdrYHBnO2o URIq2fHcN92aV/OvyP/NbZa5TkmB22I= X-Google-Smtp-Source: AGRyM1tWdDErTuYYhL/DJl2SsBM4dPhc9i4dR5sgpOzjka3/ZBy1T+Ywyl7VHDTRS9jqqaOpxo23mg== X-Received: by 2002:a4a:ac89:0:b0:42c:7331:a110 with SMTP id b9-20020a4aac89000000b0042c7331a110mr589289oon.40.1658520019018; Fri, 22 Jul 2022 13:00:19 -0700 (PDT) From: Daniel Henrique Barboza To: qemu-devel@nongnu.org Cc: Alistair Francis , David Gibson , Daniel Henrique Barboza , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , qemu-ppc@nongnu.org Subject: [PATCH for-7.2 03/10] hw/ppc: set machine->fdt in spapr machine Date: Fri, 22 Jul 2022 17:00:00 -0300 Message-Id: <20220722200007.1602174-4-danielhb413@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220722200007.1602174-1-danielhb413@gmail.com> References: <20220722200007.1602174-1-danielhb413@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=2607:f8b0:4864:20::c32; envelope-from=danielhb413@gmail.com; helo=mail-oo1-xc32.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1658520237337100001 The pSeries machine never bothered with the common machine->fdt attribute. We do all the FDT related work using spapr->fdt_blob. We're going to introduce HMP commands to read and save the FDT, which will rely on setting machine->fdt properly to work across all machine archs/types. Let's set machine->fdt in the two places where we manipulate the FDT: spapr_machine_reset() and CAS. spapr->fdt_blob is left untouched: what we want is a way to access the FDT from HMP, not replace spapr->fdt_blob. Cc: C=C3=A9dric Le Goater Cc: qemu-ppc@nongnu.org Signed-off-by: Daniel Henrique Barboza --- hw/ppc/spapr.c | 3 +++ hw/ppc/spapr_hcall.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index bc9ba6e6dc..7279583a4d 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -1713,6 +1713,9 @@ static void spapr_machine_reset(MachineState *machine) spapr->fdt_initial_size =3D spapr->fdt_size; spapr->fdt_blob =3D fdt; =20 + /* Set common MachineState->fdt */ + machine->fdt =3D fdt; + /* Set up the entry state */ first_ppc_cpu->env.gpr[5] =3D 0; =20 diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c index a8d4a6bcf0..e6b960577d 100644 --- a/hw/ppc/spapr_hcall.c +++ b/hw/ppc/spapr_hcall.c @@ -1256,6 +1256,9 @@ target_ulong do_client_architecture_support(PowerPCCP= U *cpu, spapr->fdt_initial_size =3D spapr->fdt_size; spapr->fdt_blob =3D fdt; =20 + /* Set common MachineState->fdt */ + MACHINE(spapr)->fdt =3D fdt; + return H_SUCCESS; } =20 --=20 2.36.1