From nobody Tue Mar 29 15:53:37 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 767A81A34491; Tue, 29 Mar 2022 15:53:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KSYyB1qnkz3tRG; Tue, 29 Mar 2022 15:53:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648569218; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xd2PxqEy7MLJzbGEpUJQvTxQiwtqxDUory9KO0Sp3is=; b=kASMYNIRdKmJtSbdJ9PVsjBApF3/9I6tbT6tmKZRjuPgmPCDJrR6P52c+OZOrg618/k/s4 xfmg1mgosVCq88dpoh53w+AaM3WjD8oPRkIEeTsmg3yD266jtIhi/M0DbA7fhWDXNQDqis 2w4H1Z+7GqhnKRdPlHBpfIpYs1MjzIhxrlAg5CsLWX5xP+1lv71HfGwlQWD/QPPlJf0mVh P5f3y/5/qHOdQoCyCmTBXk1sMpZkvl9u4Oh9WHzMQc2HMhfExEWxu+BWwW+N1mvl+Ajl0a H6S1+7aTj5A9KGooW+2NTblPUn2GsEeFzY0o52ene/LZoiqnxAOtpNLG96ufSg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0129A217C0; Tue, 29 Mar 2022 15:53:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 22TFrbae071346; Tue, 29 Mar 2022 15:53:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22TFrbhq071345; Tue, 29 Mar 2022 15:53:37 GMT (envelope-from git) Date: Tue, 29 Mar 2022 15:53:37 GMT Message-Id: <202203291553.22TFrbhq071345@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: D Scott Phillips Subject: git: 2c013d142b14 - stable/13 - arm64: pmap: Mask VA operand in TLBI instructions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: scottph X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2c013d142b146ed42d0fe6458ee8a394161ad370 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648569218; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xd2PxqEy7MLJzbGEpUJQvTxQiwtqxDUory9KO0Sp3is=; b=MKV0J9OMFpKAztscJJrOWpVIabDHkIrEc6gtB+hv1jH8sFCcPnRYJbppTx8CZjrdW+yFcC nB6J0YnhMUhsvDZMXIDgGLODnVHlxzlYihCAQttRD1BhenG3Im0yCslB+vxdfiKl/ufJjn tzIF88Z5424ffBmj+UVcJkFYuQNy+fYeoVQN0WwA9ZMjTvtE8RyJ8kTUce5lkUDpGD/yn2 P91MiV1PecTTvX17kYNe18RHgXV+K5famfV22pbyN6+rfjpwOOxFJrTcef5HyF1VJQUivm NCENFEhTqwUe4bP3k8opBPuwmARUOLnxeJhiHJN7HzHJCBVwpci00FarS89Ilw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648569218; a=rsa-sha256; cv=none; b=xz9cdCvYU1wjnYwOZSNydI2heeA07uKFv8loy8TpqITUbVx4yo1OY4+lqLVbxoLicSWuvP CVv7GcR9M93PPVqdTM7ci00vd5mY5cRvMV0821sJBVbfTGmd8G84SwQj0/vWJM7mGo6MQP LqI0t7PSpx4tAtvgObflXGII5MovP+OCfC6HtPzSgG7zW136LCu3zm/OCnwELTx9jgc7xi ShpCoW4wCYQ1OHcds5qjXphvnyWWiYXljPqGVT2O102EqcXJ2ZgG3hB/N8zMh64YwK2DLI yfx4gB4Eh2YdHniZdkZwGTY680GeU+W/QoyI110Vu+UycuUG5t7RccYfJXhb+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by scottph: URL: https://cgit.FreeBSD.org/src/commit/?id=2c013d142b146ed42d0fe6458ee8a394161ad370 commit 2c013d142b146ed42d0fe6458ee8a394161ad370 Author: D Scott Phillips AuthorDate: 2022-03-25 16:04:11 +0000 Commit: D Scott Phillips CommitDate: 2022-03-29 15:47:43 +0000 arm64: pmap: Mask VA operand in TLBI instructions Bits 43:0 of the TLBI operand are bits 55:12 of the VA. Leaving bits 63:55 of the VA in bits 51:44 of the operand might wind up setting the TTL field (47:44) and accidentally restricting which translation levels are flushed in the TLB. Reviewed By: andrew MFC after: 3 days Sponsored by: Ampere Computing Differential Revision: https://reviews.freebsd.org/D34664 (cherry picked from commit a693a30038278b1ccd3e67b98d76e259ca1b405d) --- sys/arm64/arm64/pmap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 26e62c9e3cbb..0183dde11847 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -361,7 +361,8 @@ void (*pmap_invalidate_vpipt_icache)(void); #define COOKIE_TO_EPOCH(cookie) ((int)((u_long)(cookie) >> 32)) #define TLBI_VA_SHIFT 12 -#define TLBI_VA(addr) ((addr) >> TLBI_VA_SHIFT) +#define TLBI_VA_MASK ((1ul << 44) - 1) +#define TLBI_VA(addr) (((addr) >> TLBI_VA_SHIFT) & TLBI_VA_MASK) #define TLBI_VA_L3_INCR (L3_SIZE >> TLBI_VA_SHIFT) static int superpages_enabled = 1;