Skip to contentSkip to conversation

tools/libs/light: fix xl save -c handling

PATCH-for-4.15 Juergen Gross 4 participants 4 messages Feb 19, 2021

lore
Share & tools
lore
#0 lore raw

libxl_domain_resume() won't work correctly for the case it was called due to a "xl save -c" command, i.e. to continue the suspended domain.

The information to do that is not saved in libxl__dm_resume_state for non-HVM domains.

Fixes 6298f0eb8f443 ("libxl: Re-introduce libxl__domain_resume")
---
 tools/libs/light/libxl_dom_suspend.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/libs/light/libxl_dom_suspend.c +2 -1
index 25d1571895..f7823bbc8f 100644
@@ -630,12 +630,13 @@ void libxl__domain_resume(libxl__egc *egc,
         goto out;
     }
 
+    dmrs->suspend_cancel = suspend_cancel;
+
     if (type != LIBXL_DOMAIN_TYPE_HVM) {
         rc = 0;
         goto out;
     }
 
-    dmrs->suspend_cancel = suspend_cancel;
     dmrs->dm_resumed_callback = domain_resume_done;
     libxl__dm_resume(egc, dmrs); /* must be last */
     return;
Signature · 1 line
2.26.2
Reviewed-by
#1 lore raw
Quoted 9 lines · Juergen Gross

libxl_domain_resume() won't work correctly for the case it was called due to a "xl save -c" command, i.e. to continue the suspended domain.

The information to do that is not saved in libxl__dm_resume_state for non-HVM domains.

Fixes 6298f0eb8f443 ("libxl: Re-introduce libxl__domain_resume")
#2 lore raw
Quoted 4 lines · Jan Beulich
Quoted 3 lines · Juergen Gross

libxl_domain_resume() won't work correctly for the case it was called due to a "xl save -c" command, i.e. to continue the suspended domain.

Quoted 8 lines
Quoted 6 lines

The information to do that is not saved in libxl__dm_resume_state for non-HVM domains.

Fixes 6298f0eb8f443 ("libxl: Re-introduce libxl__domain_resume")

Works with both xl save and libvirt now.

Thanks!

Signature · 3 lines
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
Acked-by
#3 lore raw
In reply to Juergen Gross
Quoted 9 lines · Juergen Gross

libxl_domain_resume() won't work correctly for the case it was called due to a "xl save -c" command, i.e. to continue the suspended domain.

The information to do that is not saved in libxl__dm_resume_state for non-HVM domains.

Fixes 6298f0eb8f443 ("libxl: Re-introduce libxl__domain_resume")