target/arm: Disable cryptographic instructions when neon is disabled
commiteb851c1151252158ab5b5917c5d386e1d69de3a2
authorDamien Hedde <damien.hedde@greensocs.com>
Wed, 27 Apr 2022 09:01:17 +0000 (27 11:01 +0200)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 28 Apr 2022 12:38:55 +0000 (28 13:38 +0100)
treeaad339f564998450780f23393acc235f1e7e74c9
parentc6a59b559b6c669e582057fe390809a76f86490a
target/arm: Disable cryptographic instructions when neon is disabled

As of now, cryptographic instructions ISAR fields are never cleared so
we can end up with a cpu with cryptographic instructions but no
floating-point/neon instructions which is not a possible configuration
according to Arm specifications.

In QEMU, we have 3 kinds of cpus regarding cryptographic instructions:
+ no support
+ cortex-a57/a72: cryptographic extension is optional,
  floating-point/neon is not.
+ cortex-a53: crytographic extension is optional as well as
  floating-point/neon. But cryptographic requires
  floating-point/neon support.

Therefore we can safely clear the ISAR fields when neon is disabled.

Note that other Arm cpus seem to follow this. For example cortex-a55 is
like cortex-a53 and cortex-a76/cortex-a710 are like cortex-a57/a72.

Signed-off-by: Damien Hedde <damien.hedde@greensocs.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220427090117.6954-1-damien.hedde@greensocs.com
[PMM: fixed commit message typos]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target/arm/cpu.c