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

From: Mario Marietto <marietto2008_at_gmail.com>
Date: Mon, 20 May 2024 08:55:09 UTC
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 supported. I see no point in porting an unsupported solution to a new
OS, thus dont think someone will want to port it.

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

qemu and HAXM developer : Yes, it supports NetBSD.

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 didn't add it
already, you may ask for the reason.

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

-- 
Mario.