From nobody Tue Feb 10 21:19:05 2026 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; 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 1524569755247550.3325149020908; Tue, 24 Apr 2018 04:35:55 -0700 (PDT) Received: from localhost ([::1]:57829 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fAwEk-0006n4-I5 for importer@patchew.org; Tue, 24 Apr 2018 07:35:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34917) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fAwA6-0003fX-6H for qemu-devel@nongnu.org; Tue, 24 Apr 2018 07:31:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fAwA1-0003h4-FJ for qemu-devel@nongnu.org; Tue, 24 Apr 2018 07:31:06 -0400 Received: from 17.mo1.mail-out.ovh.net ([87.98.179.142]:50572) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fAwA1-0003eI-9S for qemu-devel@nongnu.org; Tue, 24 Apr 2018 07:31:01 -0400 Received: from player774.ha.ovh.net (unknown [10.109.108.70]) by mo1.mail-out.ovh.net (Postfix) with ESMTP id 9398DF1059 for ; Tue, 24 Apr 2018 13:30:59 +0200 (CEST) Received: from zorba.kaod.org.com (LFbn-TOU-1-49-10.w86-201.abo.wanadoo.fr [86.201.141.10]) (Authenticated sender: clg@kaod.org) by player774.ha.ovh.net (Postfix) with ESMTPSA id 4003D400B6; Tue, 24 Apr 2018 13:30:54 +0200 (CEST) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, David Gibson Date: Tue, 24 Apr 2018 13:30:41 +0200 Message-Id: <20180424113045.25687-2-clg@kaod.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180424113045.25687-1-clg@kaod.org> References: <20180424113045.25687-1-clg@kaod.org> MIME-Version: 1.0 X-Ovh-Tracer-Id: 1545579097438260051 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtgedrkeekgddviecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd 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: 87.98.179.142 Subject: [Qemu-devel] [PATCH v4 1/5] 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: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Suraj Jitindar Singh Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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 --- Changes since v3: - removed spapr_hpt_base() ops and just return zero instead 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 f23b78d78754..53dcec5b9316 100644 --- a/target/ppc/mmu-hash64.h +++ b/target/ppc/mmu-hash64.h @@ -101,6 +101,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.13.6