qemu-patch-raspberry4/target
ShihPo Hung 613fa160e1
target/riscv: Fix tb->flags FS status
It was found that running libquantum on riscv-linux qemu produced an
incorrect result. After investigation, FP registers are not saved
during context switch due to incorrect mstatus.FS.

In current implementation tb->flags merges all non-disabled state to
dirty. This means the code in mark_fs_dirty in translate.c that
handles initial and clean states is unreachable.

This patch fixes it and is successfully tested with:
  libquantum

Thanks to Richard for pointing out the actual bug.

v3: remove the redundant condition
v2: root cause FS problem

Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: ShihPo Hung <shihpo.hung@sifive.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
2020-01-16 10:02:58 -08:00
..
alpha target/alpha: fetch code with translator_ld 2019-10-28 15:12:38 +00:00
arm Fix some uninitialized variable warnings, 2020-01-13 09:50:48 +00:00
cris cris: improve passing PIC interrupt vector to the CPU 2020-01-07 17:24:29 +04:00
hppa target/hppa: fetch code with translator_ld 2019-10-28 15:12:38 +00:00
i386 target/i386: Add missed features to Cooperlake CPU model 2020-01-07 14:31:03 +01:00
lm32 qemu_log_lock/unlock now preserves the qemu_logfile handle. 2019-12-18 20:18:02 +00:00
m68k target/m68k: only change valid bits in CACR 2020-01-07 14:21:18 +01:00
microblaze qemu_log_lock/unlock now preserves the qemu_logfile handle. 2019-12-18 20:18:02 +00:00
mips kvm: introduce kvm_kernel_irqchip_* functions 2019-12-17 19:32:45 +01:00
moxie hw/core: Move cpu.c, cpu.h from qom/ to hw/core/ 2019-08-21 13:24:01 +02:00
nios2 qemu_log_lock/unlock now preserves the qemu_logfile handle. 2019-12-18 20:18:02 +00:00
openrisc target/openrisc: fetch code with translator_ld 2019-10-28 15:12:38 +00:00
ppc ppc/spapr: Don't call KVM_SVM_OFF ioctl on TCG 2020-01-08 11:01:59 +11:00
riscv target/riscv: Fix tb->flags FS status 2020-01-16 10:02:58 -08:00
s390x More s390x patches: 2019-12-20 16:37:07 +00:00
sh4 target/sh4: fetch code with translator_ld 2019-10-28 15:12:38 +00:00
sparc leon3: use qdev gpio facilities for the PIL 2020-01-07 17:24:29 +04:00
tilegx qemu_log_lock/unlock now preserves the qemu_logfile handle. 2019-12-18 20:18:02 +00:00
tricore tcg: TCGMemOp is now accelerator independent MemOp 2019-09-03 08:30:38 -07:00
unicore32 qemu_log_lock/unlock now preserves the qemu_logfile handle. 2019-12-18 20:18:02 +00:00
xtensa target/xtensa: use MPU background map from core configuration 2020-01-06 11:46:16 -08:00