4 ms·
Only for AArch64 guests though So not so interesting for me https://wiki.qemu.org/Features/HVF https://wiki.qemu.org/Features/HVF
by PikachuEXE 5y ago
Only for AArch64 guests though
So not so interesting for me
https://wiki.qemu.org/Features/HVF https://wiki.qemu.org/Features/HVF
- duskwuff 5y agoWell, yes. HVF (Hypervisor.framework) passes through to the native CPU, which can't run code for other architectures.
- qalmakka 5y agoUnless Apple implements some kind of support for the x86 ISA in its CPUs (which is unrealistic), hvf will always only support arm and aarch64 guests. Running a non-native architecture requires emulation, which will always be slower than just running a guest on the native CPU.
- vbezhenar 5y agoRosetta emulates x86 quite fast. I think that it's matter of engineering effort required to implement that emulation on a VM level.
- djxfade 5y agoRosetta recompiles ahead of time. That's why it's so fast. Would probably not be possible with a full VM
- qalmakka 5y agoThis, exactly. Rosetta 2 emulates x86_64 Darwin binaries on AArch64 Darwin - it means that tricks like jumping to native code as soon as possible are feasible. For instance, you can call a native counterpart of a system library instead of emulating it down to the syscall level, and generate native code that calls into that. Running kernel level code requires you to emulate an entire machine, which is way more complicated than just emulating the userland like Rosetta does. Running an unmodified OS kernel requires emulation of stuff like interrupts, firmware, peripherals ... Yes, you can dynamically JIT compile some codepaths into native code, which is something that AFAIK most emulator already do, but there's still a much higher performance cap than with something like Rosetta or Wine.
- tinus_hn 5y agoThis would definitely be possible with a full VM, it’s what VMware did before hardware accelerated virtualization became a thing. It’s just more difficult and less efficient than accelerated virtualization.
- yjftsjthsd-h 5y agoWell no, you can't use the native virtualization on a different architecture. You should be able to use TCG acceleration, though.