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 
<[email protected]<mailto:[email protected]>>
To: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Subject: [seL4] Trouble with the tun/tap interface in linux guest
Message-ID: 
<[email protected]<mailto:[email protected]>>
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)"
<Re: [seL4] Trouble with the tun/tap interface in linux guest>
To: Travis Wheatley 
<[email protected]<mailto:[email protected]>>,
"[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Subject: Re: [seL4] Trouble with the tun/tap interface in linux guest
Message-ID:
<syxpr01mb0832783d9cd6b3b03b0f04ffab...@syxpr01mb0832.ausprd01.prod.outlook.com<mailto:syxpr01mb0832783d9cd6b3b03b0f04ffab...@syxpr01mb0832.ausprd01.prod.outlook.com>>

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
[email protected]<mailto:[email protected]>
https://sel4.systems/lists/listinfo/devel


------------------------------

End of Devel Digest, Vol 71, Issue 24
*************************************

_______________________________________________
Devel mailing list
[email protected]
https://sel4.systems/lists/listinfo/devel

Reply via email to