Thank you for your reply Kent.
I modified the devices.camkes in the corresponding project folder as suggested. However, I am still seeing the same behavior. Are there other items I need to add or is there something in the kernel that needs to be enabled? I tried swapping in an Ubuntu server 18.01 kernel. It boots, but I do not even see the tunl0 interface that I see when I boot the default vm_minimal image.
Here is what the vm0.untyped_mmios block looks like in my devices.camakes file looks like
vm0.untyped_mmios = [
"0x8040000:12", // Interrupt Controller Virtual CPU interface (Virtual Machine view)
"0x10040000:17", // QEMU PCI MMIO
"0x3eff0000:16", // QEMU PCI IO ports
"0x40000000:29", // Linux kernel memory regions
];
vm0.dtb_irqs = [35, 36, 37, 38];
I found that the vm_multi project devices.camkes has similar stanzas in the vm0.untyped.mmios block. However, the Interrupt controller item has an additional 0x1000 token in it:
"0x8040000:0x1000:12", // Interrupt Controller Virtual CPU interface (Virtual Machine view)
I tried this in the vm_minimal configurationo but ../init.sh throws an error indicating that it doesn’t know how to parse that. I also was able to boot the vm_multi configuration in the emulator and noticed that it did, in fact, have both an eth0 and eth1 interface, but was not able to get them to work because the kernel seemed to be stuck in a loop looking for a non-existent DHCP server.
Wondering if there is some other config somewhere that I need to get a working eth0 interface on the vm_minimal configuration?
Message: 1
Date: Tue, 21 Apr 2020 20:57:24 +0000
From: Travis Wheatley mailto:travis.wheatley@emergentspace.com>
To: "devel@sel4.systemsmailto:devel@sel4.systems" mailto:devel@sel4.systems>
Subject: [seL4] Trouble with the tun/tap interface in linux guest
Message-ID: <207FF441-86A1-4CE3-88AD-8BACC908138D@emergentspace.commailto:207FF441-86A1-4CE3-88AD-8BACC908138D@emergentspace.com>
Content-Type: text/plain; charset="utf-8"
Thanks to recent patches I have been able to build and boot the linux guest kernel under the simulator in the camkes-arm-vm project using the vm_minimal configuration. However, I am having trouble accessing it via the network interface. First I set up a tap interface as follows:
# sudo ip tuntap add tap0 mode tap
# sudo ip addr add 10.0.120.100/24 dev tap0
# sudo ip link set dev tap0 up
Then I start the simulation using the following command line, which I believe should make the tap interface appear as an e1000 nic to the guest kernel:
./simulate --extra-qemu-args="-net nic,model=e1000 -net tap,script=no,ifname=tap0?
In the linux guest the ?ip a? command shows that there is a tunl0 network device available. I have tried a couple of methods of activating it including using ifconfig to bring it up and assign it an ip address as well as the ?ip link set tun0 up? followed by the ?ip addr add 10.0.120.1/24 dev tunl0? command. According to ifconfig both of these bring the interface up and provide it with an ip address. However, I can?t ping the tap ip address from the guest nor can I ping the guest tunl0 interface from another console on the host.
So, what am I missing?
------------------------------
Message: 2
Date: Tue, 21 Apr 2020 23:09:16 +0000
From: "Mcleod, Kent (Data61, Kensington NSW)"
To: Travis Wheatley mailto:travis.wheatley@emergentspace.com>,
"devel@sel4.systemsmailto:devel@sel4.systems" mailto:devel@sel4.systems>
Subject: Re: [seL4] Trouble with the tun/tap interface in linux guest
Message-ID:
mailto:SYXPR01MB0832783D9CD6B3B03B0F04FFABD50@SYXPR01MB0832.ausprd01.prod.ou...>
Content-Type: text/plain; charset="iso-8859-1"
It could be that the camkes configuration doesn't pass through the PCI device to the Linux guest?
You need to add the Interrupts and PCI MMIO configurations below:
? ? ? ? vm0.untyped_mmios = [
? ? ? ? ? ? ? ? ? ? "0x8040000:12", // Interrupt Controller Virtual CPU interface (Virtual Machine view)
? ? ? ? ? ? ? ? ? ? "0x10040000:17", // QEMU PCI MMIO
? ? ? ? ? ? ? ? ? ? "0x3eff0000:16", // QEMU PCI IO ports
? ? ? ? ? ? ? ? ? ? "0x40000000:29", // Linux kernel memory regions
? ? ? ? ? ? ? ? ? ? ];
? ? ? ? vm0.dtb_irqs = ?[35, 36, 37, 38];
The device should then appear in the guest under eth0.
Kent.
------------------------------
Subject: Digest Footer
_______________________________________________
Devel mailing list
Devel@sel4.systemsmailto:Devel@sel4.systems
https://sel4.systems/lists/listinfo/devel
------------------------------
End of Devel Digest, Vol 71, Issue 24
*************************************