Live data from Hacker News

Booting a macOS Apple Silicon Kernel in QEMU

worthdoingbadly.com

61–70 of 73 posts

Re: Booting a macOS Apple Silicon Kernel in QEMU

#61
post #20

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…

I created a mac in a vm and then I used system migration tool to sort of upload my old macbook pro's consciousness into the cloud. https://youtu.be/86XqF5dqjYc pretty cool I've been thinking about resurrecting my machines with older versions of osx - I'll have to figure out how to boot say 10.11 or 10.12

I still do it when I want to test things quickly even though I have a mac mini in the same room.

Re: Booting a macOS Apple Silicon Kernel in QEMU

#62
post #20

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…

I created a mac in a vm and then I used system migration tool to sort of upload my old macbook pro's consciousness into the cloud. https://youtu.be/86XqF5dqjYc pretty cool I've been thinking about resurrecting my machines with older versions of osx - I'll have to figure out how to boot say 10.11 or 10.12

I love the wording and the concept, thank you for the chuckle

Re: Booting a macOS Apple Silicon Kernel in QEMU

#63

This is some very cool hacking, but I’m more interested in knowing how Apple Silicon will run x86 Windows and Linux stuff. Can virtualization software get help from Rosetta 2? Or is QEMU and similar the best we can hope for?

I'm pretty sure it can, they demoed running x86 Windows on the previous keynote.

I don’t think so, it was linux on ARM running an http server if I’m not mistaken

Re: Booting a macOS Apple Silicon Kernel in QEMU

#64

Earlier quoted context omitted.

You don't have to emulate the hardware directly. Since apples kernel is opensource, there's a good chance one could write a kernel driver for another GPU offering a sufficiently compatible interface. Nearly all GPU code will have software rendering fallbacks too, so the driver might just be enough to trigger those fallbacks.

At least with the previous versions of macOS you didn't have to do anything special, the software renderer would just work if you don't have a supported GPU.

And that doesn't change in Big Sur.

Re: Booting a macOS Apple Silicon Kernel in QEMU

#65
post #20

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…

I created a mac in a vm and then I used system migration tool to sort of upload my old macbook pro's consciousness into the cloud. https://youtu.be/86XqF5dqjYc pretty cool I've been thinking about resurrecting my machines with older versions of osx - I'll have to figure out how to boot say 10.11 or 10.12

FYI The person who created that video I believe followed this other person's website devoted to all the details of getting it to work:

https://www.nicksherlock.com/2020/04/installing-macos-catali...

one cool thing is - once you have it installed, you can clone it freely and even remote log into several at once.

I believe they even figured out how to run them on those 32-core or 64-core amd threadrippers.

Re: Booting a macOS Apple Silicon Kernel in QEMU

#66

> 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 e…

This speed advantage won’t apply when emulating Apple silicon on an x86-64 CPU, as discussed here. Emulating ARM on x86-64 is doable, but it has dramatically more overhead. It’s doubtful that a high core count would be enough to overcome this relative to just using Apple silicon.

Is it not the case that x86 Chromebooks emulate the ARM ISA in order to run Android apps? There's certainly a slowdown but it's not horrible. How do they do it?

Then again maybe they just have a good JVM and that solves most of the problem for Android apps?

Re: Booting a macOS Apple Silicon Kernel in QEMU

#67
post #45

Earlier quoted context omitted.

I know you said this sarcastically. The custom GPU is going to be a huge roadblock to get anything graphical to render. Probably never going to happen. Add: actually never say never. Consoles with custom GPUs have been very successfully emulated. So maybe someday.

You don't have to emulate the hardware directly. Since apples kernel is opensource, there's a good chance one could write a kernel driver for another GPU offering a sufficiently compatible interface. Nearly all GPU code will have software rendering fallbacks too, so the driver might just be enough to trigger those fallbacks.

Has anyone ever successfully written a custom GPU driver for macOS? Perhaps there would be more incentive to do so now, but... seems like a pretty massive undertaking.

You could of course use the software renderer—I'd guess that probably still exists on Apple Silicon Macs for safe mode and such—but it wouldn't be pleasant...

Edit: Well, anyone besides nVidia, I suppose. But they're a big company, not a Hackintosh side project.

Re: Booting a macOS Apple Silicon Kernel in QEMU

#68

> 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 e…

Hackintoshes from my experience are usually built as a low cost hobbyist alternative. Most people earning a living from a Mac will sacrifice speed to have stability and support. Plenty of people who want MacOS but cannot afford the official Mac will use it instead.

I remember seeing a build on the tonymacx86 forums where someone built a Hackintosh with 64 cores (dual Xeons, I believe) and 128 GB of RAM - back in 2010. What you'd do with such a beast, I don't know, but that's well above and beyond any hardware Apple has ever sold.

Re: Booting a macOS Apple Silicon Kernel in QEMU

#69
post #15
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?

So in the future macOS will run on arm64e architecture? Could Linux[1] run on that as well? Any chance of seeing more ARM laptops in the future? 1: https://wiki.debian.org/Arm64Port

I think it was Craig Federighi from Apple who said that they don't plan to support booting of any other OS. They want you to use to use their virtual machine manager instead.

Re: Booting a macOS Apple Silicon Kernel in QEMU

#70

Earlier quoted context omitted.

This speed advantage won’t apply when emulating Apple silicon on an x86-64 CPU, as discussed here. Emulating ARM on x86-64 is doable, but it has dramatically more overhead. It’s doubtful that a high core count would be enough to overcome this relative to just using Apple silicon.

Is it not the case that x86 Chromebooks emulate the ARM ISA in order to run Android apps? There's certainly a slowdown but it's not horrible. How do they do it? Then again maybe they just have a good JVM and that solves most of the problem for Android apps?

I feel really stupid, because as the (otherwise happy) owner of a well-specced x86 Chromebook, I've always wondered why most people seemed happy with android apps on chromeOS while I find them laggy and buggy messes. I've just realized it's probably an emulation issue.

So, uh, the slowdown seems pretty bad to me.

Post reply on HN