public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Cc: Thomas Lamprecht <t.lamprecht@proxmox.com>,
	qemu-discuss@nongnu.org, edk2-devel-01 <edk2-devel@lists.01.org>
Subject: Re: How to handle pflash backed OVMF FW upgrade and live migration best?
Date: Mon, 5 Mar 2018 09:29:50 +0100	[thread overview]
Message-ID: <a409d4d4-7033-964d-91db-3c48fee87952@redhat.com> (raw)
In-Reply-To: <20180302125345.GA8948@work-vm>

On 03/02/18 13:53, Dr. David Alan Gilbert wrote:
> * Laszlo Ersek (lersek@redhat.com) wrote:
>> CC Dave

>> To give you the simplest example, binaries (and varstores) corresponding
>> to FD_SIZE_2MB and FD_SIZE_4MB are incompatible. If a domain is
>> originally defined on top of an FD_SIZE_2MB OVMF, then it likely cannot
>> be migrated to a host where the same OVMF pathname refers to an
>> FD_SIZE_4MB binary. If you have a mixed environment, then you need to
>> carry both binaries to all hosts (and if you backport fixes from
>> upstream edk2, you need to backport those to both binaries).
>>
>> In addition, assuming the domain is powered down for good (the QEMU
>> process terminates), and you update the domain XML from the FD_SIZE_2MB
>> OVMF binary to the FD_SIZE_4MB binary, you *also* have to
>> delete/recreate the domain's variable store file (losing all UEFI
>> variables the domain has accumulated until then). This is because the
>> FD_SIZE_4MB binary is incompatible with the varstore that was originally
>> created for the FD_SIZE_2MB binary (and vice versa).
> 
> I assume that gives a clear and obvious error message - right?

Unfortunately, no, it doesn't.

The constants that describe the varstore flash location are generated at
build time, and they are cooked into the OVMF binary. Varstore flash
presence is checked / verified, but the flash is not "searched for". In
addition, flash is a pretty early / low-level requirement, so no
display, no serial console etc. So the end result is, you may get a
semi-obscure error message on the QEMU debug port. :( The error message
might vary with what QEMU actually mapped under the addresses that the
OVMF binary expects to belong to the flash chip(s).

Edk2 doesn't really consider "mismatched flash" a condition that can be
handled gracefully; I guess it would be similar to soldering a bad flash
chip to the board and expecting a friendly error message on the PCI
display -- the boot will likely not get that far. ... I'm not defending
the OVMF situation, it is really raw for virt users, and it sucks. :(

Laszlo


      reply	other threads:[~2018-03-05  8:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-01 11:21 How to handle pflash backed OVMF FW upgrade and live migration best? Thomas Lamprecht
2018-03-02 12:19 ` Laszlo Ersek
2018-03-02 12:53   ` Dr. David Alan Gilbert
2018-03-05  8:29     ` Laszlo Ersek [this message]

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=a409d4d4-7033-964d-91db-3c48fee87952@redhat.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