Open aidansteele opened 3 years ago
Some more details: I logged the PCI devices discovered in both qemu and ec2.
Thank you very much for your report.
The network card driver model of eggos is intel's e1000
series. From the PCI list you provided, the network card used by ec2 is the one with vendor 7439 and device 32865, which is an exclusive model of amazon, see https://www.pcilookup.com/?ven=1d0f&dev=&action=submit. I will try to support the virtio driver later, so that the network module can be used on the cloud server. I wonder if ec2 supports virtio network card?
I'm just curious about how you made eggos into an ec2 image?
Thanks again for sharing eggos' attempts on the cloud server.
Hi @icexin, thanks for your quick feedback! I realised the next day that you are indeed correct, EC2 does not use the e1000 so I understand why it couldn't find it 😄
I did some more research and the network hardware for EC2 is actually quite complex. There are at least three options that I am aware of:
ixbgevf
driver) on c3, c4, m4 and a few others.The ENA drivers are open source and seem to be well-documented, but I am not enough of an expert to replicate them in Go: https://github.com/amzn/amzn-drivers/tree/master/kernel/linux/ena. This would be the best perf driver to copy, but I assume it's complex.
The older instances (the ones without ENA) are based on Xen and have the "Xen Platform Device" PCI device attached. It has vendor ID 0x5853 and device ID 0x0001. This appears to be documented here (ctrl+F for xen_platform_pci=1
). The network driver on Linux is here.
Regarding eggos -> EC2 image: I can submit a PR sometime in the next few days with a script to do it. But the approximate process is:
Sorry it is not more detailed. It is on my other computer. I will submit a PR soon.
Hi,
This is a very cool project - thank you for building it! I tried running the helloworld example on AWS EC2 and got the following error. This output is running with the "debug" log level.
That nil pointer panic is from this code:
https://github.com/icexin/eggos/blob/971efada741e1d984cd284d591f15adaba03c77b/drivers/e1000/e1000.go#L223-L224
A successful run of the same kernel in qemu has different logs:
I understand that this is unlikely to be enough detail for you to diagnose the problem. I am happy to try assist, but I might need some directions from you. Let me know what details you need and I will try provide them.