Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arm64/vmm: Preserve PSR_C64 when injecting an exception #2255

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions sys/arm64/vmm/vmm_arm64.c
Original file line number Diff line number Diff line change
Expand Up @@ -1189,9 +1189,13 @@
/* Set the new cpsr */
hypctx->tf.tf_spsr = hypctx->spsr_el1 & PSR_FLAGS;
hypctx->tf.tf_spsr |= PSR_DAIF | PSR_M_EL1h;
#if __has_feature(capabilities)
if ((hypctx->cctlr_el1 & CCTLR_EL1_C64E_MASK) != 0)
hypctx->tf.tf_spsr |= PSR_C64;
#endif

/*
* Update fields that may change on exeption entry

Check warning on line 1198 in sys/arm64/vmm/vmm_arm64.c

View workflow job for this annotation

GitHub Actions / Style Checker

Missing Signed-off-by: line
* based on how sctlr_el1 is configured.
*/
if ((hypctx->sctlr_el1 & SCTLR_SPAN) == 0)
Expand Down
Loading