mips, nvme/pci boot regression (commit 145e2198d749)
Hi Philippe,
Commit 145e2198d749 ("hw/mips/gt64xxx_pci: Endian-swap using PCI_HOST_BRIDGE MemoryRegionOps") broke my mips64 nvme boot test (little-endian host, mips64 and nvme boot device).
The pci device doesn't show up and the kernel panics.
qemu-system-mips64 \
-nodefaults -nographic -snapshot -no-reboot \
-M "malta" -cpu "I6400" -m 512M \
-nic user,model=pcnet \
-drive file=images/rootfs.ext2,format=raw,if=none,id=d0 \
-device nvme,serial=default,drive=d0 \
-kernel images/vmlinux \
-append "root=/dev/nvme0n1 console=ttyS0,115200" \
-serial stdioHi Klaus,
Quoted 8 lines · Klaus Jensen
Hi Philippe,
Commit
145e2198d749("hw/mips/gt64xxx_pci: Endian-swap usingPCI_HOST_BRIDGEMemoryRegionOps") broke my mips64 nvme boot test (little-endian host, mips64 and nvme boot device).The pci device doesn't show up and the kernel panics.
Quoted 9 lines
qemu-system-mips64 \
-nodefaults -nographic -snapshot -no-reboot \
-M "malta" -cpu "I6400" -m 512M \
-nic user,model=pcnet \
-drive file=images/rootfs.ext2,format=raw,if=none,id=d0 \
-device nvme,serial=default,drive=d0 \
-kernel images/vmlinux \
-append "root=/dev/nvme0n1 console=ttyS0,115200" \
-serial stdioHow do I get this images/ folder, or how do you generate the kernel / rootfs images?
Quoted 21 lines · Philippe Mathieu-Daudé
Hi Klaus,
Quoted 8 lines · Klaus Jensen
Hi Philippe,
Commit
145e2198d749("hw/mips/gt64xxx_pci: Endian-swap usingPCI_HOST_BRIDGEMemoryRegionOps") broke my mips64 nvme boot test (little-endian host, mips64 and nvme boot device).The pci device doesn't show up and the kernel panics.
Quoted 9 lines
qemu-system-mips64 \ -nodefaults -nographic -snapshot -no-reboot \ -M "malta" -cpu "I6400" -m 512M \ -nic user,model=pcnet \ -drive file=images/rootfs.ext2,format=raw,if=none,id=d0 \ -device nvme,serial=default,drive=d0 \ -kernel images/vmlinux \ -append "root=/dev/nvme0n1 console=ttyS0,115200" \ -serial stdio
Quoted 2 lines
How do I get this images/ folder, or how do you generate the kernel / rootfs images?
It's a buildroot with the qemu_mips64r6_malta_defconfig. However, the kernel must be at least v6.2-rc3 and a potential fix for pin-based interrupts[1] (other fixes are being discussed) must be applied. On older kernels the device should show up, but it will be broken (issue on big-endian with shadow doorbells and occasional timeouts due to the kernel missing interrupts).
If you don't want to mess with that, I put the images on github[2] (the kernel is v6.2-rc4 + my potential nvme driver fix). Just gunzip rootfs.ext2.gz.
[1]: https://lore.kernel.org/linux-nvme/[email protected]/
[2]: https://github.com/birkelund/qemu-nvme-boot
Quoted 29 lines · Klaus Jensen
Quoted 18 lines · Philippe Mathieu-Daudé
Quoted 7 lines · Klaus Jensen
Commit
145e2198d749("hw/mips/gt64xxx_pci: Endian-swap usingPCI_HOST_BRIDGEMemoryRegionOps") broke my mips64 nvme boot test (little-endian host, mips64 and nvme boot device).The pci device doesn't show up and the kernel panics.
Quoted 9 lines
qemu-system-mips64 \ -nodefaults -nographic -snapshot -no-reboot \ -M "malta" -cpu "I6400" -m 512M \ -nic user,model=pcnet \ -drive file=images/rootfs.ext2,format=raw,if=none,id=d0 \ -device nvme,serial=default,drive=d0 \ -kernel images/vmlinux \ -append "root=/dev/nvme0n1 console=ttyS0,115200" \ -serial stdioQuoted 2 lines
How do I get this images/ folder, or how do you generate the kernel / rootfs images?
It's a buildroot with the
qemu_mips64r6_malta_defconfig. However, the kernel must be at least v6.2-rc3 and a potential fix for pin-based interrupts[1] (other fixes are being discussed) must be applied. On older kernels the device should show up, but it will be broken (issue on big-endian with shadow doorbells and occasional timeouts due to the kernel missing interrupts).
Quoted 6 lines
If you don't want to mess with that, I put the images on github[2] (the kernel is v6.2-rc4 + my potential nvme driver fix). Just gunzip rootfs.ext2.gz.
[1]: https://lore.kernel.org/linux-nvme/[email protected]/ [2]: https://github.com/birkelund/qemu-nvme-boot
Thanks Klauss, proposed fix posted:
https://lore.kernel.org/qemu-devel/[email protected]/