QubesOS / qubes-issues

The Qubes OS Project issue tracker
https://www.qubes-os.org/doc/issue-tracking/
536 stars 47 forks source link

EFI boot support for HVM #5767

Open lattice0 opened 4 years ago

lattice0 commented 4 years ago

The problem you're addressing (if any) There's an old tutorial on how to run macOS on qubes (https://groups.google.com/forum/#!msg/qubes-users/RiVntUzgJmY/rXMtXD3WKQAJ) and it uses Unibeast to circumvent the fact that qubes does not boot HVM machines in EFI mode. The Xen version of my Qubes (4.0.1) is 4.8. Xen website lists EFI boot in HVM as available since 4.4. Why doesn't Qubes builds Xen with HVM EFI boot support? Is there a reason?

Describe the solution you'd like If HVM EFI boot were supported, then we could easily port the macOS from KVM from this repo https://github.com/foxlet/macOS-Simple-KVM and run it on Qubes. As I understood, the old macOS Qubes tutorial, besides using Unibeast, rely on a very simple patch on Xen (which I don't know how to verify if landed on Qubes already) and some kexts. I think it should work painlessly.

Where is the value to a user, and who might that user be? I'm gonna take me as an example. I bougth a Ryzen 7 2700X, 32gb of RAM, 512gb SSD, and I had to install Ubuntu instead of Qubes because I need to work on macOS sometimes. I think that if Qubes could run macOS it'd bring more people to the OS.

ps: where can I check the xen source being used in Qubes? I want to check if the macOS patches landed and try to make them land if possible.

marmarek commented 4 years ago

Why doesn't Qubes builds Xen with HVM EFI boot support? Is there a reason?

Mostly - very little interest in using it. Both Linux and Windows in a VM starts just fine in the current setup. As for MacOS, installing it on non-Apple hardware violates its EULA, so this case is further limited to intersection of Apple hardware users and Qubes users.

That said, there is work-in-progress, not documented and untested EFI boot support. You can enable it with:

qvm-features VMNAME uefi 1

(replace VMNAME with actual VM name)

ps: where can I check the xen source being used in Qubes? I want to check if the macOS patches landed and try to make them land if possible.

https://github.com/qubesos/qubes-vmm-xen I recommend looking at xen.spec.in for patches list - there are some comments and logical ordering. Branch xen-4.8 is for Qubes R4.0 and branch xen-4.13 is for upcoming Qubes R4.1.

lattice0 commented 4 years ago

Why doesn't Qubes builds Xen with HVM EFI boot support? Is there a reason?

Mostly - very little interest in using it. Both Linux and Windows in a VM starts just fine in the current setup. As for MacOS, installing it on non-Apple hardware violates its EULA, so this case is further limited to intersection of Apple hardware users and Qubes users.

That said, there is work-in-progress, not documented and untested EFI boot support. You can enable it with:

qvm-features VMNAME uefi 1

(replace VMNAME with actual VM name)

ps: where can I check the xen source being used in Qubes? I want to check if the macOS patches landed and try to make them land if possible.

https://github.com/qubesos/qubes-vmm-xen I recommend looking at xen.spec.in for patches list - there are some comments and logical ordering. Branch xen-4.8 is for Qubes R4.0 and branch xen-4.13 is for upcoming Qubes R4.1.

Thank you. I've started to study qemu internals and Xen because of your response. Both Windows 10 and Ubuntu kinda booted in Qubes in UEFI HVM mode. But after the Windows logo appears, CPU usage keeps high and nothing more happens. Ubuntu shows the "try ubuntu without installing" but after this it halts.

I guess that since OVMF is just a bootloader, if I see the windows logo and if I see the "try ubuntu without installing", it means the boot worked, and since the boot transfers control to the operating system, the OS is the one failing here. But apart from the OVMF booting, I suppose everything stills the same in Xen compared to legacy boot mode in HVM.

Do you have any ideas on how to debug this?

I'm willing to understand the internals of every project involved but there's so many: Qubes, Xen, Qemu, OVMF, that I don't know where to start to debug things.

iamahuman commented 4 years ago

I have observed this issue months ago, but only with two or more vCPUs assigned. A quick VMI debugging session had revealed that both CPUs were stuck in some busy-wait loop, so I guess OVMF might have had some trouble with getting "nonprimary" CPUs to boot up correctly with working IPIs.

ydirson commented 3 years ago

When trying to boot an UEFI image of a Debian install, I'm getting Guest has not initialized the display (yet). Any idea where it could come from / where to look at ? I'm apparently not the only one

OwOday commented 5 months ago

uefi 1 gives me "Guest has not initialized the display (yet)" as well, any image

iamahuman commented 5 months ago

When trying to boot an UEFI image of a Debian install, I'm getting Guest has not initialized the display (yet). Any idea where it could come from / where to look at ? I'm apparently not the only one

uefi 1 gives me "Guest has not initialized the display (yet)" as well, any image

This is a known issue. Please submit any detailed reports in the following issue. Thanks!

@ydirson @OwOday