]> git.ipfire.org Git - thirdparty/qemu.git/commit
arm/arm-powerctl: rebuild hflags after setting CP15 bits in arm_set_cpu_on()
authorNiek Linnenbank <nieklinnenbank@gmail.com>
Fri, 20 Dec 2019 14:03:00 +0000 (14:03 +0000)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Mon, 11 May 2020 23:05:06 +0000 (18:05 -0500)
commitba6a94e64e9602ab9539a6464405b73b8b50ffda
treeb5088a98281c93f6e36ce3305329c2bbeb290787
parenta5f815514ae21216962baf3c3f9730ab0a2318c0
arm/arm-powerctl: rebuild hflags after setting CP15 bits in arm_set_cpu_on()

After setting CP15 bits in arm_set_cpu_on() the cached hflags must
be rebuild to reflect the changed processor state. Without rebuilding,
the cached hflags would be inconsistent until the next call to
arm_rebuild_hflags(). When QEMU is compiled with debugging enabled
(--enable-debug), this problem is captured shortly after the first
call to arm_set_cpu_on() for CPUs running in ARM 32-bit non-secure mode:

  qemu-system-arm: target/arm/helper.c:11359: cpu_get_tb_cpu_state:
  Assertion `flags == rebuild_hflags_internal(env)' failed.
  Aborted (core dumped)

Fixes: 0c7f8c43daf65
Cc: qemu-stable@nongnu.org
Signed-off-by: Niek Linnenbank <nieklinnenbank@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
(cherry picked from commit c8fa6079eb35888587f1be27c1590da4edcc5098)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
target/arm/arm-powerctl.c