Skip to content

assert in virtio-iommu

Host environment

  • Operating system: Ubuntu 22.04.4 LTS

  • OS/kernel version: Linux 6.5.0-25-generic

  • Architecture: aarch64

  • QEMU flavor: 9.0.0

  • QEMU version: commit 7e1c0047

  • QEMU command line:

    cat << EOF | \
    qemu-system-x86_64 \
    -display none -machine accel=qtest -m 512M -machine q35 -nodefaults \
    -device virtio-iommu -qtest stdio
    outl 0xcf8 0x80000804
    outw 0xcfc 0x06
    outl 0xcf8 0x80000820
    outl 0xcfc 0xe0004000
    write 0x10000e 0x1 0x01
    write 0xe0004020 0x4 0x00001000
    write 0xe0004028 0x4 0x00101000
    write 0xe000401c 0x1 0x01
    write 0x106000 0x1 0x05
    write 0x100001 0x1 0x60
    write 0x100002 0x1 0x10
    write 0x100009 0x1 0x04
    write 0x10000c 0x1 0x01
    write 0x100018 0x1 0x04
    write 0x10001c 0x1 0x02
    write 0x101003 0x1 0x01
    write 0xe0007001 0x1 0x00
    EOF

Description of problem

The following log reveals it:

qemu-system-x86_64: qemu/hw/virtio/virtio-iommu.c:821: void virtio_iommu_handle_command(VirtIODevice *, VirtQueue *): Assertion `sz == output_size' failed.
Aborted

Steps to reproduce

cat << EOF | \qemu-system-x86_64 \
-display none -machine accel=qtest -m 512M -machine q35 -nodefaults \
-device virtio-iommu -qtest stdio
outl 0xcf8 0x80000804
outw 0xcfc 0x06
outl 0xcf8 0x80000820
outl 0xcfc 0xe0004000
write 0x10000e 0x1 0x01
write 0xe0004020 0x4 0x00001000
write 0xe0004028 0x4 0x00101000
write 0xe000401c 0x1 0x01
write 0x106000 0x1 0x05
write 0x100001 0x1 0x60
write 0x100002 0x1 0x10
write 0x100009 0x1 0x04
write 0x10000c 0x1 0x01
write 0x100018 0x1 0x04
write 0x10001c 0x1 0x02
write 0x101003 0x1 0x01
write 0xe0007001 0x1 0x00
EOF
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information