mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-02 22:54:52 +00:00
arm64/vmm: Fix the SPAN check
When raising an exception we may need to set the SPSR_EL1.PAN field. The check for this was incorrect meaning it would be set when it shouldn't be. Reviewed by: markj Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45717
This commit is contained in:
parent
c36fa8d502
commit
0cdd0032a7
|
@ -1108,7 +1108,7 @@ vmmops_run(void *vcpui, register_t pc, pmap_t pmap, struct vm_eventinfo *evinfo)
|
||||||
* Update fields that may change on exeption entry
|
* Update fields that may change on exeption entry
|
||||||
* based on how sctlr_el1 is configured.
|
* based on how sctlr_el1 is configured.
|
||||||
*/
|
*/
|
||||||
if ((hypctx->sctlr_el1 & SCTLR_SPAN) != 0)
|
if ((hypctx->sctlr_el1 & SCTLR_SPAN) == 0)
|
||||||
hypctx->tf.tf_spsr |= PSR_PAN;
|
hypctx->tf.tf_spsr |= PSR_PAN;
|
||||||
if ((hypctx->sctlr_el1 & SCTLR_DSSBS) == 0)
|
if ((hypctx->sctlr_el1 & SCTLR_DSSBS) == 0)
|
||||||
hypctx->tf.tf_spsr &= ~PSR_SSBS;
|
hypctx->tf.tf_spsr &= ~PSR_SSBS;
|
||||||
|
|
Loading…
Reference in a new issue