qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: Jordan Justen <jljusten@gmail.com>
Cc: "edk2-devel@lists.sourceforge.net"
	<edk2-devel@lists.sourceforge.net>,
	qemu-devel <qemu-devel@nongnu.org>,
	Cole Robinson <crobinso@redhat.com>
Subject: Re: [Qemu-devel] [edk2 PATCH] OvmfPkg: split the variable store to a separate file
Date: Fri, 22 Nov 2013 19:43:15 +0100	[thread overview]
Message-ID: <528FA5C3.9070809@redhat.com> (raw)
In-Reply-To: <CAFe8ug_RH_k4fWqTfCbkBbYFmbFJcWB9+i_Y_wR4X=pYLuVf7Q@mail.gmail.com>

On 11/22/13 18:37, Jordan Justen wrote:
> On Thu, Nov 21, 2013 at 2:21 PM, Laszlo Ersek <lersek@redhat.com> wrote:
>> Split the variable store off to a separate file when SPLIT_VARSTORE is
>> defined.
> 
> Is the goal to allow the central OVMF to be updated so the VM will
> automatically be running the newest firmware? (While preserving
> variables)

Yes.

In some distros this is what happens (*) when you uprage the
seabios(-bin) package on the host system. When you reboot any VM on it,
it will see the upgraded bios.

(*) Except of course you have no variable store.

The bios binary (the file belonging to its containing package) is also
owned by root and has some nice file mode bits and SELinux permissions:

$ ls -lL /usr/share/qemu-kvm/bios.bin
-rw-r--r--. 1 root root 131072 2013-11-20 14:55:29 +0100
/usr/share/qemu-kvm/bios.bin

$ ls -lLZ /usr/share/qemu-kvm/bios.bin
-rw-r--r--. root root system_u:object_r:usr_t:s0
/usr/share/qemu-kvm/bios.bin

These are distinctly different from what libvirt sets for the private
image files that underneath the VM's disks.

OVMF.fd would correspond to "bios.bin" above, and NVVARSTORE.fd is a
private disk file.

> I think in your scenario, you are assuming some VM manager will build
> the command line parameters. But, couldn't the VM manager also merge
> flash updates into the *single* VM specific flash image? Then QEMU
> would not need to be changed.

Correct. I floated this idea to the libvirt guys and Cole (of
virt-manager fame). The merging proposal was frowned upon. (Also, if
we're talking explicit reflashing, maybe the user should click a button
on virt-manager to request the update... Not sure.)

So basically these patches are just the non-merging alternative that is
perceived as more suitable for some distros.

> This might also enable a 'feature' where the particular VM instance
> can choose to not update the firmware when the central OVMF is
> updated.

Correct. (See the click the button thing above.) However right now VMs
have no choice, and auto-upgrading their OVMF wouldn't be a step back.
But, your remark is 100% valid.

> If we decided splitting was a good thing, then it would be nice to
> just always build the split and full images. I'm not sure .fdf can
> handle this though.

I think it can, if we add all three FDs with different names (like
OVMF.fd, OVMF_SPLIT.fd, NVVARSTORE.fd). I think the build process reuses
the FV files if there are multiple referring FDs -- I seem to recall
that's already happening between MEMFD.fd and OVMF.fd, no?

> Seems like build.sh could be tweaked if .fdf is
> not up to the task.

Certainly -- just invoke it twice with different params.

OTOH building all three FDs per default might be confusing for
end-users. We know for a fact that they usually don't read the README
(or not thoroughly enough). If we only give them one output file per
default, that's less potential for confusion.

But I can certainly post a version where all three files are built per
default, if that's what you prefer (and aren't opposed to the idea in
general).

Thanks!
Laszlo

  reply	other threads:[~2013-11-22 18:43 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-21 22:21 [Qemu-devel] [qemu PATCH] hw/i386/pc_sysfw: support more than one flash drive Laszlo Ersek
2013-11-21 22:21 ` [Qemu-devel] [edk2 PATCH] OvmfPkg: split the variable store to a separate file Laszlo Ersek
2013-11-22  9:27   ` [Qemu-devel] [edk2] " Paolo Bonzini
2013-11-22 11:46     ` Laszlo Ersek
2013-11-22 11:56       ` Paolo Bonzini
2013-11-22 12:12         ` Laszlo Ersek
2013-11-22 17:37   ` [Qemu-devel] " Jordan Justen
2013-11-22 18:43     ` Laszlo Ersek [this message]
2013-11-22 20:51       ` Jordan Justen
2013-11-22 20:54         ` Eric Blake
2013-11-22 21:18           ` Jordan Justen
2013-11-22 21:40         ` Laszlo Ersek
2013-11-22 21:45         ` Laszlo Ersek
2013-11-21 22:26 ` [Qemu-devel] [qemu PATCH] hw/i386/pc_sysfw: support more than one flash drive Eric Blake
2013-11-21 22:33   ` Laszlo Ersek
2013-11-22 12:21 ` Markus Armbruster
2013-11-22 18:30   ` Laszlo Ersek
2013-11-25 15:22     ` Markus Armbruster
2013-11-25 19:45       ` Laszlo Ersek
2013-11-26 12:36         ` Markus Armbruster
2013-11-26 13:32           ` Laszlo Ersek
2013-11-26 17:54             ` Jordan Justen
2013-11-27 13:52               ` Markus Armbruster
2013-11-27 14:01                 ` Laszlo Ersek
2013-11-27 14:45                   ` Markus Armbruster
2013-11-27 15:18                     ` Laszlo Ersek
2013-11-27 17:22                       ` Markus Armbruster
2013-11-27 17:34                         ` Laszlo Ersek
2013-11-27 20:35                           ` Markus Armbruster
2013-11-26 13:41         ` [Qemu-devel] [edk2] " Paolo Bonzini
2013-11-26 13:53           ` Laszlo Ersek
2013-11-26 14:06             ` Paolo Bonzini
2013-11-26 12:53     ` [Qemu-devel] " Markus Armbruster
2013-11-26 13:27       ` Laszlo Ersek
2013-11-27 13:49         ` Markus Armbruster
2013-11-27 14:01           ` Laszlo Ersek
2013-11-25 15:32 ` Markus Armbruster
2013-11-25 20:17   ` Laszlo Ersek
2013-11-26 13:11     ` Markus Armbruster
2013-11-26 13:39       ` Laszlo Ersek
2013-11-26 15:35         ` Markus Armbruster

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=528FA5C3.9070809@redhat.com \
    --to=lersek@redhat.com \
    --cc=crobinso@redhat.com \
    --cc=edk2-devel@lists.sourceforge.net \
    --cc=jljusten@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /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;
as well as URLs for NNTP newsgroup(s).