[SRU] riscv64 images fail to boot with libvirt and u-boot-qemu in 22.10
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libvirt (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
u-boot (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Kinetic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[ Impact ]
U-Boot provides a driver for virtio PCIe devices. Due to a bug introduced in upstream U-Boot 2022.07 the enumeration of PCIe bars does not work correctly. This has lead to crashes when executing U-Boot's 'virtio scan' command.
An upstream patch fixing the issue is available. This patch only changes the virtio- PCIe driver.
[ Test Plan ]
1. Download the RISC-V server install image for 22.10: https:/
2. Decompress the file and save it to /var/lib/
3. Create a VM in libvirt with the following XML:
cat << EOF > riscv-guest.xml
<?xml version="1.0"?>
<domain type="qemu">
<name>
<os>
<type arch="riscv64" machine=
<kernel>
</os>
<memory unit="GiB"
<vcpu placement=
<devices>
<emulator>
<disk type="file" device="disk" cache="none">
<driver name="qemu" type="raw"/>
<source file="/
<target dev="sda" bus="scsi"/>
</disk>
<controller type="scsi" model="
<interface type="network">
<source network="default"/>
<target dev="vnet0"/>
</interface>
<console type="pty">
<target type="serial" port="0"/>
</console>
</devices>
</domain>
EOF
4. Define the VM with "virsh define riscv-guest.xml"
5. Start the VM with "virsh start ubuntu22.
6. Open the console with "virsh console ubuntu22.
7. Check if the image can be booted.
[ Where problems could occur ]
Only the virtio-pci driver is changed.
The impact is limited to the u-boot-qemu package.
In the worst case virtual machines using this driver would not boot.
[ Other Info ]
n/a
tags: | added: foundations-todo |
Changed in libvirt (Ubuntu): | |
assignee: | Heinrich Schuchardt (xypron) → nobody |
Changed in u-boot (Ubuntu): | |
status: | New → Confirmed |
summary: |
- riscv64 images fail to boot with libvirt and u-boot-qemu in 22.10 + [SRU] riscv64 images fail to boot with libvirt and u-boot-qemu in 22.10 |
Changed in libvirt (Ubuntu): | |
status: | Confirmed → Invalid |
description: | updated |
tags: |
added: verification-done verification-done-kinetic removed: verification-needed verification-needed-kinetic |
tags: | removed: foundations-todo |
Steps to reproduce:
1. Download the RISC-V server install image for 22.10: https:/ /cdimage. ubuntu. com/releases/ 22.10/release/ ubuntu- 22.10-live- server- riscv64. img.gz
2. Decompress the file and save it to /var/lib/ libvirt/ images/ ubuntu- 22.10-live- server- riscv64. img
3. Create a VM in libvirt with the following XML:
cat << EOF > riscv-guest.xml ubuntu22. 10-riscv64< /name> "virt"> hvm</type> /usr/lib/ u-boot/ qemu-riscv64_ smode/uboot. elf</kernel> >2</memory> "static" >4</vcpu> usr/bin/ qemu-system- riscv64< /emulator> var/lib/ libvirt/ images/ ubuntu- 22.10-live- server- riscv64. img"/> virtio- scsi"/>
<?xml version="1.0"?>
<domain type="qemu">
<name>
<os>
<type arch="riscv64" machine=
<kernel>
</os>
<memory unit="GiB"
<vcpu placement=
<devices>
<emulator>
<disk type="file" device="disk" cache="none">
<driver name="qemu" type="raw"/>
<source file="/
<target dev="sda" bus="scsi"/>
</disk>
<controller type="scsi" model="
<interface type="network">
<source network="default"/>
<target dev="vnet0"/>
</interface>
<console type="pty">
<target type="serial" port="0"/>
</console>
</devices>
</domain>
EOF
4. Define the VM with "virsh define riscv-guest.xml"
5. Start the VM with "virsh start ubuntu22. 10-riscv64"
6. Open the console with "virsh console ubuntu22. 10-riscv64"
7. You can now see how the VM constantly reboots with the error message reported in the bug. This also occurs with the preinstalled image from https:/ /cdimage. ubuntu. com/releases/ 22.10/release/ ubuntu- 22.10-preinstal led-server- riscv64+ unmatched. img.xz