]> xenbits.xensource.com Git - xenclient/ioemu.git/commitdiff
stubdom: Fix live migration of HVM domain
authorIan Jackson <ian.jackson@eu.citrix.com>
Wed, 17 Dec 2008 11:39:21 +0000 (11:39 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 17 Dec 2008 11:39:21 +0000 (11:39 +0000)
Live-migration fails because stubdom-dm doesn't respond to the request
from xc_save for the logdirty bitmap segment. The attached patch
simply generated from old ioemu tree will fix the issue, then.

Derived from old xen internal tools/ioemu tree.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
xenstore.c

index a7a2d4c1ba385dfd3c7731b20f1cef45934f6374..86e8b639b710a76357c6cb1d9b3fb93760d19527 100644 (file)
@@ -592,10 +592,6 @@ int xenstore_fd(void)
 
 void xenstore_process_logdirty_event(void)
 {
-#ifdef CONFIG_STUBDOM
-    /* XXX we just can't use shm. */
-    return;
-#else
     char *act;
     static char *active_path = NULL;
     static char *next_active_path = NULL;
@@ -623,6 +619,10 @@ void xenstore_process_logdirty_event(void)
             /* No key yet: wait for the next watch */
             return;
 
+#ifdef CONFIG_STUBDOM
+        /* We pass the writes to hypervisor */
+        seg = (void*)1;
+#else
         strncpy(key_terminated, key_ascii, 16);
         free(key_ascii);
         key = (key_t) strtoull(key_terminated, NULL, 16);
@@ -662,6 +662,7 @@ void xenstore_process_logdirty_event(void)
             seg = NULL;
             return;
         }
+#endif
 
         /* Remember the paths for the next-active and active entries */
         if (pasprintf(&active_path, 
@@ -698,7 +699,6 @@ void xenstore_process_logdirty_event(void)
     /* Ack that we've switched */
     xs_write(xsh, XBT_NULL, active_path, act, len);
     free(act);
-#endif
 }