From: "Pedro Falcato" <pedro.falcato@gmail.com>
To: edk2-devel-groups-io <devel@edk2.groups.io>, gerow@google.com
Subject: Re: [edk2-devel] Running OVMF on crosvm
Date: Fri, 17 Jun 2022 01:06:29 +0100 [thread overview]
Message-ID: <CAKbZUD2p40WxrBFjYNRN_cGaAMUh1C-MJ3zNSBXk7jZ51jTrCg@mail.gmail.com> (raw)
In-Reply-To: <5M1s.1655422154796505401.yfpp@groups.io>
[-- Attachment #1: Type: text/plain, Size: 2343 bytes --]
Hi Mike,
What's the point of upstreaming firmware for crosvm? Isn't crosvm supposed
to be a "thin" hypervisor that runs the kernel directly?
Thanks,
Pedro
On Fri, Jun 17, 2022 at 12:40 AM Mike Gerow via groups.io <gerow=
google.com@groups.io> wrote:
> Hi Folks,
>
> For the last few months I've been using OVMF with crosvm
> <https://chromium.googlesource.com/chromiumos/platform/crosvm/+/HEAD/README.md#:~:text=crosvm%20is%20a%20virtual%20machine,on%20the%20Chrome%20OS%20platform.>
> to give it the ability to boot a UEFI OS image in a UEFI environment, and
> it's been working fantastically! Eventually I'd like to get secure boot
> working, but I haven't fully begun exploring that yet. I just wanted to
> post here to figure out how I might go about making crosvm properly
> supported within OVMF.
>
> As you might guess, OVMF didn't boot out of the box and I had to do quite
> a few hacks to get it to work. All the changes are attached as a diff, but
> I'll list the main points out here:
>
> * Switch TimerLib from the ACPI-based ones
> like OvmfPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.inf
> to MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf since
> crosvm doesn't provide these methods
> * Hack out the RTC dependency completely, since for reasons I haven't yet
> figured out crosvm hangs OVMF tries to access it
> * Disable bus enumeration since crosvm doesn't support moving PCI BARs
> around, which causes it to hang
> * Remove VirtioFsDxe dependency as crosvm seems to choke on certain things
> it's doing too
> * Manually searching for ACPI tables instead of using PVH
>
> And one major theme of some of the other changes: removing conditionals
> that checked if we're cloud-hypervisor and just doing things the
> cloud-hypervisor way (which happens to work under crosvm, for reasons that
> are readily apparent given the nature of cloud-hypervisor and crosvm).
>
> Clearly this isn't upstreamable at this point, but I'd like eventually go
> that direction. I think a lot of these are just bugs in crosvm that'll need
> to be fixed, but for the cloud-hypervisor conditionals case I'd need to
> teach OVMF to detect when we're running under crosvm and act appropriately.
>
> In either case, I appreciate your attention and any feedback you might
> have on what I'm trying to do here.
>
>
>
--
Pedro Falcato
[-- Attachment #2: Type: text/html, Size: 2944 bytes --]
next prev parent reply other threads:[~2022-06-17 0:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-16 23:29 Running OVMF on crosvm Mike Gerow
2022-06-16 23:45 ` [edk2-devel] " Andrew Fish
2022-06-17 0:06 ` Pedro Falcato [this message]
2022-06-17 1:55 ` Mike Gerow
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAKbZUD2p40WxrBFjYNRN_cGaAMUh1C-MJ3zNSBXk7jZ51jTrCg@mail.gmail.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox