[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen staging] tools/libs/light: fix xl save -c handling



commit 87a067fd8f4d4f7c6be02c3d38145115ac542017
Author:     Juergen Gross <jgross@xxxxxxxx>
AuthorDate: Fri Feb 19 15:13:37 2021 +0100
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Fri Feb 19 17:52:41 2021 +0000

    tools/libs/light: fix xl save -c handling
    
    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")
    Reported-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
    Tested-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
    Acked-by: Wei Liu <wl@xxxxxxx>
---
 tools/libs/light/libxl_dom_suspend.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/libs/light/libxl_dom_suspend.c 
b/tools/libs/light/libxl_dom_suspend.c
index 25d1571895..f7823bbc8f 100644
--- a/tools/libs/light/libxl_dom_suspend.c
+++ b/tools/libs/light/libxl_dom_suspend.c
@@ -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;
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.