Skip to content

Commit

Permalink
arm64/vmm: Preserve PSR_C64 when injecting an exception
Browse files Browse the repository at this point in the history
  • Loading branch information
markjdb committed Nov 27, 2024
1 parent 6fb9ad4 commit 4fea6a9
Showing 1 changed file with 4 additions and 0 deletions.
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,6 +1189,10 @@ vmmops_run(void *vcpui, uintcap_t pc, pmap_t pmap, struct vm_eventinfo *evinfo)
/* 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
Expand Down

0 comments on commit 4fea6a9

Please sign in to comment.