How much hard is to write a version of bhyve that can accelerate qemu ?

Hello.

some days ago I had a nice discussion with a qemu and haxm hypervisor developer that ended with a nice question and I would like to hear your opinions :

ME : "HAXM was created to bring Intel Virtualization Technology to Windows and macOSusers" ; keeping in consideration that MacOS has some code of FreeBSD inside. Is the source code of HAXM freely available ? Are you able to port it to FreeBSD ? The idea is to accelerate qemu with HAXM on FreeBSD. Do you know someone that can and wants to do this ?

qemu and HAXM developer : HAXM has been imported into pkgsrc/emulators/haxm ---> http://mail-index.netbsd.org/netbsd-users/2019/02/13/msg022207.html

ME : wow. So,it exists for NetBSD but not for FreeBSD ? That's so bad.

qemu and HAXM developer : Yes - https://github.com/intel/haxm. But it is not more supported. I see no meaning to port an unsupported solution to a new OS, thus dont think someone will want to port it.

ME : If NetBSD developers have been interested to port it,so why shouldn't FreeBSD ones be ? At least,in theory....after all,on FreeBSD qemu lacks the acceleration of a good hypervisor.

qemu and HAXM developer : This can be solved by adding for example bhyve support to qemu. This should be a better solution, than porting an unsupported hypervisor. I'm not aware why FreeBSD developers didnt add it already, you may ask for the reason.

How much hard is to write a version of bhyve that can accelerate qemu ?
 
Qemu supports Hyper-V too (--accel whpx).

If Bhyve's vmm exposes enough of an interface, it would be up to the Qemu developers to integrate it. However I believe it would be beneficial because macOS uses xhyve (based on Bhyve) so you would get two two for the price of one there.

Why would you want to use qemu on FreeBSD when you can have bhyve?
Qemu has a wide range of emulated hardware. Yes, bhyve's frontend is (much) cleaner but won't run a number of operating systems that it could if consumed via Qemu.
One example is Android's SDK emulators are based on Qemu. Accelerating these with bhyve would be quite nice.
 
If Bhyve's vmm exposes enough of an interface, it would be up to the Qemu developers to integrate it. However I believe it would be beneficial because macOS uses xhyve (based on Bhyve) so you would get two two for the price of one there.

Is xhyve still functional on latest macOS? I had some problems but haven't re-tried in a while.
 
Back
Top