From patchwork Fri May 10 15:19:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 163873 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:142:0:0:0:0 with SMTP id j2csp2520735ilr; Fri, 10 May 2019 08:28:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqzRq+Xu2VApEnvrPyJZjQxyhNpfc60ROqHDz38EIr9zSMnv5JwKt6DgVudPlJtFTvAdTKFT X-Received: by 2002:a50:9273:: with SMTP id j48mr11513993eda.205.1557502095137; Fri, 10 May 2019 08:28:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557502095; cv=none; d=google.com; s=arc-20160816; b=ZV7WeVjzbmTsSl7T6BJAOTGj7MGiVsD22u7pPFrgM4lxpxrqARPQVILdaUfQyznxpU xQYnYB11g5ieD0U/LnqY09BZCJlTZL8nSd/kkZvRTyUayyVJnZO3JKkMX5znpiz4uv0w hOa4510vqd2M1hUXPN3B1JdpsR1NKyZopTxabP/tR6OagmPNcl7u96eFKxPzUdzeuwft C5Nt4ppJXaWBY0ZNrJRIqy3aIZzbVDI1dcQVvRzvC+Yk455l+sim0Ehw1sTVMGumGa+g U+B7mwu1XrnIiTqfaSOYj9IvKPsBdRTINUnx+59bmnNyEv2qCqYumpWrjQ5ecMGBLo3L W/UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=9CI4oI1nkvf0QxqoUGGat3a67tCPvWsOkb0Ljyg5Gsk=; b=lDojggo6Pcy0ZG15CGL3fNnjCzxOEFfYb+1xcj/TmRAucDpsTd9Yb7hmlDv4wnoA3y 3q8Z4nk2RXyBd3NUYZOpbRvgyfQuuJca0/2pgETrhNt8JGgX3/RrSwZ7PAgZz4Tbtium NrATxDCmjw+qSIwvAGkrOGsbKgjwZyAvosuEYIcc55iM9prSLC4eNyglLyJs5N/f2NPQ jOGO4Hn2Pjz3R8RLwIRLBIw3DbERbe4Ed+wV7EXJ0LTrX7z/2eXCEIeUonlYigOFEEfR aWisNqJw73hr3sRq/3afxbvM9NE2KssL1CM0ByOqEcqqDJB0+niYm9+rAkg3AxD4KNsK i4eQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=VYt0RnZx; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id b20si3893371ede.282.2019.05.10.08.28.14 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 10 May 2019 08:28:15 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=VYt0RnZx; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:45091 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hP7RV-0007Dv-Ua for patch@linaro.org; Fri, 10 May 2019 11:28:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56117) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hP7JZ-0007XE-K9 for qemu-devel@nongnu.org; Fri, 10 May 2019 11:20:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hP7JY-0008SO-P6 for qemu-devel@nongnu.org; Fri, 10 May 2019 11:20:01 -0400 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]:37514) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hP7JY-0008S4-JS for qemu-devel@nongnu.org; Fri, 10 May 2019 11:20:00 -0400 Received: by mail-pl1-x643.google.com with SMTP id p15so2989743pll.4 for ; Fri, 10 May 2019 08:20:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9CI4oI1nkvf0QxqoUGGat3a67tCPvWsOkb0Ljyg5Gsk=; b=VYt0RnZxKpvBAVDDq+CSEzv1d+0RsSm14ybtttKdZcKmfPqzLP9hTO8PkVhwRZfQH9 NPJOUOLrBnJMMTDgbiL554bpG3is/VcICqhg61Ht1xoO6UWB4DzdnZjF7eAQrU8syDBn 5XUJS1SH9igwOLgmeaneDwPsOYuAbpxtW19uOpoEwZTVvInlP3Y4ou0x2mJU6FQIWIN+ c3LWgUHqtgJ1NQc79QPfk7y4prtLBzBwWMXNpzaZhKTfEvNtBT/bhostrEpshrW/fsZH GSMzeafEXIAiH0TAB27iw+au7l5b0DNZJ7Q+z+Rpdk+MZr+Q5h122BVpiRxxjM5TQyEA u0pA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9CI4oI1nkvf0QxqoUGGat3a67tCPvWsOkb0Ljyg5Gsk=; b=uoIbIqrnuQRoXL5F0xFTkN2GP7gXxErJz3GPu1GWI8gL6CeprK6K/fyD/SSOneHqDP ZTpn6uO3CiXK6rn8F7klWSmOXwIvoOjxGauiPIB9TDX89HroTQVBcdmidbiZgPCH6W6k SWPoklfQYJSAFsdwYd3yLYvA1q3gwEgw41SSJcoDL+JCOI84usYyBc9xXF+pBktUEsup /DL4DMaPFscDvSUaZjsqG1G78zvaHsMBKefkIfkTuwC7r6OnKoeAfGFpHhZxRPStEfo+ +uOEqyQNH3zYlDBVw71EH+HgN5VOgs3zb1kOp0PdCJ527zLJ3JYG15ZGrVm9nu1X1fcP z80Q== X-Gm-Message-State: APjAAAV+p7oQy0YTBjg/pvVESrZ3PreW3fcfx95HnbbcqGJ2qinUGX+J RfyuY2jPhfUeoljrzQrBhSAaywjos2E= X-Received: by 2002:a17:902:b606:: with SMTP id b6mr14084714pls.100.1557501599442; Fri, 10 May 2019 08:19:59 -0700 (PDT) Received: from localhost.localdomain (97-113-13-231.tukw.qwest.net. [97.113.13.231]) by smtp.gmail.com with ESMTPSA id 19sm5920517pgz.24.2019.05.10.08.19.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 May 2019 08:19:58 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 10 May 2019 08:19:27 -0700 Message-Id: <20190510151944.22981-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190510151944.22981-1-richard.henderson@linaro.org> References: <20190510151944.22981-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::643 Subject: [Qemu-devel] [PULL 10/27] target/mips: Pass a valid error to raise_mmu_exception for user-only 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: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" At present we give ret = 0, or TLBRET_MATCH. This gets matched by the default case, which falls through to TLBRET_BADADDR. However, it makes more sense to use a proper value. All of the tlb-related exceptions are handled identically in cpu_loop.c, so TLBRET_BADADDR is as good as any other. Retain it. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/mips/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/target/mips/helper.c b/target/mips/helper.c index c44cdca3b5..cc7be7703a 100644 --- a/target/mips/helper.c +++ b/target/mips/helper.c @@ -884,7 +884,7 @@ int mips_cpu_handle_mmu_fault(CPUState *cs, vaddr address, int size, int rw, int prot; int access_type; #endif - int ret = 0; + int ret = TLBRET_BADADDR; #if 0 log_cpu_state(cs, 0);