[Bug 217307] New: windows guest entering boot loop when nested virtualization enabled and hyperv installed

bugzilla-daemon
2023-04-06T10:39:31Z

Bug ID: 217307
Summary: windows guest entering boot loop when nested
virtualization enabled and hyperv installed
Product: Virtualization
Version: unspecified
Hardware: Intel
OS: Linux
Status: NEW
Severity: high
Priority: P1
Component: kvm
Assignee: virtualization_kvm@kernel-bugs.osdl.org
Reporter: webczat@outlook.com
Regression: No

Environment:
My host is fedora 37, currently running linux 6.2.5, but this is present for a
long time.
CPU is intel alderlake, core i7 12700h.
The os has kvm_intel module loaded with nested=y parameter, so nested
virtualization is enabled.
The guest vm is a q35 x86_64 vm with cpu=host set, running on qemu version
7.0.0, accel=kvm, smm, uefi, secureboot and tpm enabled.
Command line for qemu is attached to the bug.
VM is running a windows 11 pro 64 bit os.

What happens is that the moment I install any HyperV features on the windows11
os and then reboot, it does not boot again.
Basically it self reboots once and goes into recovery. Because I am blind I
cannot really say whether it shows some blue screen of death before rebooting,
but I actually don't think so.
The only thing i can do to make it work is to disable nested virtualization.
There is no known workaround which leaves it enabled, unless i disable the vmx
cpu feature, but that's not what I want to achieve, my goal is mostly to
run/test wsl2 or to play with docker.