From patchwork Thu May 9 06:02:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 163662 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:142:0:0:0:0 with SMTP id j2csp542162ilr; Wed, 8 May 2019 23:06:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqzbY7sXU90JOTKa8fKugn5z1DtZ+hCjTb4FK1lt1SvriTEikraUPi+JFsYD1ddP4yIkXrl6 X-Received: by 2002:a1c:20c9:: with SMTP id g192mr1331446wmg.76.1557381973547; Wed, 08 May 2019 23:06:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557381973; cv=none; d=google.com; s=arc-20160816; b=vYGvxrv5Wa07QaAHmTg/un2EPPYiFEt7SjFH0fgQgmn3+TagqgV6mFjaiycuHD5njq Q5bL6gGLzg2j6WuHk7rdG4POhq6v5Jx+2IjvhZznirOhSHrSdqX6cqBLRGo5qYFEk5zO 0ekPAsYm4vH339Nnqgg7MNGLt3RXKBrI1HvAjI65TP0YB2AZcwViYmqrB5kdHpu45GS+ t33I4iJHsJ4xoN3cjjY5rL+q8mRR49IK4gbQWM2y7UO5EQu7B2TnfXtzxS9zwsQPU0Yz j7TfW1P26CGSqQVvxilQrNhFF+wT+XopHLcaA9MGU0Y2tAw0dgdAkh1aGotcVyrxSmKg ARfw== 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:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=LalWeSz9ng8LqvlpCLkBR/VeSiQbsSOHCzC5F7gQNl0=; b=AsmlW+bySBEQb4MdNIbJS4JbUDreboaDXIUYRPBbPhYWTdVCExTMyX8WZvP++En+Y8 CrCPiF8XO4jxJHZOo2lTBB1wJRTyllBr6JK2UdISHSILsaLLVxWwIlh5ob3qkbOdK3wo XphEM/x4U3g2uOufl9aPKMcVZheK76+wtF10jlmyCBiaNK8TrsykTru2x+HzQEpdgBG1 5PLMeKVC+zNKyNQ12aDojB7NddAydPGNarkkdlmZwJV5dcXGmanqUaKB8QB9m2Z7OtnN 1JXInYE7rBwgRMwgeqOTHePtKMav+pacImzF/+p8L5RafoSpuFhK+5rTqMksKTC07ZIC D9jA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=mrDHAzPD; 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 i18si918966wrv.193.2019.05.08.23.06.13 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 08 May 2019 23:06:13 -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=mrDHAzPD; 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]:48611 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOcC4-0008Sn-Eb for patch@linaro.org; Thu, 09 May 2019 02:06:12 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44868) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOc90-00060E-P0 for qemu-devel@nongnu.org; Thu, 09 May 2019 02:03:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOc8z-00076C-TX for qemu-devel@nongnu.org; Thu, 09 May 2019 02:03:02 -0400 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]:46110) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hOc8z-00075e-O6 for qemu-devel@nongnu.org; Thu, 09 May 2019 02:03:01 -0400 Received: by mail-pl1-x642.google.com with SMTP id bi2so569437plb.13 for ; Wed, 08 May 2019 23:03:01 -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; bh=LalWeSz9ng8LqvlpCLkBR/VeSiQbsSOHCzC5F7gQNl0=; b=mrDHAzPDpq/tACi3a/mKPm1H2VHzt9ENozJkeOpEyK8BW8XnVI9Eg1C5wJo0noDkhp Z8J8BJSI4e9yUJ8x5Sm97GM2XznfXGZEwhNikGi86fAmawegO92wilF7YXKuSRCiqPEd jc8dR7WengPlr+TITuovCi/kvN/aQmlzlkFXsGg4Ux3FSm8icd0T6DCAHpzq/pf45Hpo XTk7SOl1CCwJuNHfNYtyCTAZJwJlVW2Kw/xAvZB5TiW01OliSkJlG2N6pkuFRCZIi7C2 JFoXDgeZ9bY155QQTZutmdWVj6neTyn43ZA9TNMa1ujdSJTZF1KMDImIQ/JBfW03goOL MlyA== 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; bh=LalWeSz9ng8LqvlpCLkBR/VeSiQbsSOHCzC5F7gQNl0=; b=DI2R534zD9ZjrqBgYNNNmtJuDihvNxltkZAicl+4C6p3Wd+JEYyV6RJpMeFFzmezAF H6z5qPl9fwlWVwZzFMh3RfRXH0V3UdX6RTe6LQ5Adkm/74Os7Ar/nKRX9jlTze2MrWBA tLDwQ19VF4T1M110ED2aqgDAq1dZthwVVerMtmlwjTbxbqyrHYP2ZUMOItWenDw3M3TO 3airahqgP6i/pINeEluSdIKgNjHKHEsdqckW22J+p1rpuTPXXsgFzSDOX0Dbam+FXPPk B+z2gtny120+XMT9YxKgM3QcWUJHVAt6+hh+jdJe4uutDIFOy8KMz0QZi9LWnuk4fAkE usOg== X-Gm-Message-State: APjAAAXucc+RTSsAXVV25gTKbP8TL9siGl+Lko3g4NLsPbHdHA0fIT4o yuSX4fOx+rni5XBmJr0WOdHb683n05E= X-Received: by 2002:a17:902:e00a:: with SMTP id ca10mr2838928plb.18.1557381780456; Wed, 08 May 2019 23:03:00 -0700 (PDT) Received: from localhost.localdomain (97-113-27-95.tukw.qwest.net. [97.113.27.95]) by smtp.gmail.com with ESMTPSA id n7sm1496109pff.45.2019.05.08.23.02.59 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 May 2019 23:02:59 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 8 May 2019 23:02:29 -0700 Message-Id: <20190509060246.4031-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190509060246.4031-1-richard.henderson@linaro.org> References: <20190509060246.4031-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::642 Subject: [Qemu-devel] [PATCH v2 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. Signed-off-by: Richard Henderson --- target/mips/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 Reviewed-by: Philippe Mathieu-Daudé 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);