/usr/lib/u-boot/qemu-riscv64_smode/uboot.elf cannot be booted with KVM

Bug #1980594 reported by Heinrich Schuchardt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
In Progress
Undecided
Emil Renner Berthing
Jammy
In Progress
Undecided
Unassigned
linux-allwinner-5.17 (Ubuntu)
In Progress
Undecided
Emil Renner Berthing
Jammy
Fix Released
Undecided
Unassigned
linux-riscv (Ubuntu)
Invalid
Undecided
Emil Renner Berthing
Jammy
Invalid
Undecided
Unassigned
linux-starfive-5.17 (Ubuntu)
In Progress
Undecided
Emil Renner Berthing
Jammy
Fix Released
Undecided
Unassigned

Bug Description

QEMU 7.0 supports KVM on RISC-V.
Package u-boot-qemu supplies /usr/lib/u-boot/qemu-riscv64_smode/uboot.elf.

That binary cannot be used to boot via qemu-system-riscv64 -kvm.

File u-boot produced by qemu-riscv64_smode_defconfig with

CONFIG_MTD_NOR_FLASH=n
CONFIG_CMD_NET=n

can be used to start U-Boot with qemu-system-riscv64 -kvm. But any virtio access leads to a crash leaving QEMU unresponsive.

Cf. https://lists.denx.de/pipermail/u-boot/2022-July/487893.html
---
ProblemType: Bug
AlsaDevices:
 total 0
 crw-rw---- 1 root audio 116, 1 Jul 10 19:58 seq
 crw-rw---- 1 root audio 116, 33 Jul 10 19:58 timer
AplayDevices: Error: [Errno 2] No such file or directory: 'aplay'
ApportVersion: 2.22.0-0ubuntu4
Architecture: riscv64
ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord'
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
CRDA: N/A
CasperMD5CheckResult: unknown
DistroRelease: Ubuntu 22.10
IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig'
Lspci-vt:
 -[0000:00]-+-00.0 Red Hat, Inc. QEMU PCIe Host bridge
            +-01.0 Red Hat, Inc. QEMU XHCI Host Controller
            +-02.0 Red Hat, Inc. Virtio block device
            \-03.0 Red Hat, Inc. Virtio block device
Lsusb:
 Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
 Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd QEMU USB Keyboard
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Lsusb-t:
 /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
 /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
     |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 480M
Package: linux-starfive-5.17 (not installed)
PciMultimedia:

ProcCpuinfoMinimal:
 processor : 7
 hart : 7
 isa : rv64imafdcsuh
 mmu : sv48
ProcFB:

ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.17.0-1003-starfive root=UUID=504657a8-56e8-431b-9c85-65c5737ccf80 ro default_hugepagesz=2M hugepagesz=2M hugepages=2048 earlycon efi=debug
ProcVersionSignature: Ubuntu 5.17.0-1003.4-starfive 5.17.9
RelatedPackageVersions:
 linux-restricted-modules-5.17.0-1003-starfive N/A
 linux-backports-modules-5.17.0-1003-starfive N/A
 linux-firmware 20220621.git7b71b75b-0ubuntu1
RfKill: Error: [Errno 2] No such file or directory: 'rfkill'
Tags: kinetic uec-images
Uname: Linux 5.17.0-1003-starfive riscv64
UnreportableReason: This report is about a package that is not installed.
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: N/A
_MarkForUpload: False
acpidump:

tags: added: fr-2521
Revision history for this message
Heinrich Schuchardt (xypron) wrote :

See thread
U-Boot S-mode payload does not boot with a multicore configuration in RISC-V QEMU/KVM
https://lore.kernel<email address hidden>/

Revision history for this message
Heinrich Schuchardt (xypron) wrote :

[PATCH] RISC-V: KVM: Fix SRCU deadlock caused by kvm_riscv_check_vcpu_requests()
https://<email address hidden>/ resolves the issue at least on v5.19-rc6.

affects: u-boot (Ubuntu) → linux (Ubuntu)
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1980594

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Heinrich Schuchardt (xypron) wrote : CurrentDmesg.txt

apport information

tags: added: apport-collected kinetic uec-images
description: updated
Revision history for this message
Heinrich Schuchardt (xypron) wrote : Lspci.txt

apport information

Revision history for this message
Heinrich Schuchardt (xypron) wrote : Lsusb-v.txt

apport information

Revision history for this message
Heinrich Schuchardt (xypron) wrote : ProcEnviron.txt

apport information

Revision history for this message
Heinrich Schuchardt (xypron) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Heinrich Schuchardt (xypron) wrote : ProcModules.txt

