]> Git Repo - qemu.git/commit
target/arm: Recalculate hflags correctly after writes to CONTROL
authorPeter Maydell <[email protected]>
Tue, 3 Mar 2020 17:49:49 +0000 (17:49 +0000)
committerPeter Maydell <[email protected]>
Thu, 12 Mar 2020 16:01:37 +0000 (16:01 +0000)
commit19717e9b44f5a14bbf92fb3bb9b99006d2f63dcf
treece48c47a185af95809d741319dfeb6dfb4799e03
parent0ea9e6583b0778568ba4c6e749f2848291e4a9b8
target/arm: Recalculate hflags correctly after writes to CONTROL

A write to the CONTROL register can change our current EL (by
writing to the nPRIV bit). That means that we can't assume
that s->current_el is still valid in trans_MSR_v7m() when
we try to rebuild the hflags.

Add a new helper rebuild_hflags_m32_newel() which, like the
existing rebuild_hflags_a32_newel(), recalculates the current
EL from scratch, and use it in trans_MSR_v7m().

This fixes an assertion about an hflags mismatch when the
guest changes privilege by writing to CONTROL.

Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Message-id: 20200303174950[email protected]
target/arm/helper.c
target/arm/helper.h
target/arm/translate.c
This page took 0.026786 seconds and 4 git commands to generate.