Skip to content

RISC-V: Executing floating point instruction in VS mode under KVM acceleration leads to crash

Host environment

  • Operating system: Ubuntu 24.10
  • OS/kernel version: 6.11-rc7
  • Architecture: riscv64
  • QEMU flavor: qemu-system-riscv64
  • QEMU version: 9.0.2+ds-4ubuntu5
  • QEMU command line:
    • outer VM

      qemu-system-riscv64 \
      -machine virt -nographic -m 4096 -smp 4 \
      -bios /usr/lib/riscv64-linux-gnu/opensbi/generic/fw_jump.bin \
      -kernel /usr/lib/u-boot/qemu-riscv64_smode/uboot.elf \
      -device virtio-net-device,netdev=eth0 -netdev user,id=eth0 \
      -device virtio-rng-pci \
      -drive file=ubuntu-24.04-preinstalled-server-riscv64.img,format=raw,if=virtio
    • inner VM

      qemu-system-riscv64 \
      -machine virt -nographic -m 2048 -smp 4 -accel kvm \
      -kernel payload.bin

Emulated/Virtualized environment

Description of problem

Executing fcvt.d.w fa5,a5 in VS mode leads to crash.

Steps to reproduce

  1. Download the Ubuntu 24.10 image https://cdimage.ubuntu.com/ubuntu-server/daily-preinstalled/current/oracular-preinstalled-server-riscv64.img.xz
  2. On your amd64 system launch a VM using -accel tcg
  3. Inside the VM launch a new VM using -accel kvm with the payload mentioned above

Additional information

For more details see https://bugs.launchpad.net/ubuntu/+source/edk2/+bug/2077731

Edited by Heinrich Schuchardt
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information