From patchwork Thu May 9 22:26:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 163763 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:142:0:0:0:0 with SMTP id j2csp1567272ilr; Thu, 9 May 2019 15:28:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqxiNik2078JVOAaKOL+KxFJm9mhvVIsln+NBReYNHi+qXmtUNCsuv3Vl9891BCr3yDnGS+I X-Received: by 2002:a1c:2dd2:: with SMTP id t201mr4807402wmt.10.1557440890568; Thu, 09 May 2019 15:28:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557440890; cv=none; d=google.com; s=arc-20160816; b=VnRAwl4drRele5wSbAjQqqkQ7Xknl83QzZ5225hyIywdWD3xNc52+5VJF8yUr+4XN6 YN/x07dYG5NLHyJFjaF2aXo8VGX8vn76EZYWdec+bib5NsTEXbtkltOovJFYd96Q+OOf w/+8xpj9M+sPR/shahmWiJs6u5XNkdXmbvz/taPu12vQxc9EfqC+QHMAJDhU5h4ZTom6 3jgMUiUO7XJ98F2OAsOdDbs40iA7vehNilid3OKc70f0hMBi7jR91ffCRxiyAOzi2kx6 qjbCe0druaE36RUPa9z6HFpDm1dcfCIESN9MWMLlIRQrVi+RGNMzz6pwmP1WXzM/d+s8 0vPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=o6KNAvrl1D/b9zbrgkjs2gFc7po4/nEdwJY7J8tQGi4bCr2a1cpYE64yMCyLAvnhVR mnGBMiHXu2/jqpkZEEF+Vr5nEb2skjPvCowWaSOgvpSkvBWzqmNEzmTn3/JkqEnaivvI nhOR0VAMPfLfsZ9xFCQaymKyzu6NiSIDXisWCmjuckpTF4LmQUqb6eK1GYfpZ/RpNFYA qZQ70iGpSOwEsxp/jjKoyWCbUc7DHrbUJZmkTcKONEF4Q9h33yhQXDx4vdgKhy5I1HF2 UA+RSzjrcGHBqeFv8UVGm/Lm4ATyrv6HEnQBnfdcWJOV1RBFJbeD90lNI8YdzZkCjZkf mifA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=UQy5424k; 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 a14si2626197wmd.185.2019.05.09.15.28.10 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 09 May 2019 15:28:10 -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=UQy5424k; 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]:33442 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOrWL-0008U5-IC for patch@linaro.org; Thu, 09 May 2019 18:28:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:32950) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOrV2-0007fq-Ro for qemu-devel@nongnu.org; Thu, 09 May 2019 18:26:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOrV1-0005TL-UT for qemu-devel@nongnu.org; Thu, 09 May 2019 18:26:48 -0400 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]:42807) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hOrV1-0005TE-Oz for qemu-devel@nongnu.org; Thu, 09 May 2019 18:26:47 -0400 Received: by mail-pf1-x442.google.com with SMTP id 13so2041243pfw.9 for ; Thu, 09 May 2019 15:26:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=9CI4oI1nkvf0QxqoUGGat3a67tCPvWsOkb0Ljyg5Gsk=; b=UQy5424kPPPWI4jgBR28IqDLu+Zq0U/tL5t6vQZK6SVOOhY3TM26QzfmXbx3dCQLFE rQAOcVZg7pUcT7Wpp/Kot1n9cgLRw8j7Ymo0RbrIckZLL0WrSVkEC4I/E7iN5WDwV7eN fKPW2PbBq9N4Nq1SqRRs5O/0uNvChUQvXnJqht7ZZpOH7QTpBtTLuWfMn1xFR8PEYDiH YM5aUfveJYPfD3oSphBAmm2bMjGNp+VMw8cYBJu1s98bQdiG/Ohub/dnwLAyn5ZQ+8mK tWoqVwzUN9STQTpJn3TWPnGt1ummSKaxQAe1Vm/QeQCntwxnnv8/vL6q6Xgm0VkpEjk+ 8Otg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9CI4oI1nkvf0QxqoUGGat3a67tCPvWsOkb0Ljyg5Gsk=; b=A3hG9D+S4U+mGj8+Vub00pAPaHKmhjtGqaaoBWwB9p1ucRQB4t/TJuqzut8Rm+VlyQ 6hUTLwTVu8Wb5yUBBbj1NAdJ1ryzMz33JY86FWgOWGpF/QCltpDipCtzPbZc5AjkmeF3 PPdukm1+acDdYXvQjEyjE0QkUQthODxtdu+JW3pMMLZiJskeP/MdvRndNQBtO+PcbZ8V GgRri7LDX6MhK7Dytdxoc1KA7QhFRZlxiIC/HCpyzHDBxxFq6wIcLrFKwL6xsHEWYDsy cFDfS+Wcd4mzHKmIqVNgqZRFzZ//ldkeaE63/mV+xzj51PY4X3svRFblprje0jfaUAPi +HCA== X-Gm-Message-State: APjAAAUDLuo4A3Cr2Fj4bEZSQVEuOAWVDd5aYkvw5uqZqBDG+xhC4NuE lHgOV8JFRuhVYcJ3rCzQnIShHnhZ7jQ= X-Received: by 2002:a62:4558:: with SMTP id s85mr9130985pfa.171.1557440806561; Thu, 09 May 2019 15:26:46 -0700 (PDT) Received: from localhost.localdomain (97-113-13-231.tukw.qwest.net. [97.113.13.231]) by smtp.gmail.com with ESMTPSA id m2sm4490521pfi.24.2019.05.09.15.26.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 May 2019 15:26:45 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 9 May 2019 15:26:14 -0700 Message-Id: <20190509222631.14271-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190509222631.14271-1-richard.henderson@linaro.org> References: <20190509222631.14271-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::442 Subject: [Qemu-devel] [PATCH v3 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: , 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);