apport information

Revision history for this message
Heinrich Schuchardt (xypron) wrote : UdevDb.txt

apport information

Revision history for this message
Heinrich Schuchardt (xypron) wrote : WifiSyslog.txt

apport information

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Changed in linux-starfive-5.17 (Ubuntu):
status: New → Confirmed
Revision history for this message
Heinrich Schuchardt (xypron) wrote :

The patch be82abe6a76b ("RISC-V: KVM: Fix SRCU deadlock caused by kvm_riscv_check_vcpu_requests()") is contained in Linux v5.19-rc7.

Changed in linux (Ubuntu):
assignee: nobody → Emil Renner Berthing (esmil)
Changed in linux-starfive-5.17 (Ubuntu):
assignee: nobody → Emil Renner Berthing (esmil)
status: Confirmed → In Progress
Changed in linux (Ubuntu):
status: Confirmed → In Progress
Changed in linux-riscv (Ubuntu):
status: New → Invalid
assignee: nobody → Emil Renner Berthing (esmil)
Changed in linux-allwinner-5.17 (Ubuntu):
assignee: nobody → Emil Renner Berthing (esmil)
status: New → In Progress
Changed in linux (Ubuntu Jammy):
status: New → In Progress
Changed in linux-allwinner-5.17 (Ubuntu Jammy):
status: New → In Progress
Changed in linux-riscv (Ubuntu Jammy):
status: New → In Progress
Changed in linux-starfive-5.17 (Ubuntu Jammy):
status: New → In Progress
Changed in linux-riscv (Ubuntu Jammy):
status: In Progress → Invalid
Changed in linux-starfive-5.17 (Ubuntu Jammy):
status: In Progress → Fix Committed
Changed in linux-allwinner-5.17 (Ubuntu Jammy):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux-starfive-5.17 - 5.17.0-1005.6

---------------
linux-starfive-5.17 (5.17.0-1005.6) jammy; urgency=medium

  * jammy/linux-starfive-5.17: 5.17.0-1005.6 -proposed tracker (LP: #1983089)

  * Pinctrl driver has a race condition bug (LP: #1983019)
    - pinctrl: starfive: Serialize adding groups and functions

  * /usr/lib/u-boot/qemu-riscv64_smode/uboot.elf cannot be booted with KVM
    (LP: #1980594)
    - RISC-V: KVM: Fix SRCU deadlock caused by kvm_riscv_check_vcpu_requests()

 -- Emil Renner Berthing <email address hidden> Fri, 29 Jul 2022 15:02:57 +0200

Changed in linux-starfive-5.17 (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux-allwinner-5.17 - 5.17.0-1005.5

---------------
linux-allwinner-5.17 (5.17.0-1005.5) jammy; urgency=medium

  * jammy/linux-allwinner-5.17: 5.17.0-1005.5 -proposed tracker (LP: #1983904)

  * Packaging resync (LP: #1786013)
    - debian/dkms-versions -- update from kernel-versions (main/2022.08.08)

  * GPIO character device v1 API not enabled in kernel (LP: #1953613)
    - [Config] Enable CONFIG_GPIO_CDEV_V1

  * /usr/lib/u-boot/qemu-riscv64_smode/uboot.elf cannot be booted with KVM
    (LP: #1980594)
    - RISC-V: KVM: Fix SRCU deadlock caused by kvm_riscv_check_vcpu_requests()

  [ Ubuntu: 5.17.0-8.8~22.04.8 ]

  * jammy/linux-hwe-5.17: 5.17.0-8.8~22.04.8 -proposed tracker (LP: #1983907)
  * Packaging resync (LP: #1786013)
    - debian/dkms-versions -- update from kernel-versions (main/2022.08.08)
  * GPIO character device v1 API not enabled in kernel (LP: #1953613)
    - [Config] Enable CONFIG_GPIO_CDEV_V1
  * refactoring of overlayfs fix to properly support shiftfs (LP: #1983640)
    - SAUCE: for aufs mmap: print the virtual file path
    - SAUCE: overlayfs: fix incorrect mnt_id of files opened from map_files
  * Audio mute key (f5) LED and Mic mute key (f8) LED are no function on HP
    440/450/640/650 G9 (LP: #1982716)
    - ALSA: hda/realtek: fix mute/micmute LEDs for HP machines

 -- Emil Renner Berthing <email address hidden> Fri, 19 Aug 2022 13:26:23 +0200

Changed in linux-allwinner-5.17 (Ubuntu Jammy):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.