Hi all,
Has anyone had a chance to play with HVF's EL2 support? Looking at Apple's API docs they provide the following Nested virtualization APIs since MacOS 15.0+: hv_vm_config_get_el2_supported hv_vm_config_get_el2_enabled hv_vm_config_set_el2_enabled although they don't give any indication to which silicon supports this. I'm making the assumption that this is available on M4 silicon but it would be nice to know if anyone has verified this or has access to the silicon to check. Wider context: We are interested in this for the SplitAccel patches that Philippe is working on: https://gitlab.com/philmd/qemu/-/tags/split-accel-rfc-v8 (preparatory patches are already on list). The SplitAccel approach works by dynamically switch guests between HVF and TCG so we can emulate things that HVF can't (for example EL3/EL2) but still run the main EL1/EL0 workload at full speed. Currently when we detect the guest enables stage 2 page tables we have to switch to TCG to run because it would be impractical to manage the fragmented layer 1 guest memory to present a useful memory to the layer 2 guest. This works but obviously means that any layer 2 guests run a lot slower. With a fully virtualised EL2 we can just worry about emulating the less frequently called EL3 services. Marc mentioned UTM already has NV support although I couldn't find any references to the above APIs in the utm-edition branch. So to recap: - do we know which Apple silicon supports FEAT_NV2? - has anyone played with enabling it in QEMU or its forks? - what is missing to get this enabled upstream? And I'd follow that with: - is anyone interested in sponsoring some Mac hardware so we could enable proper HVF testing in our CI? Thanks, -- Alex Bennée Virtualisation Tech Lead @ Linaro