Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Simple KVM Firmware in Rust (github.com/intel)
155 points by adamnemecek on May 11, 2019 | hide | past | favorite | 9 comments


This is great, and even includes what looks like a complete FAT32 implementation[1]. I bet this could be broken up into a number of separate, publishable crates, if the interfaces are clean enough (read: use traits).

[1] https://github.com/intel/rust-hypervisor-firmware/blob/maste...


From the source code it looks like the implementation is read-only though, writing to a file system efficiently is much harder (but not needed for a boot loader)


Could someone please ELI5 this to me? It's not clear to me what KVM even is? how does this new thing fit into a PC boot process and what it does? Why is it called firmware? What's so exciting in it that people upvoted it to ~100 points on HN? TIA!


KVM is the Kernel-based Virtual Machine [1], a hypervisor system in the Linux Kernel. The firmware in question is, as I (minimally) understand it, like a PC BIOS, that does the initial system bootstrapping. So it's not firmware on the physical host, but acts as firmware in the virtualized host.

I don't know enough about KVM to know why this firmware is significant, but I have seen some of QEMU (which can use KVM for its hypervisor) requiring a kernel image separate from the virtual host disk image. This firmware loads a kernel from the disk image itself, like a kernel is loaded from disk on a physical host.

[1] https://en.wikipedia.org/wiki/Kernel-based_Virtual_Machine


QEMU runs a full-blown firmware (SeaBIOS or UEFI) so it does not need this. You can, if you want, pass the kernel on a command line but it's not the default.

However, Firecracker can only boot from a manually-provided kernel so you need this in order to boot from a partition. It is still not a complete replacement for e.g. Grub, which supports boot from various filesystems and from LVM, including encrypted logical volumes.


I thought it was firmware for a keyboard-video-mouse box.


> Works with Firecracker as a drop in replacement for the Linux kernel

Oh my. I'm watching this.


You'll want to keep an eye on Rust-vmm then: https://opensource.com/article/19/3/rust-virtual-machine


My interest lies in a rust unikernel where I can compile my binary into a VM image that has just what I need to run the application and deploy it. Configuration is read from a known network address, and off it goes.

But that is still awesome




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: