Page MenuHomeFreeBSD

arm64/vmm: Make remaining registers use hypctx_*_sys_reg
Needs ReviewPublic

Authored by kajetan.puchalski_arm.com on Apr 21 2026, 11:09 AM.
Tags
None
Referenced Files
F160667132: D56556.id179463.diff
Fri, Jun 26, 3:07 PM
F160643443: D56556.id180378.diff
Fri, Jun 26, 10:43 AM
F160620856: D56556.id179458.diff
Fri, Jun 26, 7:01 AM
F160607681: D56556.id179466.diff
Fri, Jun 26, 3:53 AM
Unknown Object (File)
Thu, Jun 25, 5:41 PM
Unknown Object (File)
Thu, Jun 25, 5:40 PM
Unknown Object (File)
Thu, Jun 25, 4:30 PM
Unknown Object (File)
Thu, Jun 25, 3:46 PM
Subscribers

Details

Reviewers
andrew
manu
Group Reviewers
arm64
Summary

Move vgic, timer and trapframe registers into sys_regs to handle them
in the same way as all the other registers.

Signed-off-by: Kajetan Puchalski <kajetan.puchalski@arm.com>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 74149
Build 71032: arc lint + arc unit

Event Timeline

Encode VNCR values into enum hypctx_sysreg as 64-bit offsets

Handle non-VHE, store the vncr page as a pointer

Address remaining style review comments

Use Static_assert to ensure correct struct hypctx size

sys/arm64/vmm/hyp.h
113–115 ↗(On Diff #177461)

We should create and use hyp_genassym.c if we need access to the enum from assembly.

sys/arm64/vmm/arm64.h
65–71

We might need to think about these to not break CHERI

71

Extra whitespace change

kajetan.puchalski_arm.com added inline comments.
sys/arm64/vmm/arm64.h
65–71

Should I just put these in a separate array as part of this patch then?

Put potentially exotic registers in a separate array