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 Dec 18, 2024
1 parent f8d9fe2 commit 5788478
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 @@ -1188,6 +1188,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 1197 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 5788478

Please sign in to comment.