diff options
author | David Hildenbrand | 2018-10-08 17:32:04 +0200 |
---|---|---|
committer | Peter Maydell | 2018-10-09 11:34:01 +0200 |
commit | 53a19a9a5f9811a911e9b69ef36afb0d66b5d85c (patch) | |
tree | ad69a38d11df305fef985f3d800a292b34b15dd1 | |
parent | Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20181008'... (diff) | |
download | qemu-53a19a9a5f9811a911e9b69ef36afb0d66b5d85c.tar.gz qemu-53a19a9a5f9811a911e9b69ef36afb0d66b5d85c.tar.xz qemu-53a19a9a5f9811a911e9b69ef36afb0d66b5d85c.zip |
s390x/tcg: always enable AFP for linux-user
linux-user should always enable AFP, otherwise our emulated binary
might crash once it tries to make use of additional floating-point
registers or instructions.
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Alex Bennée <alex.bennee@linaro.org>
Fixes: db0504154e ("s390x/tcg: check for AFP-register, BFP and DFP data exceptions")
Reported-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Tested-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | target/s390x/cpu.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 8ed4823d6e..18ba7f85a5 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -145,6 +145,11 @@ static void s390_cpu_full_reset(CPUState *s) env->cregs[0] = CR0_RESET; env->cregs[14] = CR14_RESET; +#if defined(CONFIG_USER_ONLY) + /* user mode should always be allowed to use the full FPU */ + env->cregs[0] |= CR0_AFP; +#endif + /* architectured initial value for Breaking-Event-Address register */ env->gbea = 1; |