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

bugzilla-daemon
2023-05-22T22:15:05Z

Sean Christopherson (seanjc@google.com) changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |seanjc@google.com

--- Comment #4 from Sean Christopherson (seanjc@google.com) ---
There isn't much to go on in the trace. The guest is "voluntarily" rebooting
by writing I/O port 0xcf9, e.g. it's not a triple fault shutdown due to KVM
injecting an exception that the guest doesn't expect.

My best (but nearly blind) guess would be that Windows expects functionality to
exist, e.g. is querying CPUID and MSRs to enumerate platform features, and goes
into recovery mode when the expected feature(s) aren't found. But that's very
much a wild guess.
Unfortunately, trace_kvm_exit doesn't provide guest GPRs, so it's impossible
to glean information from the CPUID, RDMSR, and WRMSR exits, e.g. to see what
Windows appears to be doing.

The easiest way to debug this probably to get the guest into a debugger, even a
rudimentary one like QEMU's interactive monitor. That would hopefully provide
some insight into why Windows decides to reboot.