From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yosuke Iwamatsu Subject: Re: Re: [PATCH 0/4] stubdom-dm: Support live migration of HVM domain with stubdom-dm Date: Wed, 17 Dec 2008 10:06:10 +0900 Message-ID: <49485082.9080505@ab.jp.nec.com> References: <4947734C.5070509@ab.jp.nec.com> <20081216100231.GD5333@const.bordeaux.inria.fr> <18759.46469.66019.189598@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------080602020807060004080109" Return-path: In-Reply-To: <18759.46469.66019.189598@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Jackson , Samuel Thibault Cc: xen-devel@lists.xensource.com, Keir Fraser List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------080602020807060004080109 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Ian Jackson wrote: > Samuel Thibault writes ("[Xen-devel] Re: [PATCH 0/4] stubdom-dm: Suppor= t live migration of HVM domain with stubdom-dm"): >> Yosuke Iwamatsu, le Tue 16 Dec 2008 18:22:20 +0900, a =E9crit : >>> This series of patches is an attempt to support live migration of hvm >>> domains with stubdom-dm. >> Err, I'm a bit surprised. I haven't tested it since then, but I'm sure >> live migration was working with stubdoms a few months ago, without >> the need for a logdirty shared buffer. This works thanks to the few >> lines at the end of the cpu_physical_memory_rw() function that tell th= e >> hypervisor about modified memory. Actually, the plan was even to use >> that bit of code in all cases (not only non-stubdom), so as to get rid >> of the logdirty shared buffer completely. >=20 > I take it you're referring to this: >=20 > #ifdef CONFIG_STUBDOM > if (logdirty_bitmap !=3D NULL) > xc_hvm_modified_memory(xc_handle, domid, _addr >> TARGET_PAGE_B= ITS, > ((_addr + _len + TARGET_PAGE_SIZE - 1) >> TARGET_PAGE_B= ITS) > - (_addr >> TARGET_PAGE_BITS)); > #endif Ah, I didn't notice this. > Yosuke Iwamatsu: is this not working for you then ? It's possible > that I've broken it somehow. 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 Thanks, -- Yosuke --------------080602020807060004080109 Content-Type: all/allfiles; name="stubdom_respond_to_logdirty_event.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="stubdom_respond_to_logdirty_event.patch" stubdom: respond to logdirty event to re-enable live-migration. Derived from old xen internal tools/ioemu tree. Signed-off-by: Yosuke Iwamatsu diff --git a/xenstore.c b/xenstore.c index d064df1..8129348 100644 --- a/xenstore.c +++ b/xenstore.c @@ -596,10 +596,6 @@ extern int vga_ram_size, bios_size; 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; @@ -627,6 +623,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); @@ -666,6 +666,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, @@ -702,7 +703,6 @@ void xenstore_process_logdirty_event(void) /* Ack that we've switched */ xs_write(xsh, XBT_NULL, active_path, act, len); free(act); -#endif } --------------080602020807060004080109 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------080602020807060004080109--