[Bug 1996285] Re: [SRU] riscv64 images fail to boot with libvirt and u-boot-qemu in 22.10

Heinrich Schuchardt 1996285 at bugs.launchpad.net
Mon Nov 28 14:34:04 UTC 2022


** Tags removed: verification-needed verification-needed-kinetic
** Tags added: verification-done verification-done-kinetic

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

Title:
  [SRU] riscv64 images fail to boot with libvirt and u-boot-qemu in
  22.10

Status in libvirt package in Ubuntu:
  Invalid
Status in u-boot package in Ubuntu:
  Fix Released
Status in u-boot source package in Kinetic:
  Fix Committed

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://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
  <?xml version="1.0"?>
  <domain type="qemu">
    <name>ubuntu22.10-riscv64</name>
    <os>
      <type arch="riscv64" machine="virt">hvm</type>
      <kernel>/usr/lib/u-boot/qemu-riscv64_smode/uboot.elf</kernel>
    </os>
    <memory unit="GiB">2</memory>
    <vcpu placement="static">4</vcpu>
    <devices>
      <emulator>usr/bin/qemu-system-riscv64</emulator>
      <disk type="file" device="disk" cache="none">
        <driver name="qemu" type="raw"/>
        <source file="/var/lib/libvirt/images/ubuntu-22.10-live-server-riscv64.img"/>
        <target dev="sda" bus="scsi"/>
      </disk>
      <controller type="scsi" model="virtio-scsi"/>
      <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. 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

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




More information about the foundations-bugs mailing list