On 03/28/2018 08:42 AM, Michael Clark wrote:
> This change is a workaround for a bug where mstatus.FS
> is not correctly reporting dirty after operations that
> modify floating point registers. This a critical bug
> or RISC-V in QEMU as it results in floating point
> register file corruption when running SMP Linux due to
> task migration and possibly uniprocessor Linux if
> more than one process is using the FPU.
> 
> This workaround will return dirty if mstatus.FS is
> switched from off to initial or clean. According to
> the specification it is legal for an implementation
> to return only off, or dirty.
> 
> Cc: Palmer Dabbelt <pal...@sifive.com>
> Cc: Sagar Karandikar <sag...@eecs.berkeley.edu>
> Cc: Bastian Koppelmann <kbast...@mail.uni-paderborn.de>
> Cc: Peter Maydell <peter.mayd...@linaro.org>
> Cc: Alex Bennée <alex.ben...@linaro.org>
> Cc: Richard Henderson <richard.hender...@linaro.org>
> Cc: Philippe Mathieu-Daudé <f4...@amsat.org>
> Tested-by: Richard W.M. Jones <rjo...@redhat.com>
> Signed-off-by: Michael Clark <m...@sifive.com>
> ---
>  target/riscv/op_helper.c | 17 +++++++++++++++--
>  1 file changed, 15 insertions(+), 2 deletions(-)

In case the more extensive fix waits until 2.13,

Reviewed-by: Richard Henderson <richard.hender...@linaro.org>


r~

Reply via email to