From patchwork Sat Jan 14 03:12:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 642604 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp62768pvb; Fri, 13 Jan 2023 19:13:22 -0800 (PST) X-Google-Smtp-Source: AMrXdXs1fJWqx1wmQHocV4J+0KZbQ6sXV0P1/WjN7rbuXwM/LJRtooJuKiBitztADIFGPS+vg+Pn X-Received: by 2002:a05:622a:193:b0:3b3:b92f:3650 with SMTP id s19-20020a05622a019300b003b3b92f3650mr5234413qtw.62.1673666002470; Fri, 13 Jan 2023 19:13:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673666002; cv=none; d=google.com; s=arc-20160816; b=fmIsqJhPFMbC+H8aA9DU4FEfqwywc1USCcxJZoMwO3D385AhcyYjftoh+saMTVfexX ebHg/rMxiDlD4a6raV68M7WQnKTnzW1o25FtW+T49afVza0J12/AXt6OPrrQIkW1NYEh i4cNOYJnbJat9ZqJXDei3sQiBjj17h9V43VvHYWhiUYjU22DtZvyVdIAJ865pUZUtaZ6 WeJveNl8IPAo6l+wYEPA+rW3glKRaHq06+8YS/ovxofcKz6D6jxkSYt/xwuL5VgYFqVs PNEONtG2emF2DvJ75NUVEeM9Wc9p0mBuHdzFCQNw+nGWFA8okNRhBkLVGQ+IW0UMp5hI VEiw== 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:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=t7bt1moGaa/vnBd5cAzAfOuxr+X1UUfglkpPnyEpm4w=; b=CmwPBlFVAi3tw0U9qk6TSi4Go77jBrR1BT0Q0jOrvWCtNa89g1B5jkJ3zc/kUV1GZS tjTRA+O1YyBXCS0gvlRUuNZ4xI44nAY5zrjoStBTix9fBA6ceXEMWXOFTJKLo32ffPl7 z+dmJCqT7I0VROsLs3L0CB2J8wFXLKiUnHq653yF8riTk+E5fLhLAFJ438LrTcVw1232 c4PI69eVJnCWwoLhG2smdh7DTo6nFmqHV3uYh3AvuAbaYeGhT+wAlBC/a+mQnz2ed9bj hLELSYjgAGsmexpg1An58RIKu6A39n7dVeoeF03YQ5jnuPQXP4xwkzhSTh0WXLObeK3H 0vdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mefwG9gn; 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=pass (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 f12-20020a05620a280c00b006fee9e3181esi13834914qkp.251.2023.01.13.19.13.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 13 Jan 2023 19:13:22 -0800 (PST) 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=pass header.i=@linaro.org header.s=google header.b=mefwG9gn; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pGWxz-0001u9-8b; Fri, 13 Jan 2023 22:12:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGWxw-0001tj-5E for qemu-devel@nongnu.org; Fri, 13 Jan 2023 22:12:21 -0500 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pGWxu-0006Yd-2L for qemu-devel@nongnu.org; Fri, 13 Jan 2023 22:12:19 -0500 Received: by mail-pj1-x1034.google.com with SMTP id b9-20020a17090a7ac900b00226ef160dcaso24462636pjl.2 for ; Fri, 13 Jan 2023 19:12:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=t7bt1moGaa/vnBd5cAzAfOuxr+X1UUfglkpPnyEpm4w=; b=mefwG9gnXOpTurTFADgvQxF7TEAQR9MK0zcHKuDX/vR/OcyBDa2a+xSGxhPhfuexPf +8lwlm2t+asTzNr0lTZlaumavhPoKcDg7UHaTxj1L4uTlkGqT6KU45iaO3OPMw/Dezjk bVikELuX+U9korZLyC3YT8eF3xJZhmjmoqqGrMGNH+uLNdNhcbUVGGYAoEBYysNx9wGX QBO3brCieIR+GfSNToqBUCZ/FeWQ6gR2ZbziKXcpDovvaPB5+8SjoDfSOtdluwv6M32E f9j3l2nGAbOS0iOEEzl5ZiGTi8sa9R2ZI4PAaPedXzNgWNPLkE9flJY2tlOT0VArnoZ/ uxIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=t7bt1moGaa/vnBd5cAzAfOuxr+X1UUfglkpPnyEpm4w=; b=VcLM7bK20Z+dgA8S/xxFGnPt91G8TBVyJ6Cb6aSFIXu32+vS1JspA13cK15tn9QT2N lDqM0RueRVKYpyAmvLECnQD45rlFRAMWtqqcR7ZrnIlXgctdjCIGCgIjd6Ix9r1AuH58 zbFd1KcUvc7NiiEYLoGIbAdqRIwm0HjDem2RHp2m3IQTzfACgrMbipURyK4mOnzCMIC/ 8vYcchZC/cN9ZtX29GNi4lqAUMlu10PlsYj/4i9PlEpCQXev+6d2EuLNYdId3T06VBMp ZI4Dv31bvgLM9Z7FeJeRJuIdjoe5lHjHRI4P+YCz7bp3riN1uv5qRHFguskUmZvepxhx J/SA== X-Gm-Message-State: AFqh2kpaPOstpCVts4N6KCGdP6nrz0sJNNkYa5w1IeB6Meph3W4HHoPh mv6/zSp31P9fPzL8uKa5NDIWlTB/0j+nGYuH X-Received: by 2002:a17:903:189:b0:189:ba1f:b178 with SMTP id z9-20020a170903018900b00189ba1fb178mr130219151plg.9.1673665936244; Fri, 13 Jan 2023 19:12:16 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id u7-20020a17090341c700b00186e34524e3sm14880061ple.136.2023.01.13.19.12.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Jan 2023 19:12:15 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: idan.horowitz@gmail.com, qemu-arm@nongnu.org Subject: [PATCH] target/arm: Fix physical address resolution for MTE Date: Fri, 13 Jan 2023 17:12:13 -1000 Message-Id: <20230114031213.2970349-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1034; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1034.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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-bounces+patch=linaro.org@nongnu.org Conversion to probe_access_full missed applying the page offset. Fixes: b8967ddf ("target/arm: Use probe_access_full for MTE") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1416 Signed-off-by: Richard Henderson --- target/arm/mte_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/mte_helper.c b/target/arm/mte_helper.c index 86b3754838..98bcf59c22 100644 --- a/target/arm/mte_helper.c +++ b/target/arm/mte_helper.c @@ -142,7 +142,7 @@ static uint8_t *allocation_tag_mem(CPUARMState *env, int ptr_mmu_idx, * Remember these values across the second lookup below, * which may invalidate this pointer via tlb resize. */ - ptr_paddr = full->phys_addr; + ptr_paddr = full->phys_addr | (ptr & ~TARGET_PAGE_MASK); attrs = full->attrs; full = NULL;