How to run FreeBSD 13 in QEMU on Apple Silicon Mac
gist.github.com
gist.github.com
It was explained to me that there are 2 different instructions on ARM to say "i'm idle, wake me up if something happens" (like x86 mwait), and Apple M1 uses one, while everybody else uses the other. Is this fixed in either FreeBSD or Qemu at this point?
BTW, I'm super impressed that a 4-core VM on my M1 13" MBP can build world in about 130% of the time of a 32-core Ampere EMAG.
That had me curious, so I searched around a bit.
And I found one QEMU patch that seems like the right one: https://patchew.org/QEMU/20210120224444.71840-1-agraf@csgraf...
This appears to be his latest/greatest bundle: https://patchew.org/QEMU/20210120224444.71840-1-agraf@csgraf...
This says more about the eMAG than the M1, to be honest :D The APM X-Gene derived cores in the eMAG are far behind current cores from everyone else. The new Ampere Altra is using stock Arm Neoverse cores. (Which makes me wonder if all they got out of the APM acquisition was just one dead-end generation of product…)
> Is this fixed in either FreeBSD or Qemu at this point?
Not in FreeBSD for sure, as an obsessive commit watcher I can say I haven't seen any M1 quirks land.
> 2 different instructions on ARM to say "i'm idle, wake me up if something happens" (like x86 mwait), and Apple M1 uses one, while everybody else uses the other
Everybody should use both in different circumstances: https://community.arm.com/developer/ip-products/processors/f...
But according to Corellium's Linux work "the CPU tends to lose state" when using WFI for system idle: https://github.com/corellium/linux-m1/commit/b8ecd5924678f1c...
Not sure why this would have an impact on VM idling… (upd: yeah it's QEMU-side stuff, see other comments)
That leaves just the firewire one as possibly an issue.
Though I get the general point that hardware drivers could be an issue. Perhaps, though, the upside of the M1 is sufficient incentive for people to figure it out.
What I now have is just a boot to console. I haven't decided on a login manager yet, so I just run `sway` to get to the desktop. I run sway window manager on wayland. I installed rust, emacs, vim, a music player ncmpcpp and firefox. It feels like this old laptop got lots of energy from this new setup.
[link redacted]
Would it be possible to run FreeBSD similarly without qemu?
As far as I could tell, the Virtualization framework is Linux specific(?)
https://developer.apple.com/documentation/virtualization
And in the guide in the OP, we are using some patches that someone wrote so that QEMU uses the Hypervisor framework.
https://developer.apple.com/documentation/hypervisor
And from what I understand but please correct me if I am wrong, the Virtualization framework is actually a layer on top of the Hypervisor framework. So if I am correct in my understanding the way that the QEMU patches do it should in theory be comparable in performance to the way that the Virtualization framework does it.
I would like to do some benchmarking of Linux on the Virtualization framework versus Linux on QEMU to see if there is a difference. However, good benchmarking is no easy feat. So ideally someone else who is really good at benchmarking Linux would do this and write about it.
https://news.ycombinator.com/from?site=gist.github.com
Learn to live in attention economy with HTTP.
If it’s not useful to anyone then I know not to spend time on that. Short though as the guide is, and even though it is based on much hard work of others, it still took time to make, much in part because when I write stuff like this I spend a lot of time actually redoing steps to ensure to the best of my ability that what I am writing will work for others too. So I like to know that people find it useful.
The motivation to make a guide for others to follow is that it should be useful for others too.
What I am saying is, when it’s useful for others it’s worth spending the time on writing up how to do it and share it with others.
GitHub stars and HN upvotes are two different unrelated things.
What you like/star today may change tomorrow, but your public association with it will remain.
- I star a FreeBSD project on GitHub.
- The author changes the project to something racist.
- My GitHub profile now shows that I've starred a racist project.
I used to have a friend who turned out to be very different from what I had thought. And she started interpreting stuff that I had posted to my Facebook in all sorts of... well frankly crazy ways. And she turned really unpleasant, and I ended up blocking her across all channels where she was contacting me.
So I know first hand what it is like to be treated in a very hostile manner by someone.
I still think about that sometimes. And I think of people who have not just one person turn against them but whole groups of people turn against them. And I don’t have an answer for what to do about it.
But my current thinking is that we should live our lives as we see fit and not be deterred by anyone who has the wrong picture and who insists on holding on to that picture.
And to instead focus as much as possible on the people that you have healthy interactions with.
What that means is, to be open for new things and new ideas still, and engaging in discussion, but if you encounter someone who is too antagonistic, stop interacting with them.
So in the example of having associated with a project or organization or group or something, that is taken over and changes into something bad, disassociate from them when you are made aware of it, and to anyone that asks about it say as it is that they weren’t like that before and that you have left them.
Anyone that continues to insist that you have ties to something you don’t, cut off contact. Don’t try to defend against them or anything.
But like I said, for people that have a whole group of people turn on them I don’t know what they should do.