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)
Fri, Sep 11, 8:22 AM
Unknown Object (File)
Mon, Sep 7, 8:45 AM
Unknown Object (File)
Sat, Sep 5, 12:08 AM
Unknown Object (File)
Fri, Sep 4, 7:40 PM
Unknown Object (File)
Fri, Sep 4, 2:04 AM
Unknown Object (File)
Thu, Sep 3, 11:10 AM
Unknown Object (File)
Wed, Sep 2, 1:33 AM
Unknown Object (File)
Tue, Sep 1, 10:23 PM

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 Passed
Unit
No Test Coverage
Build Status
Buildable 74435
Build 71318: arc lint + arc unit

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.