From nobody Thu Nov 13 20:40:33 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1582600399; cv=none; d=zohomail.com; s=zohoarc; b=BxYvlak1CZVJKi43Y3mMPTZsSvMvMU7RxEFHA6qpvN6wGgBL9lahMrt03gcVti9sPqn+JWVz4JxYwr69TjVp3wMryoEwAP7r4ecX+LR0iwnn65+kN2r2g72wbSoOWVOocWiP7Fnjv8vXZ0LhWyhl1DcpDRW9ApxQ3DY46dZcsuc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582600399; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=d8Ly0VNJpFv/+M9S/VrUvn0S3jXRNy+PHg7sk7apA00=; b=Kd0Yj+TsRwRQYWyQNQOY4qoaGGveBJ5XJxUCWHcl6HlSHHJY4Ov5JA5CoFlx4ZQ5frmNnoxmqIQWbb1L9tSjL3dt5DCXso8tj8KJeVpT+qcNSQxLioCFwyrOhRB1STIZ+cxpJC1aFy/sR/h/Sc/7BIqa7G9q7bWHZilYs/ykChU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1582600399650562.6494604032981; Mon, 24 Feb 2020 19:13:19 -0800 (PST) Received: from localhost ([::1]:48214 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6Qes-0001xP-DR for importer@patchew.org; Mon, 24 Feb 2020 22:13:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46177) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6Qe4-0000st-ST for qemu-devel@nongnu.org; Mon, 24 Feb 2020 22:12:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6Qe3-0004ix-Ni for qemu-devel@nongnu.org; Mon, 24 Feb 2020 22:12:28 -0500 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]:33170) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j6Qe3-0004ih-IO for qemu-devel@nongnu.org; Mon, 24 Feb 2020 22:12:27 -0500 Received: by mail-pf1-x444.google.com with SMTP id n7so6431656pfn.0 for ; Mon, 24 Feb 2020 19:12:27 -0800 (PST) Received: from localhost.localdomain (97-126-123-70.tukw.qwest.net. [97.126.123.70]) by smtp.gmail.com with ESMTPSA id gc1sm884747pjb.20.2020.02.24.19.12.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Feb 2020 19:12:25 -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 :mime-version:content-transfer-encoding; bh=d8Ly0VNJpFv/+M9S/VrUvn0S3jXRNy+PHg7sk7apA00=; b=Rd9NMi9oUWRVQxlAOTEgLYHme8Hu6L3UN6UD2TjY62tP8sDkMTTBGIw9OiaU6MLqhZ xYR4+BZvYxQohUThPJsPrkHw8IfpQUybJJOIdIJhqNaFRzzLB9PWdHZk1cjDRwIdzNps 0bc6xjHoPgtAbhJfKZNwDbIqXgavmOlDF4syKarQ153gEp9yjyPVhXQAHy+HB9l1v+4G YX8KZthxfwC+C85lgtK7f0JBcNxKmmG5ysp6PU0PNBWlLC6MI7TKUD8FCrnY8JU6l/2k ZtSR7fbJkvV/jqgLtUi2d+9pUuf3UPlfrfmTzpMbBWCNWD/AKxWD5QRpc2hKXSVHXTxI jXZA== 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:mime-version:content-transfer-encoding; bh=d8Ly0VNJpFv/+M9S/VrUvn0S3jXRNy+PHg7sk7apA00=; b=Y0oV3DfgZhxPmwVz3zZIj2IVUT5uX48TjxcjpJMNU8o9yRv3RQIsmhGKGVLoZtD1i4 r3TKFoXqHTJxZ3InWlSKK1IK1aZnBGTQbKCJMyQEHLZwX8jvmrv/uw5x72+/cC4bEIoG bR14+aPI3KZnXrhYkWpc/IIRHdruxuQbUi4+Z1pcfam0Zc9sC+5c7ACNQz0znk3O2smw fbZvfO1RSWynzmq/lu5Wdc+uDGPXL3pfxn0SRW9RmKxsPE2VvGHx4yVSy1hkiSWUPeI9 +ikxLQhaR3GmipJzTV5gNWyo1gXW3pX64YUBswbo6DKPo+R3ycuUMc4Exz/2I54POmLN PMqw== X-Gm-Message-State: APjAAAWmbK0+W2sPyZJBNnwE5DA3XVpF4NK8dDDd0su6QbmAFYQE64VU z4sFQP7LtBqxo0BX/Z7fg4GDEuLnPgM= X-Google-Smtp-Source: APXvYqyh6wmEEB43c68etCej1tPor5LLbDhekIxqmSJWqWOsOzyysC/jDFpZXO6WtmsobkDxnmpDkQ== X-Received: by 2002:a63:d18:: with SMTP id c24mr56127799pgl.218.1582600346167; Mon, 24 Feb 2020 19:12:26 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 1/8] target/arm: Replicate TBI/TBID bits for single range regimes Date: Mon, 24 Feb 2020 19:12:11 -0800 Message-Id: <20200225031222.15434-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200225031222.15434-1-richard.henderson@linaro.org> References: <20200225031222.15434-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::444 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" Replicate the single TBI bit from TCR_EL2 and TCR_EL3 so that we can unconditionally use pointer bit 55 to index into our composite TBI1:TBI0 field. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/helper.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 79db169e04..c1dae83700 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -10297,7 +10297,8 @@ static int aa64_va_parameter_tbi(uint64_t tcr, ARMM= MUIdx mmu_idx) } else if (mmu_idx =3D=3D ARMMMUIdx_Stage2) { return 0; /* VTCR_EL2 */ } else { - return extract32(tcr, 20, 1); + /* Replicate the single TBI bit so we always have 2 bits. */ + return extract32(tcr, 20, 1) * 3; } } =20 @@ -10308,7 +10309,8 @@ static int aa64_va_parameter_tbid(uint64_t tcr, ARM= MMUIdx mmu_idx) } else if (mmu_idx =3D=3D ARMMMUIdx_Stage2) { return 0; /* VTCR_EL2 */ } else { - return extract32(tcr, 29, 1); + /* Replicate the single TBID bit so we always have 2 bits. */ + return extract32(tcr, 29, 1) * 3; } } =20 --=20 2.20.1