Am 8. April 2025 20:31:58 UTC schrieb Guenter Roeck <li...@roeck-us.net>:
>On 4/8/25 12:57, Bernhard Beschow wrote:
>> 
>> 
>> Am 8. April 2025 16:09:58 UTC schrieb Guenter Roeck <li...@roeck-us.net>:
>>> On 4/6/25 11:08, Bernhard Beschow wrote:
>>> [ .. ]
>>> 
>>>>>> Yeah, it works with Buildroot as described in the handbook. When I 
>>>>>> append `-netdev user,id=net0 -device virtio-net-pci,netdev=net0` on the 
>>>>>> cli I can `wget http://www.google.com` successfully. When I omit it 
>>>>>> there is no network connectivity. This is with a 6.6.23 vendor kernel.
>>>>>> 
>>>>> 
>>>>> I had no luck with virtio-net-pci. virtio-pci works for me, but I can not 
>>>>> get real PCI devices
>>>>> (such as nvme or scsi adapters) to work.
>>>> 
>>>> I now tested with the latest Buildroot recipe, changing to upstream kernel 
>>>> version 6.14 and using the defconfig. The `wget` command still works for 
>>>> me with virtio-net-pci. However, I can confirm that I need your xhci 
>>>> patches for the usb storage device to be detected.
>>>> 
>>> 
>>> Following up on this, my problem is that adding "-netdev user,id=net0 
>>> -device virtio-net-pci,netdev=net0"
>>> to the command line adds a _second_ Ethernet interface, in addition to the 
>>> default one.
>>> This results in
>>>     qemu-system-arm: warning: nic imx.enet.0 has no peer
>>> reported when qemu starts.
>> 
>> I get this too when using virtio-net-pci successfully.
>> 
>>> 
>>> I can not get that second interface to work, probably because of some 
>>> userspace issue.
>>> 
>>> Anyway, I never see any interrupts on the virtual PCI interface. From 
>>> /proc/interrupts:
>>> 
>>> 277:          0  PCI-MSI 524288 Edge      virtio0-config
>>> 278:          0  PCI-MSI 524289 Edge      virtio0-input.0
>>> 279:          0  PCI-MSI 524290 Edge      virtio0-output.0
>> 
>> I get:
>> 
>> 206:          0          0          0          0  PCI-MSI 524288 Edge      
>> virtio0-config
>> 207:          3          0          0          0  PCI-MSI 524289 Edge      
>> virtio0-input.0
>> 208:          8          0          0          0  PCI-MSI 524290 Edge      
>> virtio0-output.0
>> 
>> Note that I'm using four CPUs, i.e. `-smp 4`.
>> 
>
>I must be missing something. Can you send me your complete qemu command line ?
>I'll also try building a buildroot image to see where it gets me.

Will send you tomorrow.

>
>>> 
>>> That may work for virtio-net-pci, but it doesn't work for other PCI(e) 
>>> drivers.
>>> If I try to attach any other PCIe devices, the device is reported with 
>>> lspci but
>>> then its initialization times out because it does not get any interrupts.
>> 
>> Indeed, trying with e1000e:
>> 
>> 205:          0          0          0          0  PCI-MSI   0 Edge      PCIe 
>> PME
>> 206:         74          0          0          0  PCI-MSI 524288 Edge      
>> eth1-rx-0
>> 207:         20          0          0          0  PCI-MSI 524289 Edge      
>> eth1-tx-0
>> 208:         32          0          0          0  PCI-MSI 524290 Edge      
>> eth1
>> 
>> But I get this repeatedly with varying CPUs:
>> 
>> [   14.657163] e1000e 0000:01:00.0 eth1: NIC Link is Up 1000 Mbps Full 
>> Duplex, Flow Control: Rx/Tx
>> [   19.980452] e1000e 0000:01:00.0 eth1: NETDEV WATCHDOG: CPU: 0: transmit 
>> queue 0 timed out 5312 ms
>> [   19.982491] e1000e 0000:01:00.0 eth1: Reset adapter unexpectedly
>> 
>>> 
>>> Tt turns out that sabrelite has the same problem.
>> 
>> Did it work with QEMU 9.2?
>> 
>
>No, the pcie interfaces on sabrelite don't instantiate for me with qemu 9.2 
>(9.2.3,
>more specifically). I see the pcie root port, but nothing behind it.

You need to add `bus=dw-pcie` to the pci devices' options in QEMU 9.2.x and 
earler, otherwise it will end up on the wrong bus. This is fixed in master.

Best regards,
Bernhard

>
>Guenter
>

Reply via email to