From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40561) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUrzw-0002du-ID for qemu-devel@nongnu.org; Fri, 19 Sep 2014 02:49:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XUrzp-0007Jg-2T for qemu-devel@nongnu.org; Fri, 19 Sep 2014 02:48:52 -0400 Received: from mail-pa0-f51.google.com ([209.85.220.51]:60051) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUrzo-0007JP-T2 for qemu-devel@nongnu.org; Fri, 19 Sep 2014 02:48:44 -0400 Received: by mail-pa0-f51.google.com with SMTP id eu11so3207860pac.38 for ; Thu, 18 Sep 2014 23:48:39 -0700 (PDT) Message-ID: <541BD1BC.8090501@ozlabs.ru> Date: Fri, 19 Sep 2014 16:48:28 +1000 From: Alexey Kardashevskiy MIME-Version: 1.0 References: <1408789147-18675-1-git-send-email-lersek@redhat.com> <53FB1108.6050400@redhat.com> In-Reply-To: <53FB1108.6050400@redhat.com> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 0/2] pflash (UEFI varstore) migration shortcut for libvirt List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , Laszlo Ersek , Michal Privoznik , Eric Blake , "Daniel P. Berrange" , Kevin Wolf , Stefan Hajnoczi , Juan Quintela , David Gilbert , qemu devel list , David Gibson On 08/25/2014 08:33 PM, Paolo Bonzini wrote: > Il 23/08/2014 12:19, Laszlo Ersek ha scritto: >> Libvirt is growing support for x86_64 OVMF guests: >> >> http://www.redhat.com/archives/libvir-list/2014-August/msg01045.html >> >> An important feature of such guests is the persistent store for >> non-volatile UEFI variables. This is implemented with if=pflash drives. >> The referenced libvirt patchset sets up the varstore files for >> single-host use. >> >> Wrt. migration, two choices have been considered: >> (a) full-blown live storage migration for the drives backing pflash >> devices, >> (b) vs. a shortcut that exploits the special nature of pflash drives >> (namely, their minuscule size, and a RAMBlock that keeps the full >> contents of each pflash drive visible to the guest, and is >> up-to-date, at all times.) >> >> Patch 1/2 is a trivial cleanup (some DPRINTF() calls in pflash_cfi01 >> have bit-rotted). Patch 2/2 seeks to implement choice (b), which is what >> the libvirt patchset relies on for migration. >> >> Thanks, >> Laszlo >> >> Laszlo Ersek (2): >> pflash_cfi01: fixup stale DPRINTF() calls >> pflash_cfi01: write flash contents to bdrv on incoming migration >> >> hw/block/pflash_cfi01.c | 18 ++++++++++++++++-- >> 1 file changed, 16 insertions(+), 2 deletions(-) >> > > Reviewed-by: Paolo Bonzini > > Alexey/David, I think hw/nvram/spapr_nvram.c should do the same. It > doesn't have a vmstate, but you can probably use > qemu_add_vm_change_state_handler to the same effect. I am not sure I understood the proposal correctly. Right now we use NVRAM on sPAPR as: -drive id=id3,if=none,file=qemu_nvram.img -global spapr-nvram.drive=id3 So the NVRAM file is BlockDriverState and HMP's "migrate -b" copies the content just fine. What is missing here? Thanks. -- Alexey