Skip to contentSkip to conversation

hw/uefi: flush variable store to disk in post load

PATCH Superseded Gerd Hoffmann 2 participants 2 messages Mar 13, 2025

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/uefi: flush variable store to disk in post load

Makes live migration more robust. Commit 4c0cfc72b31a ("pflash_cfi01:
write flash contents to bdrv on incoming migration") elaborates in detail on the motivation.

---
 hw/uefi/var-service-core.c | 1 +
 1 file changed, 1 insertion(+)
hw/uefi/var-service-core.c +1 -0
index 8ed8378ab991..4836a0cb8116 100644
@@ -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;
 }
Signature · 1 line
2.48.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Gerd Hoffmann

Makes live migration more robust. Commit 4c0cfc72b31a ("pflash_cfi01:
write flash contents to bdrv on incoming migration") elaborates in detail on the motivation.

---

Thanks!

Quoted 18 lines
 hw/uefi/var-service-core.c | 1 +
 1 file changed, 1 insertion(+)
hw/uefi/var-service-core.c +1 -0
index 8ed8378ab991..4836a0cb8116 100644
@@ -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;
 }
Signature · 1 line
2.48.1