Page MenuHomeFreeBSD

amd64/pmap: Return la57 in amd nested page
ClosedPublic

Authored by aokblast on Jun 30 2026, 9:14 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Oct 3, 11:54 PM
Unknown Object (File)
Sat, Oct 3, 10:28 PM
Unknown Object (File)
Sat, Oct 3, 6:10 PM
Unknown Object (File)
Sat, Oct 3, 1:36 AM
Unknown Object (File)
Sat, Oct 3, 1:16 AM
Unknown Object (File)
Thu, Oct 1, 11:31 AM
Unknown Object (File)
Thu, Oct 1, 10:59 AM
Unknown Object (File)
Tue, Sep 29, 9:41 AM

Details

Summary

AMD doesn't encode page depth in eptp. As a result, the page level is
decided by the host la57 value. Without this, it uses 4 level page and
therefore cause machine enable la57 have garbage page translation.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

@kib I don't have the machine now so it needs test from the user.

This revision is now accepted and ready to land.Jun 30 2026, 10:52 PM

This patch has made bhyve work on modern AMD CPUs for us.

root@mortis:~ # sysctl hw.model
hw.model: AMD EPYC 9845 160-Core Processor

root@mortis:~ # uname -a
FreeBSD mortis.local.abi.am 16.0-CURRENT FreeBSD 16.0-CURRENT #0 arcpatch-D57978-n286987-9ccbd8092c1a: Fri Sep 11 06:53:09 UTC 2026     root@mortis.local.abi.am:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64

root@mortis:~ # sysctl vm.pmap.la57
vm.pmap.la57: 1

Before this path being applied, bhyve would just get stuck.

Thank you all!

This revision was automatically updated to reflect the committed changes.