Hi Mohamed,

Am 06.11.24 um 11:55 schrieb Mohamed Dawod:

Hi,
I was trying the *vm-basic-pci* demo from l4Re version 24.08.0.
The demo works and I could boot the Linux VM and login successfully, but I need to test the passed PCI bus to make sure that it works.

I'm trying to test it using a *virtio-blk-pci* device from qemu which is expected to be mounted as a block device in */dev/vda*. but when I found no */dev/vda* file in the filesystem.

Please find attached :
* my ned scripts : vm-basic-pci.log
* arm-virt64.io <http://arm-virt64.io>
* the dts file : virt-basic_virt-64_pci.dts
* and the full logs : vm-basic-pci.log

I had a look at your files:

QEMU:
"-device virtio-blk-pci,drive=disk0"
This creates and virtio device of a specification predating version 1.0. I can't tell if this is working or not with L4Re. As I wrote in on of my last E-Mails, you need to add `disable-legacy=on,disable-modern=off` to all QEMU virtio device.
--> -device virtio-blk-pci,disable-legacy=on,disable-modern=off,drive=disk0

To check that this creates indeed a modern virtio device, have a look at the PCI Vendor ID and PCI Device ID that uvmm prints on boot (from you log): > vm(1) | VMM[PCI hbr]: Found PCI device: name='pci_bus[1]', vendor/device=1af4:1000
The device ID must be above 0x1040 for a modern device.

Linux cmdline:
log:
> vm(1)   | Command line: onsole=earlyprintk=1 root=/dev/vda rw console=hvc0 
debug

ned script:
> "-console=earlyprintk=1 root=/dev/vda rw console=hvc0 debug");
-c is the uvmm command and everything afterwards goes to linux. So this must be
-cconsole=...

earlyprintk only works with the UART and not with the virtio-console, simply because linux loads the virtio-console driver only late in the boot process. The UART node for the device tree is in uvmm/configs/dts/vmm-devices-arm.dtsi (PL011). You might need to add `status = "disabled";` to the virtio_uart node in your virt-arm_virt-64-pci.dts to avoid conflicts. Then `console=ttyS0 earlyprintk=serial,ttyS0` should print the linux boot log as soon as the guest starts. Without the earlyprintk output we can't determine if linux detected the PCI storage device.

As alternative to earlyprintk, you can boot from a ramdisk (root=/dev/ram0) and then look at lspci and dmesg output.


io config:
To make it to tell the devices apart, you can split this line into three:
>  pci_bus = wrap(hw:match("PCI/network", "PCI/storage", "PCI/media"));
to
> pci_net = wrap(hw:match("PCI/network"));
> pci_storage = wrap(hw:match("PCI/storage"));
> ...
These names - pci_net, pci_storage, .. - will then appear in the uvmm output and you don't have to tell from the PCI vendor ID & device ID what kind of device you're actually looking at.


Cheers,
Philipp


--
philipp.epp...@kernkonzept.com - Tel. 0351-41 883 221
http://www.kernkonzept.com

Kernkonzept GmbH.  Sitz: Dresden.  Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

_______________________________________________
l4-hackers mailing list -- l4-hackers@os.inf.tu-dresden.de
To unsubscribe send an email to l4-hackers-le...@os.inf.tu-dresden.de

Reply via email to