Hi Michal,
The ethernet-demo application is current written to require the presence of an IOMMU for DMA translation. If you are running in an emulated environment, such as QEMU, that does not emulate an IOMMU, or on hardware without an IOMMU, then it will not work. The rumprun examples currently do not use the iommu and are using the devices "unsafely" as the driver (and hence rumprun) must be trusted not to compromise the system. Eventually our rumprun support will support (although not require) using the IOMMU to reduce the trust needed in them.
Adrian
On Thu 03-Aug-2017 7:24 AM, Michal Podhradsky wrote:
Hello,
I have a few questions regarding networking (I also want to be able to communicate with sel4 system over network).
1. I tried the example Adrian pointed out https://github.com/SEL4PROJ/ethernet-demo-x86-manifest
When I initialize with default.xmlhttps://github.com/SEL4PROJ/ethernet-demo-x86-manifest/blob/master/default.x... and try to compile, I am getting the following error:
[Inline image 1]
I suspect that is something related with the recent changes in camkes/sel4? Or is the default ethernet-demo app simply not configured properly? I am not talking about memory mapping/irsq, this is a different error.
2. When I use the same repository and the workinghttps://github.com/SEL4PROJ/ethernet-demo-x86-manifest/blob/master/working-2... manifest (pointing to specific commits so it compiles), and change the ethernet memory address and irqs I can compile the application, but I get the following error when running it:
[Inline image 2]
Notably the process fails when sel4 tries to access client iospace. I know I have the irqs and the memory right, as well as the device id (pci_bdfhttps://github.com/SEL4PROJ/camkes-apps-ethernet-demo-x86--devel/blob/master...). However, the problem is obviously the iospace_idhttps://github.com/SEL4PROJ/camkes-apps-ethernet-demo-x86--devel/blob/master....From what I read from the sel4 manual, the iospace_id depends on the type of iommu unit if I understand it correctly. But I am running sel4 in qemu and I don't pass any physical device to it, it is all virtual devices. To verify, I can run Ubuntu in qemu with the very same settings and it detects all virtual devices without issues. I can also run sel4-rumprum app (see below) and it also detects the hardware without issues.
The same error happens even when I disable the IOMMU in the sel4 config (herehttps://github.com/SEL4PROJ/camkes-apps-ethernet-demo-x86--devel/blob/master...).
Am I missing something fundamental here? Why in one case I need iommu to run sel4 (this case), and why in other case (sel4-rumprun or regular Ubuntu) I dont?
3. I tested the sel4-rumprun-ethernethttps://github.com/seL4/camkes/blob/master/apps/rumprun_ethernet/rumprun_eth... app in qemu and it works great! I can connect over TCP socket from host and send data to sel4 running in qemu. In this case there was no issue with iommu or iospaces (I am just passing through the irq numbers and device addresses).
So my question is - was this app just a quick test (committed by Kent McLeodhttps://github.com/seL4/camkes/commit/cd17c313f7f76ffa7ec6981e1140c6343b2f9b...), or do you think using rumpkernels as camkes components is the preferred way forward? Especially because that way we have access to NetBSD drivers without much modifications.
Thank you in advance for your advice.
Regards
Michal
On Wed, Jul 26, 2017 at 1:35 AM,