QEMU is a virtual machine which allows running an operating system inside of another. While there already is a Haiku port, it currently does not support any acceleration system through native virtualization (through Intel VT-x and AMD SVM.) This makes it too slow for many uses.
This project aimed to bring hardware virtualization to Haiku by porting NVMM, a hypervisor that already has QEMU support, into Haiku from DragonFlyBSD. The project goals (as included on the proposal) were:
Another month has gone by and we’re entering now the last month of GSoC! So, what did I get done this month?
What works now that didn’t work before?
The driver supports now the 16 IOCTL calls defined by the driver, which means that
both the frontend and the VMX backend are complete.
EPT tables support: Much of my previous post content was about EPT tables and all the
problems I was having to get them working. Now support for them is complete and it works!
The EPT page fault handler only consists of one call to Haiku’s page fault handler, since it’s
everything integrated into Haiku’s virtual memory subsystem.
libnvmm’s test suite is ported and all tests pass.
QEMU (latest version from Haikuports) is capable, after applying a patch, of detecting NVMM support
and compile. It doesn’t work, sadly, something breaks after executing a few chunks of any given VM.
However, I didn’t make any progress on the SVM backend (which is still at a very early state). I’m beginning to realise that this is one thing I won’t be able to finish during the coding period.
I probably have all the pieces needed to port it but I have to look at the differences between SVM and VMX (there are a few) and that will probably take some time I might not have in the end.
Also, it’s worth to mention that despite getting more and more stuff working the list of TODO things keeps getting longer and longer.
Things on that list are improvements on performance and behavior (NVMM’s kidnaps the CPU which is probably not the best behavior if we want the system to be responsive, …). None of them is very long or difficult but there are a lot of those little things to do so they will end up requiring a considerable amount of time.
When the coding period began I was expecting to publish a progress report every week. However, we’ve reached the end
of the first month of the coding period and this is my first update: This probably tells that there hasn’t been as
much progress as I expected, although progress have been made.
What works
The library was one of the first things I got done, because it consists of very portable
code, which made it very easy to port, while allowing me to test the (still reduced) driver
capabilities much easier as I could use already existing code examples for NVMM instead of
trying to talk directly to the driver.
Hi there! I’m Daniel Martin (aka dalme) and I’m a final year undergraduate student
at Complutense University of Madrid (Spain). I’ve been accepted into Google Summer of
Code and I’ll be working to bring hardware virtualization to Haiku, a project that
has been in the GSoC ideas list for around a decade. I’ll be mentored by scottmc and
waddlesplash.
Project overview
QEMU is a virtual machine which allows running an operating system inside of another.
While there already is a Haiku port, it currently does not support any acceleration system
through native virtualization (through Intel VT-x and AMD SVM). This makes it too slow for
many uses, due to having to emulate the guest OS on software. Fixing this would allow Haiku
users to run another system, such as Windows or Linux, at almost native speed. This
would make using Haiku as primary operating system a viable approach for more people
since they could effectively run applications that are not yet available on Haiku.