From nobody Tue Dec 28 23:46:40 2021 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 63FCF192685A; Tue, 28 Dec 2021 23:46:41 +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 4JNrm10WxFz4lGX; Tue, 28 Dec 2021 23:46:41 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 E60781AA68; Tue, 28 Dec 2021 23:46:40 +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 1BSNke4c020670; Tue, 28 Dec 2021 23:46:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BSNkeMM020669; Tue, 28 Dec 2021 23:46:40 GMT (envelope-from git) Date: Tue, 28 Dec 2021 23:46:40 GMT Message-Id: <202112282346.1BSNkeMM020669@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Cox Subject: git: 3c2ee7b28cfd - main - arm64: Enhance pmap_pte_exists()'s error reporting 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: alc X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3c2ee7b28cfd715e28e72d76efd89ba3c38aa970 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640735201; 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=wYYDv8CNa+nhqNPk/i9tYgDBMd6yA0KvlggZGanc5uQ=; b=HgjS4jXX8bU2GtJawB9uGlOQMKSdPjqJAOHriK/wpyluFcQFwpc3TWTufGQadFVKjtQArb WD0csQABopA5adjcUUx6cZ6xshp7cAa1u+KuZBrFAoWaCxaiYG0ylt+YVcNN8NMZ6AMe9r 6D81j9GToLqPrt/KDhPPG6aSvjpklzh6pObrpO7//2kXjn3509794gcqzOEeLC05JPOjqo pBNiIx9yYwY3D9MNleLD+mGSxRYHY0a4ltwRh797j3kmhyece273fA+9RKJVZ09yJ2R9VU PaHkKtc77JQlV4hDNCmBhnMshjnSY9XuSqZqUC41bYI1nWlm/J6EkdLM8SWA1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640735201; a=rsa-sha256; cv=none; b=i2RA0y6q4aUPrk3j5Hc1MK0qNbEJzN3txG9w3o4mo0qsCyPTQ8jRoVfe8WcKFlmrTk+k0a Hc1aE94s3KgrY0VRVEF6mxBzxjUeLt622frzj7MbseRzLtVpl5mkt4dWC1U2RgrMWEMm0Y YuOrTP8MkwyLc3aG82/eDpkZthCdVCqZVzveWO1aRaXM5/5el747m52YbxVX6W5a9xk9Un k2U1UPGaxj9l2zN1P1SLTKDxqHMvRErwcIu94s9hsRFw3B3J4j1tbfmS7nyK0GkI0Lr9hb ZJ6NDbwXcqxQ0YsQlRaNkEbDq1G+/wbpsydBVjjNIFPlcaC7djIVytFk+1bmmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by alc: URL: https://cgit.FreeBSD.org/src/commit/?id=3c2ee7b28cfd715e28e72d76efd89ba3c38aa970 commit 3c2ee7b28cfd715e28e72d76efd89ba3c38aa970 Author: Alan Cox AuthorDate: 2021-12-28 23:17:42 +0000 Commit: Alan Cox CommitDate: 2021-12-28 23:46:21 +0000 arm64: Enhance pmap_pte_exists()'s error reporting Report the descriptor type and level at which the page table does not match the caller's expectations. MFC after: 1 week --- sys/arm64/arm64/pmap.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 4bd3eef7a18f..15bb813f591d 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -607,6 +607,7 @@ pmap_pte_exists(pmap_t pmap, vm_offset_t va, int level, const char *diag) { pd_entry_t *l0p, *l1p, *l2p; pt_entry_t desc, *l3p; + int walk_level __diagused; KASSERT(level >= 0 && level < 4, ("%s: %s passed an out-of-range level (%d)", __func__, diag, @@ -628,11 +629,17 @@ pmap_pte_exists(pmap_t pmap, vm_offset_t va, int level, const char *diag) desc = pmap_load(l3p) & ATTR_DESCR_MASK; if (desc == L3_PAGE && level == 3) return (l3p); - } - } - } + else + walk_level = 3; + } else + walk_level = 2; + } else + walk_level = 1; + } else + walk_level = 0; KASSERT(diag == NULL, - ("%s: va %#lx is not mapped at level %d", diag, va, level)); + ("%s: va %#lx not mapped at level %d, desc %ld at level %d", + diag, va, level, desc, walk_level)); return (NULL); }