PAE + virtio = probe error?

From: Xi Ruoyao
Date: Thu Mar 09 2023 - 09:52:51 EST


Hello,

I'm using a QEMU VM for testing things on 32-bit x86. Today I updated
the VM to use Linux kernel 6.2.2, and a strange issue happened: both
virtio block driver and virtio network driver fail to probe with errors
like:

[ 0.950474] virtio_blk virtio1: virtio: device uses modern interface but does not have VIRTIO_F_VERSION_1
[ 0.951669] virtio_blk: probe of virtio1 failed with error -22

I spent some time debugging the issue, and it turned out if I disable
CONFIG_X86_PAE, the virtio drivers would function normally. But then I
can only use 4GB RAM in the VM.

Is this a bug or I'm doing something wrong? The command to start the VM
is:

qemu -enable-kvm \
-smp 8 \
-cpu host \
-m 16G \
-drive file=disk.img,if=virtio \
-boot menu=on \
-net nic,netdev=net0,model=virtio-net-pci \
-netdev user,id=net0 \
-device ac97 \
-vga std \
-serial mon:stdio \
-name "32_bit_x86" \
-pflash /usr/share/qemu/edk2-x86_64-code.fd

--
Xi Ruoyao <xry111@xxxxxxxxxxx>
School of Aerospace Science and Technology, Xidian University