Skip to content
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

Replace qboot with OVMF/EDK2 as guest firmware #262

Open
tylerfanelli opened this issue Jan 30, 2025 · 5 comments
Open

Replace qboot with OVMF/EDK2 as guest firmware #262

tylerfanelli opened this issue Jan 30, 2025 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@tylerfanelli
Copy link
Member

In libkrun-sev, we package a custom qboot, kernel, and init. To support upstream kernels, we require the use of OVMF/EDK2 as firmware. It would be a bit customized, as we aren't 100% compatible with QEMU.

@tylerfanelli tylerfanelli added the enhancement New feature or request label Jan 30, 2025
@tylerfanelli tylerfanelli self-assigned this Jan 30, 2025
@tylerfanelli
Copy link
Member Author

@slp I wonder if this will slow down boot times. Does the qemu-microvm type use OVMF/EDK2?

@jakecorrenti
Copy link
Member

jakecorrenti commented Jan 30, 2025

FWIW TDX is built with OVMF in mind, so this would be useful in that sense i.e. less overhead on our end to keep up with changes in qboot

TDX does require ACPI and PCI to be supported, so that might be one of the "customized" bits you were mentioning

@slp
Copy link
Contributor

slp commented Jan 31, 2025

@slp I wonder if this will slow down boot times. Does the qemu-microvm type use OVMF/EDK2?

A little bit, but compared with the amount of time required to inject the payloads and accept the pages, it's barely significant.

FWIW TDX is built with OVMF in mind, so this would be useful in that sense i.e. less overhead on our end to keep up with changes in qboot

TDX does require ACPI and PCI to be supported, so that might be one of the "customized" bits you were mentioning

Does TDX require ACPI and PCI, or are those requirements of OVMF for TDX?

All in all, I think we should evaluate the costs of supporting OVMF for libkrun, in both SNP and TDX variants, versus extending qboot to support booting the primary and secondary processors without patches. I wouldn't be surprised if the latter ends becoming cheaper, given that half the work is already there and what we need from the FW is just some very minor functionality.

@jakecorrenti
Copy link
Member

@slp I wonder if this will slow down boot times. Does the qemu-microvm type use OVMF/EDK2?

A little bit, but compared with the amount of time required to inject the payloads and accept the pages, it's barely significant.

FWIW TDX is built with OVMF in mind, so this would be useful in that sense i.e. less overhead on our end to keep up with changes in qboot
TDX does require ACPI and PCI to be supported, so that might be one of the "customized" bits you were mentioning

Does TDX require ACPI and PCI, or are those requirements of OVMF for TDX?

As far as I understand it, they are requirements of OVMF for TDX. I was debugging this with Intel, and they suggested it should be possible to modify the TDX device initialization code to not use them and get it to work.

All in all, I think we should evaluate the costs of supporting OVMF for libkrun, in both SNP and TDX variants, versus extending qboot to support booting the primary and secondary processors without patches. I wouldn't be surprised if the latter ends becoming cheaper, given that half the work is already there and what we need from the FW is just some very minor functionality.

@tylerfanelli
Copy link
Member Author

All in all, I think we should evaluate the costs of supporting OVMF for libkrun, in both SNP and TDX variants, versus extending qboot to support booting the primary and secondary processors without patches. I wouldn't be surprised if the latter ends becoming cheaper, given that half the work is already there and what we need from the FW is just some very minor functionality.

If we can support running unmodified kernels this way, then I'm all for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants