Page MenuHomeFreeBSD

vm: Add flags for unprotected allocations
ClosedPublic

Authored by sarah.walker2_arm.com on Apr 20 2026, 1:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, May 18, 2:35 PM
Unknown Object (File)
Mon, May 18, 2:27 PM
Unknown Object (File)
Thu, May 14, 11:35 AM
Unknown Object (File)
Thu, May 14, 6:36 AM
Unknown Object (File)
Thu, May 14, 1:22 AM
Unknown Object (File)
Wed, May 13, 8:18 PM
Unknown Object (File)
Tue, May 12, 4:34 PM
Unknown Object (File)
Tue, May 12, 12:15 PM
Subscribers

Details

Summary

Unprotected allocations are intended to be accessible outside of the current
VM on systems such as Arm CCA.

Sponsored by: Arm Ltd

Diff Detail

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

Event Timeline

Why can't this flag be stored in the machine-dependent fields of the page, i.e., in some spare field of struct md_page?

Why can't this flag be stored in the machine-dependent fields of the page, i.e., in some spare field of struct md_page?

I'm assuming you were referring to PG_UNPROTECTED? On further examination it's not required, so the latest change removes it.

sys/vm/vm_page.h
537 ↗(On Diff #175985)

What's the purpose of VM_ALLOC_UNPROTECTED? vm_page_alloc_* don't do anything with it.

sys/vm/vm_page.h
537 ↗(On Diff #175985)

You are correct, VM_ALLOC_UNPROTECTED no long serves a purpose. Removed.

This seems fine, something similar will be needed on amd64 for, e.g., AMD SVE.

This revision is now accepted and ready to land.Apr 22 2026, 1:05 PM

Just out of curiosity, where are the pmap changes?

In D56518#1295709, @alc wrote:

Just out of curiosity, where are the pmap changes?

They are part of D56520. To mark the mapping as unprotected we set a bit in the physical address. The firmware tells us which bit to set on boot.

My understanding is Intel and AMD have similar schemes on their equivalent to Arm CCA.

This revision was automatically updated to reflect the committed changes.