tools/libxc: Set HVM_PARAM_CONSOLE_EVTCHN during restore
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>
Thu, 23 Apr 2015 02:49:18 +0000 (22:49 -0400)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 5 May 2015 11:30:17 +0000 (12:30 +0100)
When resuming, the guest needs to check whether the port has changed. HVM
guests use this parameter to get the port number.

(We can't always use xenstore where this value is also written: for example
on Linux the console is resumed very early, before the store is up).

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libxc/xc_domain_restore.c

index 2ab9f4689e8378f2735e391eaa370695c3efb24f..f9dfd2d0f839c8d8e554a2e8b7f8afe72d2d839d 100644 (file)
@@ -2328,7 +2328,10 @@ int xc_domain_restore(xc_interface *xch, int io_fd, uint32_t dom,
                                     HVM_PARAM_PAE_ENABLED, pae))
          || (frc = xc_hvm_param_set(xch, dom,
                                     HVM_PARAM_STORE_EVTCHN,
-                                    store_evtchn)) )
+                                    store_evtchn))
+         || (frc = xc_hvm_param_set(xch, dom,
+                                    HVM_PARAM_CONSOLE_EVTCHN,
+                                    console_evtchn)) )
     {
         PERROR("error setting HVM params: %i", frc);
         goto out;