qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* mips, nvme/pci boot regression (commit 145e2198d749)
@ 2023-01-17 12:30 Klaus Jensen
  2023-01-17 14:25 ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 4+ messages in thread
From: Klaus Jensen @ 2023-01-17 12:30 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 593 bytes --]

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 stdio

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: mips, nvme/pci boot regression (commit 145e2198d749)
  2023-01-17 12:30 mips, nvme/pci boot regression (commit 145e2198d749) Klaus Jensen
@ 2023-01-17 14:25 ` Philippe Mathieu-Daudé
  2023-01-18  7:24   ` Klaus Jensen
  0 siblings, 1 reply; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-01-17 14:25 UTC (permalink / raw)
  To: Klaus Jensen; +Cc: qemu-devel

Hi Klaus,

On 17/1/23 13:30, Klaus Jensen wrote:
> 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 stdio

How do I get this images/ folder, or how do you generate
the kernel / rootfs images?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: mips, nvme/pci boot regression (commit 145e2198d749)
  2023-01-17 14:25 ` Philippe Mathieu-Daudé
@ 2023-01-18  7:24   ` Klaus Jensen
  2023-01-18  9:42     ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 4+ messages in thread
From: Klaus Jensen @ 2023-01-18  7:24 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1559 bytes --]

On Jan 17 15:25, Philippe Mathieu-Daudé wrote:
> Hi Klaus,
> 
> On 17/1/23 13:30, Klaus Jensen wrote:
> > 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 stdio
> 
> 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/Y8W+H6T9DOZ08SoF@cormorant.local/
  [2]: https://github.com/birkelund/qemu-nvme-boot

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: mips, nvme/pci boot regression (commit 145e2198d749)
  2023-01-18  7:24   ` Klaus Jensen
@ 2023-01-18  9:42     ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-01-18  9:42 UTC (permalink / raw)
  To: Klaus Jensen; +Cc: qemu-devel

On 18/1/23 08:24, Klaus Jensen wrote:
> On Jan 17 15:25, Philippe Mathieu-Daudé wrote:
>> On 17/1/23 13:30, Klaus Jensen wrote:
>>>
>>> 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 stdio
>>
>> 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/Y8W+H6T9DOZ08SoF@cormorant.local/
>    [2]: https://github.com/birkelund/qemu-nvme-boot

Thanks Klauss, proposed fix posted:
https://lore.kernel.org/qemu-devel/20230118094023.49517-1-philmd@linaro.org/



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-01-18  9:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-17 12:30 mips, nvme/pci boot regression (commit 145e2198d749) Klaus Jensen
2023-01-17 14:25 ` Philippe Mathieu-Daudé
2023-01-18  7:24   ` Klaus Jensen
2023-01-18  9:42     ` Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).