From nobody Wed Oct 29 11:33:36 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1525413942466866.4144646785002; Thu, 3 May 2018 23:05:42 -0700 (PDT) Received: from localhost ([::1]:60667 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fETqf-0002Gw-NV for importer@patchew.org; Fri, 04 May 2018 02:05:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43178) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fETkr-00062W-AB for qemu-devel@nongnu.org; Fri, 04 May 2018 01:59:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fETkn-0007HX-Ez for qemu-devel@nongnu.org; Fri, 04 May 2018 01:59:41 -0400 Received: from ozlabs.org ([203.11.71.1]:47391) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fETkm-0007Cj-R9; Fri, 04 May 2018 01:59:37 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 40chDP5bzqz9s35; Fri, 4 May 2018 15:59:33 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1525413573; bh=Jh580TJrhTcfq/c+m6koTdm8wZpdbGDwda4x2jx68oE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jl0YCf8CDqBAwDY+lY1bn12yuS9KGuEbRB9Ui/qe7ErQsvJxh6ZG0WJhAtLdm/2lv ndSpdgzW1sidmFZstzmMueCNmI3EijiQ36KrbRpV4voGQOFyOX+AK6W94aTpLp896t 8XmjFkE04OUPw5fIXgNNWwsZyQQ/AFyfudHlsT0I= From: David Gibson To: peter.maydell@linaro.org Date: Fri, 4 May 2018 15:59:14 +1000 Message-Id: <20180504055930.3786-2-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180504055930.3786-1-david@gibson.dropbear.id.au> References: <20180504055930.3786-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 203.11.71.1 Subject: [Qemu-devel] [PULL 01/17] target/ppc: return a nil HPT base address on sPAPR machines X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, groug@kaod.org, qemu-devel@nongnu.org, qemu-ppc@nongnu.org, clg@kaod.org, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: C=C3=A9dric Le Goater commit e57ca75ce3b2 ("target/ppc: Manage external HPT via virtual hypervisor") exported a set of methods to manipulate the HPT from the core hash MMU. But SPR_SDR1 is still used under some circumstances to get the base address of the HPT, which is incorrect for the sPAPR machines. Only the logging should be impacted. Signed-off-by: C=C3=A9dric Le Goater Signed-off-by: David Gibson --- target/ppc/mmu-hash64.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/ppc/mmu-hash64.h b/target/ppc/mmu-hash64.h index d5fc03441d..f6349ccdb3 100644 --- a/target/ppc/mmu-hash64.h +++ b/target/ppc/mmu-hash64.h @@ -102,6 +102,9 @@ void ppc_hash64_finalize(PowerPCCPU *cpu); =20 static inline hwaddr ppc_hash64_hpt_base(PowerPCCPU *cpu) { + if (cpu->vhyp) { + return 0; + } return cpu->env.spr[SPR_SDR1] & SDR_64_HTABORG; } =20 --=20 2.17.0