All of lore.kernel.org
 help / color / mirror / Atom feed
From: Glenn Washburn <development@efficientek.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: The development of GNU GRUB <grub-devel@gnu.org>,
	Daniel Kiper <dkiper@net-space.pl>
Subject: Re: [PATCH] grub-shell: Add flexibility in QEMU firmware handling
Date: Wed, 25 Jan 2023 23:23:56 -0600	[thread overview]
Message-ID: <20230125232356.518521b4@crass-HP-ZBook-15-G2> (raw)
In-Reply-To: <20230124081626.a34tvlfivkc6mpoi@sirius.home.kraxel.org>

On Tue, 24 Jan 2023 09:16:26 +0100
Gerd Hoffmann <kraxel@redhat.com> wrote:

>   Hi,
> 
> > > > Do not load the system 32-bit ARM firmware VARS file because it
> > > > must be writable to prevent a data exception and boot failure.
> > > > So in order to use the VARS file, it must be copied to a
> > > > writable location, but its quite large at 64M and is not needed
> > > > to boot successfully.
> > > 
> > > You can load the VARS file with snapshot=on (and drop
> > > readonly=on) to make things work without copying the file.
> > 
> > Good to know. Do you know of any benefit to doing this (ie. using
> > the installed VARS file)?
> 
> Well, the firmware expects it can write to VARS flash.  ovmf has for
> historical reasons code to cope with non-flash or readonly VARS (so
> -bios works), but armvirt has not.  Which is why you see the failures.

Well armvirt seems to cope fine if there's no VARS flash provided, it
just dies when there is one provided which is readonly.

> snapshot=on allows the guest write to a in-RAM throwaway snapshot,
> which is the same as using a writable temporary copy of the vars
> file, but without the need for a temporary file.

Yeah, I get that, but armvirt doesn't even need the VARS file to run.
You'll see in this patch that for 32-bit arm, no VARS flash is created
when loading the firmware code from the system path or when loading the
firmware code from the grub source directory and the VARS file doesn't
exist. So what benefit is there to providing the system VARS as a flash
device? I can't think of a benefit to using the VARS file if the tests
all pass fine without it.

I'd prefer to have as few dependencies on files not in the GRUB source
as possible. So I like that I don't need to use the system VARS file on
32-bit arm. I wish I could do the same on the other platforms.

This patch does no temporary copying of VARS files on any platform and
all the QEMU tests run as expected. So using "snapshot=on" won't
prevent any copying, which is the main benefit that I see. I do
appreciate this suggestion as it might be useful in other work with
QEMU, I just don't see how its beneficial here.

Glenn


  reply	other threads:[~2023-01-26  5:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-21  6:15 [PATCH] grub-shell: Add flexibility in QEMU firmware handling Glenn Washburn
2023-01-23  9:28 ` Gerd Hoffmann
2023-01-23 20:09   ` Glenn Washburn
2023-01-24  8:16     ` Gerd Hoffmann
2023-01-26  5:23       ` Glenn Washburn [this message]
2023-01-24 21:21     ` Robbie Harwood
2023-01-26  4:53       ` Glenn Washburn

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-all 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=20230125232356.518521b4@crass-HP-ZBook-15-G2 \
    --to=development@efficientek.com \
    --cc=dkiper@net-space.pl \
    --cc=grub-devel@gnu.org \
    --cc=kraxel@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.