libkrun icon indicating copy to clipboard operation
libkrun copied to clipboard

Implement support for HVF Nested Virtualization

Open slp opened this issue 9 months ago • 1 comments

Apple introduced Nested Virt (EL2) support in macOS Sequoia, available
on Apple Silicon devices based on M3 and later SoCs.

This commit introduces the infrastructure to enable Nested Virt on
libkrun. The biggest change is setting up the vCPU reset registers to
values that are acceptable in EL2 according. This isn't easy since HVF
doesn't document its expectations, but the current implementation allows
the guest to boot in EL2 and run a nested guest.

Instead of linking directly against the new functions, we're using
libloader again to find the new symbols, to avoid breaking the binaries
in Sonoma.

slp avatar Mar 26 '25 08:03 slp

This depends on #280, creating this as a draft until it's merged.

slp avatar Mar 26 '25 08:03 slp

Rebased, working and ready to be reviewed!

slp avatar Apr 01 '25 10:04 slp