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
F154010852: D56518.diff
Sat, Apr 25, 10:47 AM
F153986022: D56518.id176091.diff
Sat, Apr 25, 6:40 AM
F153979471: D56518.id175985.diff
Sat, Apr 25, 5:50 AM
F153971424: D56518.id175892.diff
Sat, Apr 25, 4:46 AM
F153956499: D56518.diff
Sat, Apr 25, 2:18 AM
F153909169: D56518.diff
Fri, Apr 24, 5:21 PM
Unknown Object (File)
Fri, Apr 24, 6:05 AM
Unknown Object (File)
Wed, Apr 22, 6:57 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 72433
Build 69316: 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
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.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.