qemu/target/arm
Peter Maydell 25d0ca4fb0 target/arm: Disable SME if SVE is disabled
There is no architectural requirement that SME implies SVE, but
our implementation currently assumes it. (FEAT_SME_FA64 does
imply SVE.) So if you try to run a CPU with eg "-cpu max,sve=off"
you quickly run into an assert when the guest tries to write to
SMCR_EL1:

#6  0x00007ffff4b38e96 in __GI___assert_fail
    (assertion=0x5555566e69cb "sm", file=0x5555566e5b24 "../../target/arm/helper.c", line=6865, function=0x5555566e82f0 <__PRETTY_FUNCTION__.31> "sve_vqm1_for_el_sm") at ./assert/assert.c:101
#7  0x0000555555ee33aa in sve_vqm1_for_el_sm (env=0x555557d291f0, el=2, sm=false) at ../../target/arm/helper.c:6865
#8  0x0000555555ee3407 in sve_vqm1_for_el (env=0x555557d291f0, el=2) at ../../target/arm/helper.c:6871
#9  0x0000555555ee3724 in smcr_write (env=0x555557d291f0, ri=0x555557da23b0, value=2147483663) at ../../target/arm/helper.c:6995
#10 0x0000555555fd1dba in helper_set_cp_reg64 (env=0x555557d291f0, rip=0x555557da23b0, value=2147483663) at ../../target/arm/tcg/op_helper.c:839
#11 0x00007fff60056781 in code_gen_buffer ()

Avoid this unsupported and slightly odd combination by
disabling SME when SVE is not present.

Cc: qemu-stable@nongnu.org
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2005
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20231127173318.674758-1-peter.maydell@linaro.org
(cherry picked from commit f7767ca301796334f74b9b642b395a4bd3e3dbac)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2023-12-13 18:51:00 +03:00
..
hvf
tcg target/arm: Fix SME FMOPA (16-bit), BFMOPA 2023-11-22 14:25:22 +03:00
arch_dump.c
arm-powerctl.c
arm-powerctl.h
arm-qmp-cmds.c
common-semi-target.h
cortex-regs.c
cpregs.h
cpu-param.h
cpu-qom.h
cpu.c target/arm: Disable SME if SVE is disabled 2023-12-13 18:51:00 +03:00
cpu.h arm: spelling fixes 2023-07-25 17:13:53 +03:00
cpu64.c arm: spelling fixes 2023-07-25 17:13:53 +03:00
debug_helper.c target/arm: Special case M-profile in debug_helper.c code 2023-07-25 10:56:51 +01:00
gdbstub.c target/arm: gdbstub: Guard M-profile code with CONFIG_TCG 2023-07-06 13:26:43 +01:00
gdbstub64.c
helper.c target/arm: Handle overflow in calculation of next timer tick 2023-12-05 12:32:36 +03:00
helper.h target/arm: Demultiplex AESE and AESMC 2023-07-08 07:30:18 +01:00
hvf_arm.h
hyp_gdbstub.c
idau.h
internals.h target/arm: Correctly propagate stage 1 BTI guarded bit in a two-stage walk 2023-11-09 16:39:13 +03:00
Kconfig
kvm-consts.h
kvm-stub.c
kvm.c accel/kvm: Specify default IPA size for arm64 2023-08-24 18:45:44 +03:00
kvm64.c arm64: Restore trapless ptimer access 2023-09-21 19:35:19 +03:00
kvm_arm.h
machine.c
meson.build
op_addsub.h
ptw.c target/arm: Correctly propagate stage 1 BTI guarded bit in a two-stage walk 2023-11-09 16:39:13 +03:00
syndrome.h target/arm: Set IL bit for pauth, SVE access, BTI trap syndromes 2023-12-05 12:32:36 +03:00
tcg-stubs.c
trace-events
trace.h
vfp_helper.c