
Hvdos, a simple DOS emulator based on the OS X Hypervisor.framework - LaSombra
https://github.com/mist64/hvdos
======
thought_alarm
A nice write-up that explains this code is available here:
[http://www.pagetable.com/?p=764](http://www.pagetable.com/?p=764)

------
justinsb
I hadn't seen Hypervisor.framework before. Has anyone looked into porting QEMU
to it? It sounds like this would effectively be KVM for OSX.

------
TsukasaUjiie
Sounds like an interesting framework, my quick search didn't unearth any docs
for it though? The only reference on Apples website is "we added this to
10.10"

~~~
gilgoomesh
As with all Mac frameworks, the full headers are embedded in the framework and
the headers all have full Javadoc-style API documentation for each function.
Since there are only 24 functions in the whole framework, that's probably
enough to work it out.

~~~
TsukasaUjiie
If only I had my mbp with be to read them :'(

~~~
0x006A
You can find a copy of the MacOSX-SDKs on github, i.e.
[https://github.com/phracker/MacOSX-
SDKs/blob/8519a1de16d8384...](https://github.com/phracker/MacOSX-
SDKs/blob/8519a1de16d8384359a4f39f1bd82d751b7cfecd/MacOSX10.10.sdk/System/Library/Frameworks/Hypervisor.framework/Versions/A/Headers/)

~~~
TsukasaUjiie
thanks

------
blinkingled
Gotta wonder who this is targeted towards - the likes of VMWare definitely not
as I am sure they've spent a lot of time optimizing everything that happens in
kernel space inside their drivers and surely there's more than 24 API calls
they'll need inside the kernel to get something like Fusion working.

Maybe Apple is planning to provide a built-in hypervisor and this is just a
start of it. Or maybe this is just for old DOS/Win games that'll sell for
$9.99 in the appstore.

Also a cursory look shows the API is rather Intel specific. That's fine for
the status quo but if they ever switch CPU vendors again wonder how this will
work out.

~~~
toyg
_> Or maybe this is just for old DOS/Win games that'll sell for $9.99 in the
appstore._

Maybe it's the start of an "extreme sandbox" model, where appstore apps are
all virtualized.

~~~
X-Istence
This is something I've been thinking about. What if we could easily allow all
programs to be sandboxed using virtualisation technology? Run your web browser
or parts thereof inside of a VM so that any exploits are limited to just that
VM.

~~~
transpute
Bromium does this for common apps (web, pdf, office) on Windows, e.g. each
browser tab and HTTP request is a separate VM.

~~~
NickNameNick
It also alerts if a process does something 'weird', it allows exploits to run
in a sandbox and records what they do, so you can analyse it later.

------
koenigdavidmj
This reminds me of vx32[0], a user level emulation library that seems to
target the same interface. One of the main applications using it is 9vx, which
is basically a Plan 9 kernel running in userspace.

0:
[http://pdos.csail.mit.edu/~baford/vm/](http://pdos.csail.mit.edu/~baford/vm/)

