]> git.proxmox.com Git - mirror_qemu.git/commit
target/arm: Fix cpu_get_tb_cpu_state() for non-SVE CPUs
authorRichard Henderson <richard.henderson@linaro.org>
Tue, 25 Sep 2018 13:02:29 +0000 (14:02 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 25 Sep 2018 13:02:29 +0000 (14:02 +0100)
commite79b445d896deb61909be52b61b87c98a9ed96f7
treeb7b6a016e3ad5297809af3aeeb7de8fc8c046c04
parent506e4a00de01e0b29fa83db5cbbc3d154253b4ea
target/arm: Fix cpu_get_tb_cpu_state() for non-SVE CPUs

Not only are the sve-related tb_flags fields unused when SVE is
disabled, but not all of the cpu registers are initialized properly
for computing same.  This can corrupt other fields by ORing in -1,
which might result in QEMU crashing.

This bug was not present in 3.0, but this patch is cc'd to
stable because adf92eab90e3f5f34c285 where the bug was
introduced was marked for stable.

Fixes: adf92eab90e3f5f34c285
Cc: qemu-stable@nongnu.org (3.0.1)
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target/arm/helper.c