Live data from Hacker News

Booting a macOS Apple Silicon Kernel in QEMU

worthdoingbadly.com

1–10 of 73 posts

Re: Booting a macOS Apple Silicon Kernel in QEMU

#2
The fact that he even got that far with emulating what is essentially completely undocumented hardware is a very good sign, adding the rest of the hardware to QEMU might not be as hard as initially thought.

This approach will help with none of these

Don't underestimate the community -- a lot of Hackintosh (and emulation) stuff is done for the "just because I can" reasons, and getting a fully emulated ARM Mac working enough for any sort of actual use would be a huge win even if it's slower than their hardware and not 100% complete (just like Hackintoshes usually are.)

Re: Booting a macOS Apple Silicon Kernel in QEMU

#3

The fact that he even got that far with emulating what is essentially completely undocumented hardware is a very good sign, adding the rest of the hardware to QEMU might not be as hard as initially thought. This approach will help with none of these Don't underestimate the community -- a lot of Hackintosh (and emulation) stuff is done for the "just because I can" reasons, and getting a fully emulated ARM Mac working…

It might not be fast or pretty but I agree there will be emulation. Anyone remember PearPC?

Re: Booting a macOS Apple Silicon Kernel in QEMU

#5
> macOS uses CPU instructions that aren’t available yet on non-Apple ARM CPUs, so you can’t have hardware accelerated virtualization,

Does anyone know what these instructions are? And could you not trap and emulate them if the hypervisor detects an invalid instruction?

Re: Booting a macOS Apple Silicon Kernel in QEMU

#7
post #5

> macOS uses CPU instructions that aren’t available yet on non-Apple ARM CPUs, so you can’t have hardware accelerated virtualization, Does anyone know what these instructions are? And could you not trap and emulate them if the hypervisor detects an invalid instruction?

Somewhat related (KVM for iPhone processors): https://alephsecurity.com/2020/07/19/xnu-qemu-kvm/

Re: Booting a macOS Apple Silicon Kernel in QEMU

#8
> Besides, Hackintoshes are often built when Apple’s own hardware isn’t fast enough; in this case, Apple’s ARM processors are already some of the fastest in the industry.

They are also used when one wants more cores than are possible on Apple hardware. If you want a build engine for a medium to large sized compiled language project, Apple has no options that make economic sense, since a Ryzen Threadripper will beat everything else hands down. The same is true of every other embarrassingly parallel, linearly-scaling compute problem.

In such cases, the "speed" of Apple's own silicon doesn't help at all.

Re: Booting a macOS Apple Silicon Kernel in QEMU

#9

The fact that he even got that far with emulating what is essentially completely undocumented hardware is a very good sign, adding the rest of the hardware to QEMU might not be as hard as initially thought. This approach will help with none of these Don't underestimate the community -- a lot of Hackintosh (and emulation) stuff is done for the "just because I can" reasons, and getting a fully emulated ARM Mac working…

> The fact that he even got that far with emulating what is essentially completely undocumented hardware is a very good sign, adding the rest of the hardware to QEMU might not be as hard as initially thought.

I'm less convinced—it sounds like he was largely reusing the setup that can semi-boot iOS (which is of course also totally undocumented, but has had many years to be studied.)

It's still a cool accomplishment, I just don't think it necessarily portends great things.

Post reply on HN