mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
A Windows guest that launches nested Hyper-V (for example to run WSL2) fails to start its hypervisor on cloud-hypervisor's HW-reduced-ACPI FADT. hvloader's hypervisor-launch path (0x18000f01c -> 0x180015628 -> 0x180015788) registers every legacy PM register block via 0x1800158dc and rejects any block whose GAS address is 0 with status 8 (STATUS_INVALID_DEVICE_REQUEST). hvix64 then never launches and HypervisorPresent stays False. The HW-reduced FADT leaves those blocks zero. Emit valid PM1a event/control blocks (I/O ports, lengths and X_GAS) in the FADT and reserve those ports in the I/O allocator so nothing else claims them. The HW-reduced guest OS ignores the legacy ports; only hvloader's ACPI validation reads them. These blocks are only useful to a guest that itself runs an enlightened hypervisor, so emit them only when both guest nesting and the Hyper-V enlightenments are enabled (--cpu nested=on,kvm_hyperv=on). Signed-off-by: doge <me@crackerben.com>