4 ms·
I needed a FreeBSD/arm64 box, and so I did something similar a few weeks ago based on instructions for running Windows ARM64 on M1. The issue that I have is th
by drewg123 6y ago
I needed a FreeBSD/arm64 box, and so I did something similar a few weeks ago based on instructions for running Windows ARM64 on M1. The issue that I have is that the VM burns tons of battery even when idle.
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.
- tyingq 6y ago"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." 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.de/20210120224444.71840-10-agraf@csgraf.de/ 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.de/ https://patchew.org/QEMU/20210120224444.71840-1-agraf@csgraf...
- floatboth 6y ago> can build world in about 130% of the time of a 32-core Ampere EMAG 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/cortex-a-forum/5695/difference-between-wfi-and-wfe 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/b8ecd5924678f1c04bf1e5b0b7d8996285da06ba#diff-8eb78bad8526b19aa333cb00a0da1b0090f023d80f6b707975f5fbf641b16a49R133-R139 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)