Comments (3)
Some more details: I logged the PCI devices discovered in both qemu and ec2.
PCI devices in qemu
[pci] found devices: ([]*pci.Device) (len=6 cap=8) {
(*pci.Device)(0x68024560)({
Ident: (pci.Identity) {
Vendor: (uint16) 32902,
Device: (uint16) 4663
},
Addr: (pci.Address) {
Bus: (uint8) 0,
Device: (uint8) 0,
Func: (uint8) 0
},
Class: (uint8) 6,
SubClass: (uint8) 0,
IRQLine: (uint8) 0,
IRQNO: (uint8) 32
}),
(*pci.Device)(0x68024570)({
Ident: (pci.Identity) {
Vendor: (uint16) 32902,
Device: (uint16) 28672
},
Addr: (pci.Address) {
Bus: (uint8) 0,
Device: (uint8) 1,
Func: (uint8) 0
},
Class: (uint8) 6,
SubClass: (uint8) 1,
IRQLine: (uint8) 0,
IRQNO: (uint8) 32
}),
(*pci.Device)(0x68024580)({
Ident: (pci.Identity) {
Vendor: (uint16) 32902,
Device: (uint16) 28688
},
Addr: (pci.Address) {
Bus: (uint8) 0,
Device: (uint8) 1,
Func: (uint8) 1
},
Class: (uint8) 1,
SubClass: (uint8) 1,
IRQLine: (uint8) 0,
IRQNO: (uint8) 32
}),
(*pci.Device)(0x68024590)({
Ident: (pci.Identity) {
Vendor: (uint16) 32902,
Device: (uint16) 28947
},
Addr: (pci.Address) {
Bus: (uint8) 0,
Device: (uint8) 1,
Func: (uint8) 3
},
Class: (uint8) 6,
SubClass: (uint8) 128,
IRQLine: (uint8) 9,
IRQNO: (uint8) 41
}),
(*pci.Device)(0x680245a0)({
Ident: (pci.Identity) {
Vendor: (uint16) 4660,
Device: (uint16) 4369
},
Addr: (pci.Address) {
Bus: (uint8) 0,
Device: (uint8) 2,
Func: (uint8) 0
},
Class: (uint8) 3,
SubClass: (uint8) 0,
IRQLine: (uint8) 0,
IRQNO: (uint8) 32
}),
(*pci.Device)(0x680245b0)({
Ident: (pci.Identity) {
Vendor: (uint16) 32902,
Device: (uint16) 4110
},
Addr: (pci.Address) {
Bus: (uint8) 0,
Device: (uint8) 3,
Func: (uint8) 0
},
Class: (uint8) 2,
SubClass: (uint8) 0,
IRQLine: (uint8) 11,
IRQNO: (uint8) 43
})
}
PCI devices in EC2
[pci] found devices: ([]*pci.Device) (len=6 cap=8) {
(*pci.Device)(0x68024554)({
Ident: (pci.Identity) {
Vendor: (uint16) 32902,
Device: (uint16) 4663
},
Addr: (pci.Address) {
Bus: (uint8) 0,
Device: (uint8) 0,
Func: (uint8) 0
},
Class: (uint8) 6,
SubClass: (uint8) 0,
IRQLine: (uint8) 0,
IRQNO: (uint8) 32
}),
(*pci.Device)(0x68024560)({
Ident: (pci.Identity) {
Vendor: (uint16) 32902,
Device: (uint16) 28672
},
Addr: (pci.Address) {
Bus: (uint8) 0,
Device: (uint8) 1,
Func: (uint8) 0
},
Class: (uint8) 6,
SubClass: (uint8) 1,
IRQLine: (uint8) 0,
IRQNO: (uint8) 32
}),
(*pci.Device)(0x68024570)({
Ident: (pci.Identity) {
Vendor: (uint16) 32902,
Device: (uint16) 28947
},
Addr: (pci.Address) {
Bus: (uint8) 0,
Device: (uint8) 1,
Func: (uint8) 3
},
Class: (uint8) 0,
SubClass: (uint8) 0,
IRQLine: (uint8) 9,
IRQNO: (uint8) 41
}),
(*pci.Device)(0x68024580)({
Ident: (pci.Identity) {
Vendor: (uint16) 7439,
Device: (uint16) 4369
},
Addr: (pci.Address) {
Bus: (uint8) 0,
Device: (uint8) 3,
Func: (uint8) 0
},
Class: (uint8) 3,
SubClass: (uint8) 0,
IRQLine: (uint8) 0,
IRQNO: (uint8) 32
}),
(*pci.Device)(0x68024590)({
Ident: (pci.Identity) {
Vendor: (uint16) 7439,
Device: (uint16) 32865
},
Addr: (pci.Address) {
Bus: (uint8) 0,
Device: (uint8) 4,
Func: (uint8) 0
},
Class: (uint8) 1,
SubClass: (uint8) 8,
IRQLine: (uint8) 11,
IRQNO: (uint8) 43
}),
(*pci.Device)(0x680245a0)({
Ident: (pci.Identity) {
Vendor: (uint16) 7439,
Device: (uint16) 60448
},
Addr: (pci.Address) {
Bus: (uint8) 0,
Device: (uint8) 5,
Func: (uint8) 0
},
Class: (uint8) 2,
SubClass: (uint8) 0,
IRQLine: (uint8) 0,
IRQNO: (uint8) 32
})
}
from eggos.
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.
from eggos.
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:
- Elastic Network Adapter (which is what is seen in above) which is on the newest instance types (the ones with a "5" in them, e.g. c5, m5, r5)
- Intel 82599 VF (which uses Intel's
ixbgevf
driver) on c3, c4, m4 and a few others. - Xen's VIF on older instances.
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:
- egg build
- egg pack to ISO
- upload ISO to S3
- aws ec2 import-snapshot --format RAW --user-bucket ... path-to-iso-in-S3 (gives a snapshot ID)
- aws ec2 register-image ... snapshot-id $snapshotID (gives an AMI ID)
- aws ec2 run-instances ... --image-id $amiID
Sorry it is not more detailed. It is on my other computer. I will submit a PR soon.
from eggos.
Related Issues (20)
- add support for go1.17 HOT 2
- create Discord channel for chat communication between developers and the community HOT 17
- ๅฏไปฅ็งปๆคๅฐๅ็ๆบไธๅ HOT 3
- ๅ ณไบๅ ๆ ธ็็้ฎ HOT 20
- [Bug]: qemudebug
- The error in running the example "Helloworld" HOT 5
- What about an RT OS by Go language and TinyGo ?
- how to run in ( VMware Workstation Pro16 ) ? eggos_0.4.1_Windows_x86_64.iso HOT 1
- [Bug]: mountfs.go chown errors HOT 2
- Issues booting from bare metal HOT 8
- Instructions on setting up the cross compiler for building multiboot.elf HOT 1
- all: support multiple cpu architecture
- kernel: add support for `arm64` architecture
- cycle not allowed HOT 2
- eggos build error HOT 2
- Sponsorship HOT 1
- qemu error running unikernel .elf HOT 2
- `egg run` can't find disk image, `egg run foo.iso` exits immediately after grub HOT 10
- [Bug]: Oh noes :cry:
- Loading various Init() functions in eggos.go HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eggos.