On 13.01.20 10:29, Thorsten Schulz wrote:
Hej group,

I am stuck getting the e1000-demo working in qemu based on jailhouse-images/wip/update. Due to a prior glitch, I am still on PREEMPT-RT (./build-image.sh --rt --latest) if that makes a difference.

Upfront maybe as a "bug-note" /if/ "config/e1000-demo.c" is expected to demo on the qemu-x86-root-cell, it is not. The configs are out of sync: e1000-demo.c expects the card on address 19, while qemu & the orig-cell config provide it on 2, so unfortunately it does not play out-of-the-box.

Yes, the e1000-demo was originally designed to run on physical boards with standard Intel chipsets that have their e1000[e] on 0:19.0.


In the long run I want to run a system with two e1000 cards, each tied to a cell, so I wanted to start this on qemu first:

I modified the start-qemu.sh to add another e1000 device ("-device e1000e,addr=19,netdev=net2"), ran `jailhouse config collect 2cards.tar` inside and create`d "2cards.c" from it, as well as trying to meld it with the original "qemu-x86.c". (There seem to be some "magical" hacks in it for someone who is relatively new to the matter, about what can be removed and what needs to be added.) I also adjusted "linux-x86-demo.c" and "e1000-demo.c" for the changed addresses.

Enabling the 2cards.cell succeeds, however, I noted the root-cell's kernel-driver for ivshmem complaining (dmesg-enable.log: "uio_ivshmem: probe of 0000:00:0e.0 failed with error -16" and "ivshmem-net: probe of 0000:00:0f.0 failed with error -16" -> EBUSY), so something is skewed.

I got such an error recently as well. It turned out that I accidentally assigned the same or overlapping memory regions to the two ivshmem devices. Check if the regions you use are actually free.

When I `jailhouse cell create e1000-demo.cell`, I get (jailhouse-console.log: "FATAL: Invalid PCI config write, port: cfc, size 2, address port: 8000c8e8"), the linux-cell throws the same error, just on its device 02 (800010e8), so I guess, I must be doing something fundamentally wrong.

You need to add write access permission to some PCI caps of the e1000e, likely PCIe power mangement, possibly more. Check what is at PCI config address 0xe8 (lowest byte of that address above).


I saw few similar discussions on the forum in the archives, though without giving me a clue.

I think I covered such issues in the Jailhouse tutorial at ELC-E 2016. Check [1][2].

Jan

[1] https://events.linuxfoundation.org/sites/events/files/slides/ELCE2016-Jailhouse-Tutorial.pdf
[2] https://youtu.be/7fiJbwmhnRw?list=PLbzoR-pLrL6pRFP6SOywVJWdEHlmQE51q

--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

--
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/c95ae0f5-9510-86c5-b4db-8939980399bd%40siemens.com.

Reply via email to