Re: vm-basic-pci demo testing
Philipp Eppelt <[email protected]> Thu, 7 Nov 2024 10:49:00 +0100
| Newsgroups | gmane.comp.micro-kernel.l4.devel |
|---|---|
| Message-ID | <[email protected]> |
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
--
[email protected] - Tel. 0351-41 883 221
http://www.kernkonzept.com
Kernkonzept GmbH. Sitz: Dresden. Amtsgericht Dresden, HRB 31129.
Geschäftsführer: Dr.-Ing. Michael Hohmuth
_______________________________________________
l4-hackers mailing list -- [email protected]
To unsubscribe send an email to [email protected]
OpenPGP_signature.asc
(application/pgp-signature, 840 B)
-----BEGIN PGP SIGNATURE----- wsF5BAABCAAjFiEEO7T7Jq7ah1WoVcqMg8udkTKw7CEFAmcsjQwFAwAAAAAACgkQg8udkTKw7CGJ cRAAiocQZ13NlYFgC77hRJdpNxwGpqaJXURMLYz838LHiP+Rhwd6WqwP1+qas14Ec44EjV4QxKu1 6ktmx2Kqm40h8xQ0loFkDzO6zBL3+xHBGw8sOTw21/g+WhTPcRsBxgtfmBuWI+8+jNoZ/nFk7Wm2 oSDy3FjmqvzpLtUKIkne57CR3eVSvymNp7GVlu6K7sijUT21Fmn9NgKel99US/xrw8oH9a0JXyfU qwCG7Cd/3Fc380WGPLMAsfULodeWd2z5UbP0zuekXseeERtlgwXy6s6g5wYLq4xM5eCEYe2bRwrq w1YV2jEK/APhQtFaM2ygiNvlfWTaT+gKciv4y5SBz6qVp4G9CVh9TcAUDHjBnBjxE/Q9hCokwKhe ZhHBna97q2kK3I4+bH21hd0b2aOdCp7IEVPjaHQbLpo2xkFPlrouYRqK/C9OXxQidb71EpvRQtAR Hr4nhVlr8Q/kM5AN3sklFtq5yu7+15JgkkzocwTLRjKGpo0GRna4LOnRLSPk/L/qGzd5/7TGrAGB BySM+nDMOsrHXtz7JtVEkqPyNxJkmJD69a608un0XFulNM4oavZwkx3dlWhj99RxFB1YrCQZTnnp r228tmuHOXaS625cjD8IyKRWQOC6ARnN1Are7w46CV1iPhc2bBE677K3od74ND9Bn5eYh+8xiKCq Sts= =1eb2 -----END PGP SIGNATURE-----