Page MenuHomeFreeBSD

arm64: add HCRX_EL2 register
ClosedPublic

Authored by harry.moulton_arm.com on Jan 21 2025, 5:47 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, May 3, 8:09 AM
Unknown Object (File)
Thu, May 1, 12:33 AM
Unknown Object (File)
Fri, Apr 25, 2:02 PM
Unknown Object (File)
Mon, Apr 14, 2:16 PM
Unknown Object (File)
Thu, Apr 10, 7:40 PM
Unknown Object (File)
Mar 7 2025, 11:19 AM
Unknown Object (File)
Mar 5 2025, 6:25 AM
Unknown Object (File)
Mar 4 2025, 12:04 PM
Subscribers

Details

Summary

HCRX_EL2 is the Extended Hypervisor Configuration Register introduced
with FEAT_HCX in ARMv8.7. All fields in this register are used for
features in ARMv8.7 and above. Initially zero the register, incase
firmware has not properly configured it.

Sponsored By: Arm Ltd
Signed-off-by: Harry Moulton <harry.moulton@arm.com>

Diff Detail

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

Event Timeline

sys/arm64/arm64/locore.S
378–390

Is there a reason to put this in a VHE only code path? It's also unlikely to need the isb as there is one before the eret that can be used as the context synchronization event.

sys/arm64/include/armreg.h
721–727 ↗(On Diff #149676)

This should be in hypervisor.h as it's an EL2 only register.

Moved HCRX register definition to hypervisor.h, moved initial
configuration of hcrx_el2 to after .Ldone_vhe

sys/arm64/arm64/locore.S
400

This will trash the cptr_el2 value. After msr spsr_el2, x5 will be safe as that's the last register set based on VHE vs non-VHE/

Move configuration of hcrx_el2 to avoid trashing cptr_el2

This revision is now accepted and ready to land.Jan 22 2025, 3:41 PM
This revision was automatically updated to reflect the committed changes.