From nobody Tue Jun 04 23:19:36 2024 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 4Vv64T0sNJz5MvMj; Tue, 04 Jun 2024 23:19:37 +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 4Vv64T02sgz4F01; Tue, 4 Jun 2024 23:19:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717543177; 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=Wkjn52duBzA9d3p3+MqOtzpD5CH63g3MQqgdYAfGJHk=; b=KOCsiBoDMqrxKDfpdZcXf8+OwzWKRfPJABuPbf6U1Ze+OH+EpxHeiEYgtfJTpt8S5UjzUJ feomD/Jj0mGGSzxzHq3fw2m0DCdrGNTvBfvnTqTnFdonlInx6Vz7R0V9sf02QDFDdicB/4 7URQRzfOicYtVpATJf60rlHYDP9VIl/j6RkeKraa/HlMne8XhWMHxBfTQQdiwxoHjReL2s qB+vvWDkUrmxhArq2r8QysGAasaCJoo0/vwsis22zZUSBkKkvnR23MJKhIRAh7FsZDENup GYg84/5blMJ/idGXJ8YXxroUakHBRpZLJ+BwngQFMVeXE2sFZa5FKe7CuaYo6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717543177; a=rsa-sha256; cv=none; b=JS9XoTGbYhg5uQFpEe7p3QzdXfkU7hBNWNxakSnieKZZSfCOW4B35XUE5bCBbIGdaAK3P0 gsFNEM12ShWNOwsdnKgH0ZMkgKVOzqbXz7aMfI9AEm3VoF2OVeAeBvo3aWHLw2MGBw38zO K9YUAmLsnDDu0vOINVLG/d/CfMfllfs6my6uMsAXtnxqDJi7JCE19ryQb+mZE3hPJJrE30 HiI0IYOUVRMtR61X3gkiC3JvIFyICl4IO16yyWcPBrolwxCokAge2IS7mOmNlR+gckgR+b udNN6NvXHgkVxxok7FEclkbGKavzYYTLFFmaUcAffQzuCiqLCnhoiTxrOY2N+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717543177; 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=Wkjn52duBzA9d3p3+MqOtzpD5CH63g3MQqgdYAfGJHk=; b=XI4ONtRNp/52wL7O/Iod89Uu/nhWbOXWZZPT6EYP6mtQBl0U6G51u5A4sjTfLDyq4SqqaX 1bNLH4shltnLVKCDbRv2hSWuLlmJ2vwdaYDmCpjvyke9sc4MdPRxDvM+9VpPIy0p84WWPI /i0EalP88AZcWVBAXVnj3chd8szK23fCBzpUnYoBb7lqz9c1HlIh5KJ9Q8DDeEsXCeY0MN Z+9h8WC21chCI6BC6YlLxw3DPYOE6fHjYh1YbiDs3yGX04GjnbKWcQgGslEEUbiwg4BAii gi2w1EvYnPPvBaGnke/tIidnRKJege0AOuvC5rdApQTHW8GoWENB3KjjKxg0Rw== 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 4Vv64S6kgbzdZF; Tue, 4 Jun 2024 23:19:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 454NJaAt096666; Tue, 4 Jun 2024 23:19:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 454NJawI096663; Tue, 4 Jun 2024 23:19:36 GMT (envelope-from git) Date: Tue, 4 Jun 2024 23:19:36 GMT Message-Id: <202406042319.454NJawI096663@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 65a33120c3d5 - main - riscv: fix vm.pmap.kernel_maps with Sv48 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 65a33120c3d5c4bd815de1c463fac0cd3ce7d368 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=65a33120c3d5c4bd815de1c463fac0cd3ce7d368 commit 65a33120c3d5c4bd815de1c463fac0cd3ce7d368 Author: Mitchell Horne AuthorDate: 2024-06-04 23:18:54 +0000 Commit: Mitchell Horne CommitDate: 2024-06-04 23:18:54 +0000 riscv: fix vm.pmap.kernel_maps with Sv48 With 4-level paging enabled, the layout of KVA is identical, but we need to step through an extra level to find the L1 table. Reviewed by: markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45473 --- sys/riscv/riscv/pmap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c index e8504bcb0f59..0bdf3be8ea39 100644 --- a/sys/riscv/riscv/pmap.c +++ b/sys/riscv/riscv/pmap.c @@ -5017,7 +5017,7 @@ sysctl_kmaps(SYSCTL_HANDLER_ARGS) { struct pmap_kernel_map_range range; struct sbuf sbuf, *sb; - pd_entry_t l1e, *l2, l2e; + pd_entry_t *l1, l1e, *l2, l2e; pt_entry_t *l3, l3e; vm_offset_t sva; vm_paddr_t pa; @@ -5044,7 +5044,8 @@ sysctl_kmaps(SYSCTL_HANDLER_ARGS) else if (i == pmap_l1_index(VM_MIN_KERNEL_ADDRESS)) sbuf_printf(sb, "\nKernel map:\n"); - l1e = kernel_pmap->pm_top[i]; + l1 = pmap_l1(kernel_pmap, sva); + l1e = pmap_load(l1); if ((l1e & PTE_V) == 0) { sysctl_kmaps_dump(sb, &range, sva); sva += L1_SIZE;