From patchwork Mon Jan 23 13:35:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 645570 Delivered-To: patch@linaro.org Received: by 2002:a17:522:b9de:b0:4b9:b062:db3b with SMTP id fj30csp2221180pvb; Mon, 23 Jan 2023 06:43:28 -0800 (PST) X-Google-Smtp-Source: AMrXdXtjmQCh1WfsctqhFFlH3C1jL2P2fTCgf8RZKZ5RUMuFnqreFvAAuEgJPMtUGkz0UQWFRpb6 X-Received: by 2002:ac8:6cb:0:b0:3a9:8cc6:d4b2 with SMTP id j11-20020ac806cb000000b003a98cc6d4b2mr60559901qth.5.1674485008566; Mon, 23 Jan 2023 06:43:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674485008; cv=none; d=google.com; s=arc-20160816; b=1IN613WWoJWoPKcXzm4hG2GzLWjaINosE3fxl2SbFL3OASl8EV3WW2dMogxn4ZJiVS i/3EdGLW5uVOSdQ1Kd5qOEY2kNWjudNbOXr5DQyS+GECalHwD/VzW2qs5cuiAqhrui6e rWZUvYIDpurlAUvgAG3AZ3sHegYJZjsNF1M4JjjN1aaSWBzYDU6i6y6WVrUJ2zACA8O6 SBRw7QfIkMdv/Ckl9VtW6VDTMA3B5sxNehH2p1w3gexQtwCd/kWXGz4DscQNvxzH6xmz jZGb+8U/E6MbGVsX95cay9mL6uOr0R8Pr4uVkGluJfnedV24PRCNHBRZZkUBxey7DlgH hAqA== 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:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=qLC1OizCVn68FH21GRDKjbsntWejSNUy0/YImu0bDg8=; b=rrtuXWP8R+MIenfGHTatiFtiZgGrNRPITXfPZbRDuup39Kz/FRISbKzkKBUtgsJajO Q7t5nZ5+8szYdKdLHAviFwhJg3z94XFN2IvYpSwZXEtxzdhzBA/cgeIahKcPpLoW0IaR Mz47gh6SDO1hWsRrh9Ms2Ox/rE3ScsJ+QajexaqnmXFfztYFEV1eWbooiF792Rv3bba4 1WYzIp+dYggdhitKoLXv5LcR7yaMCP/Kq01y1yjBRqQiU2zZlwyIAnkvSh2P1YMHSPOg 8t+7VNS+ChCj7X69laZxYXYG5FPa3hGA8SJpIOClR+2FstbZvLVFB1iWd+9EdmKW5Rdn rJmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="VGZ7W03/"; 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 q18-20020ac84512000000b003b68fe36d95si8512346qtn.656.2023.01.23.06.43.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Jan 2023 06:43:28 -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="VGZ7W03/"; 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 1pJwzx-00068o-Ue; Mon, 23 Jan 2023 08:36:33 -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 1pJwzi-00060a-DP for qemu-devel@nongnu.org; Mon, 23 Jan 2023 08:36:21 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pJwzf-0002Sy-06 for qemu-devel@nongnu.org; Mon, 23 Jan 2023 08:36:17 -0500 Received: by mail-wm1-x329.google.com with SMTP id l8so9024155wms.3 for ; Mon, 23 Jan 2023 05:36:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=qLC1OizCVn68FH21GRDKjbsntWejSNUy0/YImu0bDg8=; b=VGZ7W03/KX1ic4nVdv2+VWdXVpUupbOqE3gqbp5b4Mdgvw/dISi9dvGpPsxPUk3hGl M71xjWlpx5KPy1kHUFLvCnRNJLesi6MYg5tWioXljWj3aBIzLZsLaUiVTmMg3gogn+mb +Wk1xx1B5UANmBBLNG2PZhudz9w0kniNYh+gMKPnQJyrDkPvVQ9v3w0b4kNx56ZDs2XN fzCwegpoTDJDjEBspGtSoRiYB+OhOvPVEDBQ0K9nI7wOg1cbG9iw968pd/y3n3Y9u32r EkIMqAyHaPUnJY4zihtJxh56rv4ydtPefYvTIFbbs0CZ3pzErGjz3VZ3PtG2qRKhVBZP m5dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qLC1OizCVn68FH21GRDKjbsntWejSNUy0/YImu0bDg8=; b=hEo7aY+NzmcgAbqKa3JZMOKEMW4prVKLn308ZvUD4hwSfD2XSLcfGkWx8DtZYMFPz7 YHTeZ0s5TV7+H5Yua67QTFeYcMr2Pz44bhq041v2gtMhVrb+V/hwyfkGgoLyqO5Pu3tn bMGJHig+BQm0O3s9Vzk1Bj+/hh8CBY5KCmEaaUFrIBT2WgA/Ta7F3kWaGYqfN1qN8f+n RHbYWYwB0lJMFA5BCNzAZcUXK9z8u6q+FKpVfmBV/OYnM/knIcXhpM9d2fTsT7T4lP+V rEY3Ck0myEKqvRoT37T9XgS0GyDutuToXSRWqMtpkZBqvdO86Up1wBf9Zz9i8s3hcz/M e8ag== X-Gm-Message-State: AFqh2krTksgvpHTmSknIg+NvAKq9PA43zjyewGz0S/xHuyrp9v9O2Y7A Y6VKQltz9/KLS49192bvKhTu3JfZRKYo84TQ X-Received: by 2002:a05:600c:2255:b0:3da:f950:8168 with SMTP id a21-20020a05600c225500b003daf9508168mr22875737wmm.35.1674480973751; Mon, 23 Jan 2023 05:36:13 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id d19-20020a05600c34d300b003a6125562e1sm10817457wmq.46.2023.01.23.05.36.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Jan 2023 05:36:13 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 20/26] target/arm: Fix physical address resolution for MTE Date: Mon, 23 Jan 2023 13:35:47 +0000 Message-Id: <20230123133553.2171158-21-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230123133553.2171158-1-peter.maydell@linaro.org> References: <20230123133553.2171158-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x329.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 From: Richard Henderson 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 Message-id: 20230114031213.2970349-1-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- 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 86b37548386..98bcf59c225 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;