From patchwork Fri Dec 29 06:31:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 122921 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4342072qgn; Thu, 28 Dec 2017 22:59:59 -0800 (PST) X-Google-Smtp-Source: ACJfBounp9c+PZFNA5qxkkOmKCe3HOewYs3oV4f1s4vlniP3QLfV1DzXz3xoM/XEdNj20GbWTEpx X-Received: by 10.37.49.4 with SMTP id x4mr22563074ybx.246.1514530799616; Thu, 28 Dec 2017 22:59:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1514530799; cv=none; d=google.com; s=arc-20160816; b=jD3Z5MeTgnt+lAFnaOx53oKyresGg2y113/f+qytEb/UfV4MKbZDf89BE7Y5U2zqX3 BH4awfv84raISHhDUp3XYcsbcXv25uc1wulC3/+WxvcZ9S/qSObgkDo4D5MV77nR16+n vyCsDFM4Zk9DD1wEqPUzHBIHD3DLHhl5j+XEaPXaruvCcXrJQlG6oYbse3vNx8MD7YrW CE17IuF1/KhhGoVGbpXeqa6jk0Wt3gNGJN/iTMT/ZDx0tNgqNfLuV5LxK40qrGOz+6xD tzMleBlqXg8OfN3c6txnwiHN0FQsmlwCywbUYB5cjxm0ok8Q7bLOjbh6rfOYWDhGNJpr /EYw== 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:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=DiACuF9fSwjx/ljspLFoCBRlabayy+kU1qcoqcfzFP4=; b=N8QiDTf46gGRG5CHKXaqk6rfAb42bElWk8fObu9j+la6D41P1U+JBY6fqfSAoqz7Z3 J2nXPJq7TCY0EWvGZZGckBEY/Cp+oIK7bA4oW3iHd3CrmEEB0heRMQKZBPEh+pAgHzrt T7Hl+TLy36tSlCsZCsz1MHzwPO1y27PejUvAd90YlTWL3/hItSvqrTExx4zmuo41vn2G lMZbgF1z55dIvjrfAf5ezS6b60KR6wqgHOzP/ZSwZTYBGQXrx3Yeme/hKKPI1IcpjiOf MdfduJEXi1MI4nIziKLdZEez1qDVgyqrEEIjHgAgCsqNT5Jj0yOgNO6PfaIqiScmfnNy MMOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=DK1lJpPb; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 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. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id o189si1913940ybc.295.2017.12.28.22.59.59 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 28 Dec 2017 22:59:59 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=DK1lJpPb; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 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 ([::1]:57494 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eUoe7-0002QS-5w for patch@linaro.org; Fri, 29 Dec 2017 01:59:59 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50993) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eUoDd-0003Q0-8w for qemu-devel@nongnu.org; Fri, 29 Dec 2017 01:32:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eUoDa-0004uS-UG for qemu-devel@nongnu.org; Fri, 29 Dec 2017 01:32:37 -0500 Received: from mail-pl0-x242.google.com ([2607:f8b0:400e:c01::242]:39705) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eUoDa-0004u7-Pg for qemu-devel@nongnu.org; Fri, 29 Dec 2017 01:32:34 -0500 Received: by mail-pl0-x242.google.com with SMTP id bi12so22518165plb.6 for ; Thu, 28 Dec 2017 22:32:34 -0800 (PST) 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; bh=DiACuF9fSwjx/ljspLFoCBRlabayy+kU1qcoqcfzFP4=; b=DK1lJpPbH5Uc/ODNAgRJ3z+yrOmdB/b6sRR9Sdpe4v2X+eruC0hqeyuEWlr1nARPJt 8VaQZgecMtDlyJe4Fh9Vfnw7Tp8OW7MenWUyMIx3WnD8+d/WwJHmuik/jqMFYRKLWm3J XA90STLdQx6PkYdM74kyadaYPoAfSG/Xbgt1U= 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; bh=DiACuF9fSwjx/ljspLFoCBRlabayy+kU1qcoqcfzFP4=; b=t4Il2Vwc3Q4QRnUhR/X0gfF/MIL1c/Shs9Hm+xmH7/SIMoBNDzpQTLIv9A3MhvZiRB lWTUEXGDtXm0tzrK/qsjeyU3bMEW/8Aw8jRhfzU/dMDuRrbT/S5DbVfWRGIofjXvx9Z1 8NfbV1Lrvb8Z63wRsKXMIqZJ21Kd9kpbRP6dTmoONIe2X1Up1R8kuAP20j9MnvFW4v9q CEwWxO1q9mf5LafGcPEDNxSYlOghmt7Evv1iLuEI3q4ZqD3ihrlrqMe1ySq7kTlyj8fI ed4b1R6HF94Xsdcn8/lz/5fFrz4xPgHe4xoNE8fDDsJvSIfBaWnJ5qSPMXSvqa5C/peA Ok6g== X-Gm-Message-State: AKGB3mI9cykiGExbEUXoU5etJVheLm9JLdKktJHGtSNWiN0G+Tp8gLFp nK0MZiMPDI1v2fTPatGIlq9XmlDgOSQ= X-Received: by 10.84.174.131 with SMTP id r3mr34267234plb.358.1514529153585; Thu, 28 Dec 2017 22:32:33 -0800 (PST) Received: from cloudburst.twiddle.net (97-113-183-164.tukw.qwest.net. [97.113.183.164]) by smtp.gmail.com with ESMTPSA id c28sm76539063pfe.69.2017.12.28.22.32.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Dec 2017 22:32:32 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 28 Dec 2017 22:31:41 -0800 Message-Id: <20171229063145.29167-35-richard.henderson@linaro.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20171229063145.29167-1-richard.henderson@linaro.org> References: <20171229063145.29167-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c01::242 Subject: [Qemu-devel] [PATCH 34/38] target/hppa: Only use EXCP_DTLB_MISS 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: deller@gmx.de Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Unknown why this works, but if we return EXCP_ITLB_MISS we will triple-fault the first userland instruction fetch. Is it something to do with having a combined I/DTLB? Signed-off-by: Richard Henderson --- target/hppa/mem_helper.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.14.3 diff --git a/target/hppa/mem_helper.c b/target/hppa/mem_helper.c index e2f94faab5..a0a385cb54 100644 --- a/target/hppa/mem_helper.c +++ b/target/hppa/mem_helper.c @@ -97,7 +97,9 @@ int hppa_get_physical_address(CPUHPPAState *env, vaddr addr, int mmu_idx, if (ent == NULL || !ent->entry_valid) { phys = 0; prot = 0; - ret = (ifetch ? EXCP_ITLB_MISS : EXCP_DTLB_MISS); + /* ??? Unconditionally report data tlb miss, + even if this is an instruction fetch. */ + ret = EXCP_DTLB_MISS; goto egress; }