Public bug reported:

[ Impact ]

 * Qemu 8.2.2 reports support for the riscv64 vector instruction, but fails to 
set the emulated vstart_eq_zero flag, which then causes illegal instruction 
crashes in certain cases.
 * Launchpad builders use the same Qemu package as noble, so fixing this in 
Noble will also be basis for fixing our riscv64 builds which use vector 
instructions.
 * This was reported upstream 
(https://gitlab.com/qemu-project/qemu/-/issues/1976) and fixed in 9.0, so 
please backport the fix linked in the issue.

[ Test Plan ]

 * I've attached some code which can reproduce the issue.
 * Reproduction requires running a riscv64 Noble image via Qemu system 
emulation on an amd64 host, as described in https://wiki.ubuntu.com/RISC-V/QEMU
 * Boot up the VM, transfer the necessary files over, `apt install 
build-essential unzip`, then unzip the reproduction files and compile & run the 
test (within the VM) with `make`.

[ Where problems could occur ]

 * All changes are restricted to target/riscv in the Qemu tree, so no changes 
are expected in other architectures. Furthermore, they should only affect 
vector instructions.
 * Possible problems range from build failures to riscv emulation failing 
completely, but the test above covers those cases.

[ Other Info ]

 * n/a

** Affects: qemu (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: qemu (Ubuntu Noble)
     Importance: Undecided
     Assignee: Gabriel B. Sant'Anna (baioc)
         Status: New

** Attachment added: "Minimal example to reproduce the issue"
   https://bugs.launchpad.net/bugs/2095169/+attachment/5852451/+files/repro.zip

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2095169

Title:
  [SRU] SIGILL on emulation of RISC-V Vector instructions

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/2095169/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to