Re: [PATCH 0/2] target/riscv: Fix seed CSR sign extension

Michael Tokarev <[email protected]>
Newsgroups org.nongnu.qemu-riscv,org.nongnu.qemu-devel
Message-ID <[email protected]>
On 8/2/26 14:31, Ivan Efremov wrote:
> The seed CSR value on RV64 was sign extended while converting to target_ulong.
> 
> The first patch makes SEED_OPST_* unsigned.
> The second patch adds qtest to check that upper 32 bits are zero.
> 
> Tests ran:
> - riscv-csr-test
> - make check: 324 passed, 11 skipped
> - RISC-V Zkr-00 architectural test
> 
> Ivan Efremov (2):
>    target/riscv: Fix seed CSR sign extension
>    tests/qtest: Add seed CSR zero extension test

I'm picking this patch set for the currently active qemu stable
series (10.0 LTS, 11.0, 11.1).  However, it does not work on
11.0.x already (it works ok on 11.1.x), the test fails:

TAP version 14
# random seed: R02Sac6635c76a7dc335fadd70845da72f99
1..2
# Start of riscv64 tests
# Start of cpu tests
# starting QEMU: exec ./qemu-system-riscv64 -qtest unix:/tmp/qtest-182934.sock -qtest-log /dev/null -chardev 
socket,path=/tmp/qtest-182934.qmp,id=char0 -mon chardev=char0,mode=control -display none -audio none -run-with exit-with-parent=on -machine virt -cpu 
veyron-v1 -accel qtest
ok 1 /riscv64/cpu/csr
# Start of csr tests
# starting QEMU: exec ./qemu-system-riscv64 -qtest unix:/tmp/qtest-182934.sock -qtest-log /dev/null -chardev 
socket,path=/tmp/qtest-182934.qmp,id=char0 -mon chardev=char0,mode=control -display none -audio none -run-with exit-with-parent=on -machine virt -cpu 
tt-ascalon -accel qtest
**
ERROR:../../build/qemu/11.0/hw/riscv/riscv_hart.c:78:csr_call: assertion failed: (ret == RISCV_EXCP_NONE)
Bail out! ERROR:../../build/qemu/11.0/hw/riscv/riscv_hart.c:78:csr_call: assertion failed: (ret == RISCV_EXCP_NONE)
Broken pipe
../../build/qemu/11.0/tests/qtest/libqtest.c:210: kill_qemu() detected QEMU death from signal 6 (Aborted)
Aborted

Should I pick something else for 11.0 and 10.0 (on 10.0 it fails the same way),
so the test succeeds, or should I drop this patch set from 11.1.x?

Thanks,

/mjt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.