Page MenuHomeFreeBSD

vm: Add flags for unprotected allocations
AcceptedPublic

Authored by sarah.walker2_arm.com on Mon, Apr 20, 1:16 PM.
Tags
None
Referenced Files
F154424610: D56518.diff
Tue, Apr 28, 11:22 AM
F154406335: D56518.id175892.diff
Tue, Apr 28, 9:20 AM
Unknown Object (File)
Tue, Apr 28, 12:14 AM
Unknown Object (File)
Mon, Apr 27, 5:17 PM
Unknown Object (File)
Mon, Apr 27, 8:51 AM
Unknown Object (File)
Sun, Apr 26, 3:14 AM
Unknown Object (File)
Sat, Apr 25, 2:03 PM
Unknown Object (File)
Sat, Apr 25, 10:47 AM
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 72357
Build 69240: arc lint + arc unit

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
538

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

sys/vm/vm_page.h
538

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.Wed, Apr 22, 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.