From nobody Thu May 2 12:15:50 2024 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 (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1511332478601829.7121476816496; Tue, 21 Nov 2017 22:34:38 -0800 (PST) Received: from localhost ([::1]:38060 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHOc0-0007zp-09 for importer@patchew.org; Wed, 22 Nov 2017 01:34:20 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51882) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHOb3-0007hR-NK for qemu-devel@nongnu.org; Wed, 22 Nov 2017 01:33:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eHOb0-0006e8-J2 for qemu-devel@nongnu.org; Wed, 22 Nov 2017 01:33:21 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:42525) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eHOb0-0006dM-DC for qemu-devel@nongnu.org; Wed, 22 Nov 2017 01:33:18 -0500 Received: from localhost.localdomain (unknown [IPv6:2a01:e34:eebf:9c0:5526:7b93:4a61:9ff9]) (Authenticated sender: jcd@tribudubois.net) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 2EE731720A3; Wed, 22 Nov 2017 07:33:14 +0100 (CET) From: Jean-Christophe Dubois To: qemu-devel@nongnu.org Date: Wed, 22 Nov 2017 07:32:50 +0100 Message-Id: <20171122063250.7674-1-jcd@tribudubois.net> X-Mailer: git-send-email 2.14.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.70.183.196 Subject: [Qemu-devel] [PATCH] Remove MemoryRegionSection check code from sparc_cpu_get_phys_page_debug() 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: Mark Cave-Ayland , Artyom Tarasenko , Jean-Christophe Dubois Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This code is preventing the MMU debug code from displaying virtual mappings of IO devices (anything that is not located in the RAM). Before this patch, Qemu would output 0xffffffffffffffff (-1) as the physical address corresponding to a IO device virtual address. With this patch the intended physical adresse is displayed. Signed-off-by: Jean-Christophe Dubois --- target/sparc/mmu_helper.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/target/sparc/mmu_helper.c b/target/sparc/mmu_helper.c index d5b6c1e48c..f2d2250e7a 100644 --- a/target/sparc/mmu_helper.c +++ b/target/sparc/mmu_helper.c @@ -857,18 +857,12 @@ hwaddr sparc_cpu_get_phys_page_debug(CPUState *cs, va= ddr addr) CPUSPARCState *env =3D &cpu->env; hwaddr phys_addr; int mmu_idx =3D cpu_mmu_index(env, false); - MemoryRegionSection section; =20 if (cpu_sparc_get_phys_page(env, &phys_addr, addr, 2, mmu_idx) !=3D 0)= { if (cpu_sparc_get_phys_page(env, &phys_addr, addr, 0, mmu_idx) != =3D 0) { return -1; } } - section =3D memory_region_find(get_system_memory(), phys_addr, 1); - memory_region_unref(section.mr); - if (!int128_nz(section.size)) { - return -1; - } return phys_addr; } #endif --=20 2.14.1