-
Notifications
You must be signed in to change notification settings - Fork 29
Implement virtio-net device #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
ffe224e
e0477f9
79d0a3e
d87e2dc
04548f7
f727c6e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,7 @@ OBJS := \ | |
virtio-pci.o \ | ||
virtq.o \ | ||
virtio-blk.o \ | ||
virtio-net.o \ | ||
diskimg.o \ | ||
main.o | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,6 +93,8 @@ int main(int argc, char *argv[]) | |
return throw_err("Failed to load initrd"); | ||
if (diskimg_file && vm_load_diskimg(&vm, diskimg_file) < 0) | ||
return throw_err("Failed to load disk image"); | ||
if (vm_enable_net(&vm) < 0) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If virtio-net is not enabled, it still makes sense to initialize and launch this virtual machine via KVM. Thus, instead of returning, we can proceed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I changed throw_err to fprintf. If if (vm_enable_net(&vm) < 0)
fprintf(stderr, "Failed to Enable Virtio-Net Device\n"); There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Refine the message as following:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok ! Already done |
||
fprintf(stderr, "Failed to enable virtio-net device\n"); | ||
|
||
if (vm_late_init(&vm) < 0) | ||
return -1; | ||
|
Uh oh!
There was an error while loading. Please reload this page.