From nobody Wed May 15 17:09:40 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 4Vffpr66Wtz5LBNS; Wed, 15 May 2024 17:09:40 +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 4Vffpr5gBVz4dFS; Wed, 15 May 2024 17:09:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715792980; 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=KIcNkpf0+jgE912EE4Iu79tGd9hxuyrVDRmnP1iJtts=; b=xEBCUHeA8K4hVBXGny3ItCdyTaNRflsCPNZASj1V7prLft+UFSt0F9pHkH1bvRuvQO6esd /aq4gExQ7kSiB5xQocjxhuxzM6oPyxt4qOA7OOAQCtJtP92WnhtE1zLfQO83p7X1BQQe/U 2pNbeUCSRDGdcEieApKZ5ubr4ehELn2NVY5m1Q98CV/bC///D5X5U5ojOTTy3Wvgcw1Jm0 sjbKcDKk+j6oOYe9g3Vg3yYQ5G+Ntl5cUVEbcM8kpp9wlDgqK816G08QGVQ+YvaROdN0nm niLm1zuDodUeAcek8PAgpqjZb1cw08nA/GXqCeb+e/sPDEJ2IL5wChAaQi257Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715792980; a=rsa-sha256; cv=none; b=tZdxsEw6IAl1etMfoyjEPj3RimQDExeGEOjjBRLSwpqQnfckeDhtxKt2zG4LuuJhVDzKgO DAstqoYo1SUlq/rIMap4Fg/jNBvklCTGYEKJNy/sOovu/zej0pHujmf1IjZpotFyKole2F 7I7wyoq+FCtVB/9Kiw0OsCDovfUyOJVNFrsrvPCfp7zuRxsRR6pT3yPcHAlDdjv82j5YsU elUfeZOIxH6HEJ48uNh98wTWQD/S0hXrWRcM1dvOt9Ont51u7VKC0LpzuJYnZ5p4LjpLTT dg5OjYVLMgtDuU7PYxOrNgsh/5aAPjocKkQP9FbAM7tKr65ZE4SfHcuDlHW1Fw== 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=1715792980; 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=KIcNkpf0+jgE912EE4Iu79tGd9hxuyrVDRmnP1iJtts=; b=ejalOqIraScpq3MTvvTSAaJ5DIeCQOv99Pjiml6D+Wcrmv7SqdN80WBRU7vtEPUlu+t3AN q2g42uBv05cbQjbNWN3ZLdsIw+J++eY3mcsfqqCyixf9S394qFOaHjDzdwRh6QcXAFkOGo k0zZPKUnKAigpg0joM0SB3K8Nw6yK/L/MB6PVK7wwCmWoZiRved5uCE373NYkp+AJhp7zj PtIZqESurkl9jS0MxiFzzvwqk4IXJWT6vp0b/M2UR5vGWjrKAfXTWObtWCb/Wa6pg8kw+w 5fXNBH30PVtqc0K2VusFt1o4Kog/Wnptxvt4Nmn1shLdLZIbFYi/DZgYQ1mcoQ== 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 4Vffpr5GqlzNcr; Wed, 15 May 2024 17:09:40 +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 44FH9eiF073026; Wed, 15 May 2024 17:09:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44FH9eOb073023; Wed, 15 May 2024 17:09:40 GMT (envelope-from git) Date: Wed, 15 May 2024 17:09:40 GMT Message-Id: <202405151709.44FH9eOb073023@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: d7adf3b47a05 - main - riscv: fix L0 PTE setup (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: d7adf3b47a058552270fb2603cc888f40eba3e17 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=d7adf3b47a058552270fb2603cc888f40eba3e17 commit d7adf3b47a058552270fb2603cc888f40eba3e17 Author: Mitchell Horne AuthorDate: 2024-05-15 17:07:33 +0000 Commit: Mitchell Horne CommitDate: 2024-05-15 17:07:33 +0000 riscv: fix L0 PTE setup (Sv48) Per the Privilege Spec, the Accessed (A) or Dirty (D) bits must only be set for a leaf PTE. It seems newer versions of QEMU have started to enforce this requirement, and without this change, pmap_bootstrap() hangs when switching to Sv48 mode. Reviewed by: jrtc27, markj MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45210 --- sys/riscv/riscv/pmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c index b92cb816f44a..b571806bb2da 100644 --- a/sys/riscv/riscv/pmap.c +++ b/sys/riscv/riscv/pmap.c @@ -714,7 +714,7 @@ pmap_bootstrap(vm_offset_t l1pt, vm_paddr_t kernstart, vm_size_t kernlen) alloc_pages(l0pv, 1); l0p = (void *)l0pv; l1pa = pmap_early_vtophys(l1pt, l1pt); - l0p[pmap_l0_index(KERNBASE)] = PTE_V | PTE_A | PTE_D | + l0p[pmap_l0_index(KERNBASE)] = PTE_V | ((l1pa >> PAGE_SHIFT) << PTE_PPN0_S); l0pa = pmap_early_vtophys(l1pt, l0pv);