-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows guest crashes when I load windows boot manager after loading MiniVisor, right after when ExitBootServicesHandler is called #15
Comments
I found the root cause of it. It was because I loaded the minivisor efi module by adding a new boot entry (by using https://github.com/Metabolix/HackBGRT project), and booting from that and then adding the code for loading the next boot entry which is Windows. Turns out it seems like the first EFI module that gets loaded by the firmware cannot be a Runtime driver (but idk), and needs to be a EFI application (loader), so I wrote a loader for it and it fixed the issue. Although I'm not sure if this limitation even exists or not, but looking at other projects most of them write a loader EFI application to load the Runtime EFI driver for some reason? |
Thank you for reporting back to me with the root cause. Glad to hear it resolved. It is an interesting discovery about the boot entry. I did not look into the spec but given that it starts a UEFI program, it makes sense that UEFI drivers do not work. My guess on the reason of many projects using loader apps is flexibility. To load a runtime driver, you need to enter the UEFI shell, which requires manual operations and disabling secure boot. If you build a loader as an UEFI app, you could drop it off and make it work as you intended. If you sign it and edit secure boot |
Unfortunately the problem happened again, this time in a KVM windows 11 VM. It is exactly similar to: Right after Would you mind giving it a try with KVM and see if it happens for you too or not? |
Unfortunately, I will not going to have a time to test it out with KVM. I do not have much experience with KVM, but perhaps you can debug the guest and see what guest RIP looks like. |
I get the following error whenever I try to load windows boot manager after I have loaded the MiniVisor EFI Driver, exactly right after
ExitBootServicesHandler
is called and windows logo is shown:Tried it with Windows 10 and 11.
Seems to be related to
#12
but this also happens when I set the number of virtual cores for the guest to 1.
secure boot is off, VBS is off, and nested virtualization (Virtualize VT-X) is turned on in VMware workstation config for the VM.
This stops happening when I change the EFI code and make it not turn on hypervisor on CPU cores (via commenting
EnableHypervisorOnAllProcessors
).The text was updated successfully, but these errors were encountered: