
HAXM is now open source - JoshTriplett
http://lists.nongnu.org/archive/html/qemu-devel/2017-11/msg02504.html
======
geofft
If I understand correctly, this means that qemu now supports hardware
acceleration on Windows, macOS, and Linux (via hax on the first two, and kvm
on the latter).

This is _huge_ \- previously the only cross-platform hardware-accelerated VM
engines were VirtualBox, which is ... not really what I'd want to run
production infrastructure on ... and VMware. Two employers ago I worked for a
place that was developing tooling for distributing Windows VMs that could run
on any host OS, for big enterprises that just want to support a VM image
instead of a bunch of weird hardware configs. We were effectively tied to
VMware as the only realistic option that worked on all platforms. We could
have done something with Hyper-V and Parallels, but that would have involved
three very different virtual platforms, which is a pain to get Windows running
smoothly on. I'm guessing that you can now run literally the same qemu command
line on all three OSes, with the same VM image, with the whole thing being
free software, which is pretty amazing.

~~~
bonzini
Correct! More precisely, it supports hardware acceleration without installing
any proprietary component. HAXM support was a new feature in QEMU 2.9, at the
end of 2016.

For macOS we will also get Hypervisor.framework support in 2.12.

------
jwilk
From [https://github.com/intel/haxm](https://github.com/intel/haxm) :

 _HAXM is a hardware-assisted virtualization engine (hypervisor) that uses
Intel Virtualization Technology to speed up IA (x86 / x86_64) emulation on a
host machine running Windows or macOS._

~~~
eropple
More concretely (for most folks who'd be interested), it's what underpins an
actually-decently-performing Android VM on MacOS.

~~~
pm215
For upstream QEMU I think we're looking at patches that add
Hypervisor.framework support for MacOS acceleration -- better to use the
builtin support from the OS rather than a 3rd party kernel extension I think.
The Android release notes
([https://developer.android.com/studio/releases/emulator.html](https://developer.android.com/studio/releases/emulator.html))
say it supports both Hypervisor.framework and HAXM, with H.f being on by
default -- are you saying that H.f has poor performance compared to HAXM?

~~~
eropple
Oh hey, funny seeing you around here. =)

To the best of my memory, I've never used H.f on MacOS with Android. Every
Intel image I've used expected HAXM. So I can't tell you either way.

~~~
bonzini
Yes, it is also a new feature of the Android emulator.

------
nice_byte
That's awesome, means Android emulator may soon work well on Windows/AMD and
not conflict with hyper-v any more

~~~
bonzini
No, Android emulator was already using HAXM. It just means what the title
says: the kernel component is now open source.

Supporting AMD is possible in principle, I am not sure if anyone is going to
contribute it. It would be quite some work.

Nested virtualization support in Hyper-V is another story; Microsoft has
already enabled it on Azure.

~~~
nice_byte
Yeah, I know, I used to work on it. Intel never gave us the source code
though. Now that it's open source, the team will be able to actually look at
it and possibly make the changes that we wanted for years (like adding AMD
support).

------
bitmapbrother
Since it's now open source would it be possible for HAXM to be made to work
with AMD CPU's?

~~~
colemannugent
AFAIK, HAXM relies on a couple proprietary Intel CPU features [1]. Though
that's not to say that the folks at AMD couldn't be inspired by the code in
this repo and, coupled with their own proprietary extensions, duplicate much
of the same functionality.

[1]: [https://www-
ssl.intel.com/content/www/us/en/virtualization/v...](https://www-
ssl.intel.com/content/www/us/en/virtualization/virtualization-
technology/intel-virtualization-technology.html)

------
exikyut
I wonder how efficient this is compared with KVM.

It's probably effectively equivalent.

~~~
bonzini
It lacks a couple features, for example the CPUID bits cannot be customized
(to fake that the VM is running on an older CPU model) and I think it does not
support live migration.

Also it does not support AMD processors.

