From nobody Wed Feb 11 05:38:39 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail header.i=@wdc.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; dmarc=fail(p=none dis=none) header.from=wdc.com ARC-Seal: i=1; a=rsa-sha256; t=1592587033; cv=none; d=zohomail.com; s=zohoarc; b=EpRgBGQ5zVec6kZlptoU2tJesQw+QBUvJQW0kAAfBzlndd7qWseJwk1/P4khQ1UGpacuypXVj9P4ME7W7KTSzcKVLvYobSDjsnOHN0sFJ3pDYmUPMCN6wRfm+hGDYXvwc6keRITLC5Bkk9tLJxi8WeyuSdg4qXo8wVzcwCfhuJk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592587033; h=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=ffHT5j++/UfEcHa29gcZh3asdAiZzj5ZA8c3FDtGn04=; b=NnxhqJRlTYvZ/oCefIRyWC6p5tTsCRU3Wmlm+pEtNKikHpaD5kr1f6VE+CRlf6Zk7FIcGQvAeKZNYTuhkNVzN3vLFMRjJTt/O4ivw6Q4EeXOSFDr4ULgZxylRQHQkTJdOWVZTrHkqpLrNAI32HhdJ+Vg9/yxabDQfxpDNtdYgFw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail header.i=@wdc.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; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1592587033419191.79511380055908; Fri, 19 Jun 2020 10:17:13 -0700 (PDT) Received: from localhost ([::1]:41410 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jmKdc-0006LM-2O for importer@patchew.org; Fri, 19 Jun 2020 13:17:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58252) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jmKUH-0000lz-Fw for qemu-devel@nongnu.org; Fri, 19 Jun 2020 13:07:34 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:19131) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jmKUF-0004PZ-4v for qemu-devel@nongnu.org; Fri, 19 Jun 2020 13:07:33 -0400 Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 20 Jun 2020 01:07:23 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jun 2020 09:56:00 -0700 Received: from unknown (HELO risc6-mainframe.hgst.com) ([10.86.58.142]) by uls-op-cesaip02.wdc.com with ESMTP; 19 Jun 2020 10:07:23 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1592586451; x=1624122451; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wjfXyN3NWwu3m0SqemYRz9ib0aF+Yfq0vhP7wPn1ngY=; b=gfOQFyPFNEVW4aNTkEvw4IzSys0XSMISnoz4l/NggEnM8uB0qiHd+Hme oiRPdGHlBkHoYQOj/Ub50m2jJwnFfAdE3tCFpiX4uIc43wxpSf83yroz6 uHHM56DIx8MXqCKTmSm762RXp3LbZPr6nA4IAIJ0zaxM6IsHmjnl2fOuU 6a7n5lKz/EtAhslTjtEQPxFrzRF74/paBAy9FhxQaOJXkUy6IEO59Hixd NQDo10Agtpf276vhYxSnIHIoDy6GK6c01HtRnJWOY1bmyzZq98114bl2K 2ObmnMQGcsUWx3Fg6HKKygPguVXTlwbO1o5U4jBPOLnHokytWULMfEklN Q==; IronPort-SDR: e6b6lBzoAGL9cJCUQpjBbTpwXOd5yZarGSMVyrPZO6kM4jtTjGXwgPu/fiqJrnSQfeeXyzxoDe VuiYTE8jsgc4evIcuOHWft6iygfwopQS2fvj17Onsa3p8Peyp5hKhfUKYxlhPCfQRWzEUd1k3Z xFsrOp6Aa8jo9/wEamrOIdcfGicB9F0OKMRhqbhBU5IEp+9tnUVa5yxjVfMuiAA+5HWfQY77oe y535ESfZO2RciwohZJIspgjQSfhxmRf4WKl28BQ13oSYtXhDWJakoXLYnoHvi0kTOn8O2jfe+d CrY= X-IronPort-AV: E=Sophos;i="5.75,256,1589212800"; d="scan'208";a="144763319" IronPort-SDR: XGv3vJ+ayckV9rSoEOMzT20sDF9ycmuz/5wu2sVvdUPiU3hETfFLj7hOyL0Jsj6rcSdavEb/dQ DHT7FWRd5hrGxAPrwkzH/NoMAMauxWHYM= IronPort-SDR: whcHO7l//rMB7SOXYwPqHww4eOE4VW91W6ARn71S6Xyz2rplSVBeqHAGxl56KYH+uYfbS8bvU6 6pLfTtIGWc9w== WDCIronportException: Internal From: Alistair Francis To: peter.maydell@linaro.org, qemu-devel@nongnu.org Subject: [PULL v2 08/32] target/riscv: Report errors validating 2nd-stage PTEs Date: Fri, 19 Jun 2020 09:57:53 -0700 Message-Id: <20200619165817.4144200-9-alistair.francis@wdc.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200619165817.4144200-1-alistair.francis@wdc.com> References: <20200619165817.4144200-1-alistair.francis@wdc.com> MIME-Version: 1.0 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=216.71.153.141; envelope-from=prvs=4324eb4de=alistair.francis@wdc.com; helo=esa3.hgst.iphmx.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/19 13:07:21 X-ACL-Warn: Detected OS = FreeBSD 9.x or newer [fuzzy] X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: alistair23@gmail.com, Richard Henderson , Alistair Francis Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson --- target/riscv/cpu_helper.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/target/riscv/cpu_helper.c b/target/riscv/cpu_helper.c index eda7057663..75d2ae3434 100644 --- a/target/riscv/cpu_helper.c +++ b/target/riscv/cpu_helper.c @@ -435,8 +435,13 @@ restart: hwaddr vbase; =20 /* Do the second stage translation on the base PTE address. */ - get_physical_address(env, &vbase, &vbase_prot, base, MMU_DATA_= LOAD, - mmu_idx, false, true); + int vbase_ret =3D get_physical_address(env, &vbase, &vbase_pro= t, + base, MMU_DATA_LOAD, + mmu_idx, false, true); + + if (vbase_ret !=3D TRANSLATE_SUCCESS) { + return vbase_ret; + } =20 pte_addr =3D vbase + idx * ptesize; } else { --=20 2.27.0