From patchwork Wed Jun 19 07:49:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuan-Ying Lee X-Patchwork-Id: 13703500 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75ECEC2BA15 for ; Wed, 19 Jun 2024 07:49:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DDA006B03F2; Wed, 19 Jun 2024 03:49:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D88766B03F3; Wed, 19 Jun 2024 03:49:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BDDBE6B03F4; Wed, 19 Jun 2024 03:49:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 9C5B96B03F2 for ; Wed, 19 Jun 2024 03:49:52 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 12B211C20AE for ; Wed, 19 Jun 2024 07:49:52 +0000 (UTC) X-FDA: 82246864224.03.71B1005 Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by imf20.hostedemail.com (Postfix) with ESMTP id DBD961C0007 for ; Wed, 19 Jun 2024 07:49:49 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=canonical.com header.s=20210705 header.b=u01Bj4zE; spf=pass (imf20.hostedemail.com: domain of kuan-ying.lee@canonical.com designates 185.125.188.122 as permitted sender) smtp.mailfrom=kuan-ying.lee@canonical.com; dmarc=pass (policy=none) header.from=canonical.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1718783385; a=rsa-sha256; cv=none; b=nVXo8HGnfrh93wFyZOfeOCAEu0KRsy47OdyibnZt39pvlAInGteH0z8azlfYwAC0oJrMo2 1qft6kcUVjdQdggHFTHdDalFh3fCNE8kvTr9YsvjavkimJYWI/lVkZBtfj9fCrA7y1zKp9 95m31RmjnNtqe63FiU8oT7HUmxf2wqk= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=canonical.com header.s=20210705 header.b=u01Bj4zE; spf=pass (imf20.hostedemail.com: domain of kuan-ying.lee@canonical.com designates 185.125.188.122 as permitted sender) smtp.mailfrom=kuan-ying.lee@canonical.com; dmarc=pass (policy=none) header.from=canonical.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1718783385; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=3Ah02osWSKxjYX+LIDMgTigloGH2VX07SWnwSlI81uk=; b=OdijYLVNuFSx/srDmsAxOgJGlJRQVUsC+aaZ76SZ836M75UJmousvk8XKMf749JJ1iH69z XKD8mPV7aoayoKeIOViUrtedQE8DwRzAotJ74idYW7z4+ZPklH1O2TJIC7CdVt/l7fhK6T tRaePSvg1SKwg9cebmTh8DywbGe1qq8= Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 407663F456 for ; Wed, 19 Jun 2024 07:49:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1718783388; bh=3Ah02osWSKxjYX+LIDMgTigloGH2VX07SWnwSlI81uk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=u01Bj4zEOhhNc1KdS70Enb95fFl19Ymix4exLToMwhcd/tcgJF0LtemK0hzu7klz5 VtptqM+3t5IKp2+E94E/nmlL72YZ17JCEl+VsKnqUkYdcRBDlppZFn+EfGC1uyOJQX a4gxMhQHXsyCW1lM2AK9B26oLUSq2AkLjZV+1gQagRVyFQSf1G7q0skKoz1lBrKtj6 Wp9BG58NyGkaZ4kSza6tUzj7SnCQ5Y19RaFCGGwr7oD91CYEhygkZAo3Cha7elddfb sdi6OeT9ydj6QnCEEXYmV75p4RRhH+Thn5Gk3xaYpj6X/BSka2Jxt7aOmmth+OzkaM +Sg8WJb1cRqog== Received: by mail-pf1-f198.google.com with SMTP id d2e1a72fcca58-6fc395e8808so5790868b3a.0 for ; Wed, 19 Jun 2024 00:49:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718783387; x=1719388187; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3Ah02osWSKxjYX+LIDMgTigloGH2VX07SWnwSlI81uk=; b=HtZsQ9g1GbfHbQCuzv6CK0gQTQdG9tqeYiTkryMhcBZBsXZ5Jk3EoBZe2xYLru7Yat EYKXJ8cxOE8m1chm23TWOZ0Q2xgJGW0hRvxUWDC+j7OMyYSIxHriqFp9f0mZpWPawsBz tJQehgATXxUin/Kn9KTim5c4jRIickrP9EC+tHc4bXs/37pQVW5RzGOdfDz6V2vr84XT b6wrlcrNhjHOLOGpG+YGemboMr6qofq9Jtji1I/DPNSisEpyKKkG1u5JkIdvLFVfObWW ST88t8gzV71lu52+GplqxoP/euKPmgBEWKxIGQiWtnkppnpq5UN0sxc0q8lK+0ZGhXmn +Ntw== X-Gm-Message-State: AOJu0Yw/2XcJdKDDtAwHkQQw3/NbtZN6mlifwm8cj5BwISdHwMcFziRt DIwoMkhydueP+cxwsqVG7Nsg3J6S5XPcy19vMYhhVvESfJlvD6pP1mgj6avjEyNBG/2xlQ1+bTK 6C244a/Ce2j7v4DMgYDIHW8Zr5oJ+F4Y8oxbGxOe6/oLdbJ/mFH4M6t3Xw2zarSUP X-Received: by 2002:a62:ae1a:0:b0:704:16ec:4669 with SMTP id d2e1a72fcca58-70629c14fe2mr1657544b3a.6.1718783386859; Wed, 19 Jun 2024 00:49:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE0rN6YZTz94hdqcDgk8EAa6XjBgKmH0rULofVtMvz/AXKqwgcKzr4E+OVq+bIe48UJo1uPZg== X-Received: by 2002:a62:ae1a:0:b0:704:16ec:4669 with SMTP id d2e1a72fcca58-70629c14fe2mr1657509b3a.6.1718783385529; Wed, 19 Jun 2024 00:49:45 -0700 (PDT) Received: from kylee-ThinkPad-E16-Gen-1.. ([122.147.171.160]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-705ccb3cdc6sm10076908b3a.138.2024.06.19.00.49.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 00:49:45 -0700 (PDT) From: Kuan-Ying Lee To: kuan-ying.lee@canonical.com, Andrew Morton , Jan Kiszka , Kieran Bingham , Catalin Marinas , Ard Biesheuvel Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/6] scripts/gdb: change VA_BITS_MIN when we use 16K page Date: Wed, 19 Jun 2024 15:49:10 +0800 Message-Id: <20240619074911.100434-6-kuan-ying.lee@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240619074911.100434-1-kuan-ying.lee@canonical.com> References: <20240619074911.100434-1-kuan-ying.lee@canonical.com> MIME-Version: 1.0 X-Stat-Signature: b1qy5t1mzu56qfhhd3ar7h5zn95egj7r X-Rspamd-Queue-Id: DBD961C0007 X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1718783389-508197 X-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zAJMaXkDZyscnEiYTvQfqUrFGp6gh7/vqyaoJlQ0rV2fCpDkmVxPhKfCKHG5Oks6bPR1Lp9uGtG1gSRtqgm1rAH/Z/lvJiKfhyi4XKeZXdg6hKKyR9W5HdBuhoz2sSoh0PpgaybnRgalvKdTo9reQu/10l+wdRzN1GTB2lCE3gzNYxfGDpnpg0RxHk6L2y+Sw1NHdYbSzxEEHizjdAYXruG/bSYp13kR4zHGentJbJYxA8kvd2XgZLarxkZIjHT9l/91vVp6fVzOGXHl0= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Change VA_BITS_MIN when we use 16K page. Fixes: 9684ec186f8f ("arm64: Enable LPA2 at boot if supported by the system") Signed-off-by: Kuan-Ying Lee --- scripts/gdb/linux/mm.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/gdb/linux/mm.py b/scripts/gdb/linux/mm.py index 200def0e4b9a..7571aebbe650 100644 --- a/scripts/gdb/linux/mm.py +++ b/scripts/gdb/linux/mm.py @@ -47,7 +47,10 @@ class aarch64_page_ops(): self.VA_BITS = constants.LX_CONFIG_ARM64_VA_BITS if self.VA_BITS > 48: - self.VA_BITS_MIN = 48 + if constants.LX_CONFIG_ARM64_16K_PAGES: + self.VA_BITS_MIN = 47 + else: + self.VA_BITS_MIN = 48 tcr_el1 = gdb.execute("info registers $TCR_EL1", to_string=True) tcr_el1 = int(tcr_el1.split()[1], 16) self.vabits_actual = 64 - ((tcr_el1 >> 16) & 63)