qemu-s390x
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [qemu-s390x] [PATCH] s390x/tcg: always enable AFP for linux-user


From: Alex Bennée
Subject: Re: [qemu-s390x] [PATCH] s390x/tcg: always enable AFP for linux-user
Date: Mon, 08 Oct 2018 17:11:30 +0100
User-agent: mu4e 1.1.0; emacs 26.1.50

David Hildenbrand <address@hidden> writes:

> 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 <address@hidden>
> Cc: Alex Bennée <address@hidden>
> Fixes: db0504154e ("s390x/tcg: check for AFP-register, BFP and DFP data 
> exceptions")
> Reported-by: Alex Bennée <address@hidden>
> Signed-off-by: David Hildenbrand <address@hidden>
> ---
>  target/s390x/cpu.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> 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
> +

Reviewed-by: Alex Bennée <address@hidden>
Tested-by: Alex Bennée <address@hidden>


>      /* architectured initial value for Breaking-Event-Address register */
>      env->gbea = 1;


--
Alex Bennée



reply via email to

[Prev in Thread] Current Thread [Next in Thread]