From nobody Mon May 27 14:43: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 4Vnz0m271Cz5LFxK; Mon, 27 May 2024 14:43:36 +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 4Vnz0m1Vg7z49dF; Mon, 27 May 2024 14:43:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716821016; 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=9dFzgjLilE87GlgPCT0Pw4JoPvtnsO5m1F3gagFVDVE=; b=jWzWEI2Yh853Vmqu6C1CFGGALnCJEQ/QxsQ81S7wg3DRvKO/jd9mruRaRxnZu6lfDvDy37 c/QRamh2BjM8jeBX5ShUa+ee4xTwi46g2+LhOFRc8HeBqzqXALYoIr9bmlPBjO2Ismki+5 Vn8oF7KTU1cTvHuwnKQYkwGnUZjyF0FvqQVGQKIiwINhmFYcVTzZ7y31sZsuJf+5aBY1zw BiBeGPKOR4ox/PugYjVQuAJfkNkJMDLDMsnBvglzlsHz5A3KE7deb/IAfnc5NffIhKmbvL yS34pTgCIg6Yr4YOY5Dtg5R8w7+Z6/IHE17RpAa65pQYZEK2ql8ndmFyoiwDyw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716821016; a=rsa-sha256; cv=none; b=n6pMh21yGFklIdPuekiZqmn5k9mh8744/gZh6KHHwguevX/VcXs2rAaBvuVTc9hCHoejkE D3HQEE/3EFs26C0Mu14MieuUZlht0WPqJDn+TE6rp/nBGcAo5O71UiC68R0P+qqCw3z5tL kPhBv74wSpqnVNXAhQizamHcvlH1awxh/UdzqQQN1XVGLv4t01s52ebgICjecXziMGNRfv 5M6xICzj54iWByqi+HrlRba+9TsFfN3HzsoS7Nfw7jJvKqNU5g5FwuBopU00CFSVjvykzN 3Y+F8+qvvozj+5AkOmgtMUidaAdzXOlZodnyCTVjhdeehH5BLlL4T8pIf2VnGA== 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=1716821016; 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=9dFzgjLilE87GlgPCT0Pw4JoPvtnsO5m1F3gagFVDVE=; b=VWle3KyQRx2p1ajAqlHeSRempaK5is2y1FxLW5t35CKD10CGykTpOoDYbGL5elQa8vMho6 Uz/1nqEWO992GQM9ej5XbMewLCPSKHSY62k+gcZH/cNfB+lrriHsMH4CpbotO6vN2rriSr 3nHIpsQB7pt8zuTmFv25glaBy7Hc8DH2zoZBYdpAontUeJrzDt8YtvkUnouTlk3cJERirp QCeYnVYdLxw9fIzYzjmbtw+ScGepdoWENs5FOcKxcO8DoG2/QJAB4tq8U/KoPpuBMeO+IP VayiLW/QIxZXjfZ2ffcfLH/xAc3zFFl+BHvsXYSs2wX29Q8zY9G+lHLtFrkw+Q== 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 4Vnz0m13CQznpF; Mon, 27 May 2024 14:43: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 44REha2n023752; Mon, 27 May 2024 14:43:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44REhaQ2023749; Mon, 27 May 2024 14:43:36 GMT (envelope-from git) Date: Mon, 27 May 2024 14:43:36 GMT Message-Id: <202405271443.44REhaQ2023749@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: ed10a9398d05 - stable/14 - 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/stable/14 X-Git-Reftype: branch X-Git-Commit: ed10a9398d05738089ee31fed263854ba92884e2 Auto-Submitted: auto-generated The branch stable/14 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=ed10a9398d05738089ee31fed263854ba92884e2 commit ed10a9398d05738089ee31fed263854ba92884e2 Author: Mitchell Horne AuthorDate: 2024-05-15 17:07:33 +0000 Commit: Mitchell Horne CommitDate: 2024-05-27 14:41:49 +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 (cherry picked from commit d7adf3b47a058552270fb2603cc888f40eba3e17) --- 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 8ddc31bed81c..45245fe54a59 100644 --- a/sys/riscv/riscv/pmap.c +++ b/sys/riscv/riscv/pmap.c @@ -715,7 +715,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);