From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: [edk2-devel] A problem with live migration of UEFI virtual machines To: "wuchenye1995 ,devel@edk2.groups.io From: "Laszlo Ersek" X-Originating-Location: Veresegyhaz, Pest megye, HU (188.143.95.160) X-Originating-Platform: Linux Firefox 52 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Mon, 10 Feb 2020 12:20:59 -0800 References: In-Reply-To: Message-ID: <12553.1581366059422195003@groups.io> Content-Type: multipart/alternative; boundary="q4C2hwYiCFukhWk1UmVE" --q4C2hwYiCFukhWk1UmVE Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable (Replying through the groups.io web interface, just this one time) wuchenye1995 wrote: > Hi all, > > We found a problem with live migration of UEFI virtual machines due to > size of OVMF.fd changes. > > Specifically, the size of OVMF.fd in edk with low version such as > edk-2.0-25 is 2MB while the size of it in higher version such as > edk-2.0-30 is 4MB. > > When we migrate a UEFI virtual machine from the host with low version > of edk2 to the host with higher one, qemu component will report an > error in function qemu_ram_resize while checking size of ovmf_pcbios: > Length mismatch: pc.bios: 0x200000 in !=3D 0x400000: Invalid argument. > > We want to know how to solve this problem after updating the version > of edk2. You can't solve it. The 2MB and 4MB builds of OVMF are fundamentally incompatible with each other. It's actually beneficial that QEMU cleanly prevents such attempts at migration; otherwise you'd see misbehavior that would be much less graceful. Please see commit b24fca05751f ("OvmfPkg: introduce 4MB flash image (mainly) for Windows HCK", 2017-05-05) for more info: https://github.com/tianocore/edk2/commit/b24fca05751f This is the reason why the Fedora edk2 package build script (=3D RPM spec file) uses "-D FD_SIZE_2MB" explicitly. Thanks Laszlo --q4C2hwYiCFukhWk1UmVE Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable (Replying through the groups.io web interface, just this one time)
wuchenye1995 wrote:

> Hi all,
>
> We found= a problem with live migration of UEFI virtual machines due to
> si= ze of OVMF.fd changes.
>
> Specifically, the size of OVMF.f= d in edk with low version such as
> edk-2.0-25 is 2MB while the siz= e of it in higher version such as
> edk-2.0-30 is 4MB.
>> When we migrate a UEFI virtual machine from the host with low versi= on
> of edk2 to the host with higher one, qemu component will repor= t an
> error in function qemu_ram_resize while checking size of ovm= f_pcbios:
> Length mismatch: pc.bios: 0x200000 in !=3D 0x400000: In= valid argument.
>
> We want to know how to solve this probl= em after updating the version
> of edk2.

You can't solve= it. The 2MB and 4MB builds of OVMF are fundamentally
incompatible wit= h each other. It's actually beneficial that QEMU cleanly
prevents such= attempts at migration; otherwise you'd see misbehavior
that would be = much less graceful.

Please see commit b24fca05751f ("OvmfPkg: in= troduce 4MB flash image
(mainly) for Windows HCK", 2017-05-05) for mor= e info:

  https://github.com/tianocore/edk2/commit/b24fca05= 751f

This is the reason why the Fedora edk2 package build script= (=3D RPM spec
file) uses "-D FD_SIZE_2MB" explicitly.

Than= ks
Laszlo --q4C2hwYiCFukhWk1UmVE--