Hi Peter,

I had tested Richard's proper fix but we didn't have a PR or the required
Reviewed-by and Signed-off-by so I made the PR for the conservative fix,
assuming we can test Richard's more correct fix and include it in the QEMU
2.13 timeframe. I've tested Richard's fix with the simple scheduling test
case, so if he makes a PR, I'm happy for that to be included versus this
workaround. The workaround is, of course, the most conservative fix as it
will always cause FP state to be saved, assuming we missed a case in
Richard's patch.

I'll leave it up to you and Richard, but please include either this
workaround or Richard's slightly larger change in QEMU 2.12, if possible.
In any case, I believe vendors have patches they can include in their
packages... but it would be nice that upstream QEMU 2.12 has working FP for
RISC-V with SMP Linux.

Thanks,
Michael.



On Thu, Mar 29, 2018 at 10:26 AM, Michael Clark <m...@sifive.com> wrote:

> The following changes since commit 47d3b60858d90ac8a0cc3a72af7f95
> c96781125a:
>
>   Merge remote-tracking branch 
> 'remotes/riscv/tags/riscv-qemu-2.12-important-fixes'
> into staging (2018-03-28 22:13:38 +0100)
>
> are available in the git repository at:
>
>   https://github.com/riscv/riscv-qemu.git tags/riscv-qemu-2.12-critical-
> fixes
>
> for you to fetch changes up to b02403363f1056421d120c8e974fdf9c76a84f95:
>
>   RISC-V: Workaround for critical mstatus.FS bug (2018-03-29 10:22:26
> -0700)
>
> ----------------------------------------------------------------
> RISC-V: Critical fixes for QEMU 2.12
>
> This series includes changes that are considered release critical,
> such as floating point register file corruption under SMP Linux
> due to incorrect handling of mstatus.FS.
>
> This workaround will be replaced with a more comprehensive fix
> for mstatus.FS handling in QEMU 2.13.
>
> ----------------------------------------------------------------
> Michael Clark (1):
>       RISC-V: Workaround for critical mstatus.FS bug
>
>  target/riscv/op_helper.c | 17 +++++++++++++++--
>  1 file changed, 15 insertions(+), 2 deletions(-)
>

Reply via email to