summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2025-03-19 15:11:53 +0100
committerGerd Hoffmann <kraxel@redhat.com>2025-03-21 12:00:38 +0100
commit560429fd746adf04b57237c3c4a38ecfd906c592 (patch)
treeb6b1b5726d8a8d4b7e4d36b16378b5efee8452ea
parent1dae461a913f9da88df05de6e2020d3134356f2e (diff)
downloadfocaccia-qemu-560429fd746adf04b57237c3c4a38ecfd906c592.tar.gz
focaccia-qemu-560429fd746adf04b57237c3c4a38ecfd906c592.zip
hw/uefi: flush variable store to disk in post load
Make live migration more robust.  Commit 4c0cfc72b31a ("pflash_cfi01:
write flash contents to bdrv on incoming migration") elaborates in
detail on the motivation.

Cc: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-ID: <20250319141159.1461621-2-kraxel@redhat.com>
-rw-r--r--hw/uefi/var-service-core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/uefi/var-service-core.c b/hw/uefi/var-service-core.c
index 8ed8378ab9..4836a0cb81 100644
--- a/hw/uefi/var-service-core.c
+++ b/hw/uefi/var-service-core.c
@@ -29,6 +29,7 @@ static int uefi_vars_post_load(void *opaque, int version_id)
     uefi_vars_state *uv = opaque;
 
     uefi_vars_update_storage(uv);
+    uefi_vars_json_save(uv);
     uv->buffer = g_malloc(uv->buf_size);
     return 0;
 }