From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:44504) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RcKnI-0007mc-UT for qemu-devel@nongnu.org; Sun, 18 Dec 2011 12:45:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RcKnH-0002Vq-Oj for qemu-devel@nongnu.org; Sun, 18 Dec 2011 12:45:04 -0500 Received: from mx1.redhat.com ([209.132.183.28]:25891) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RcKnH-0002Va-Gk for qemu-devel@nongnu.org; Sun, 18 Dec 2011 12:45:03 -0500 Message-ID: <4EEE2697.5020602@redhat.com> Date: Sun, 18 Dec 2011 19:44:55 +0200 From: Avi Kivity MIME-Version: 1.0 References: <1323467645-24271-1-git-send-email-anthony.perard@citrix.com> <1323467645-24271-2-git-send-email-anthony.perard@citrix.com> <4EEA0E72.20105@codemonkey.ws> In-Reply-To: <4EEA0E72.20105@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH V2 1/5] vl.c: Do not save RAM state when Xen is used. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Anthony PERARD , Xen Devel , QEMU-devel , Stefano Stabellini On 12/15/2011 05:12 PM, Anthony Liguori wrote: > On 12/09/2011 03:54 PM, Anthony PERARD wrote: >> In Xen case, the guest RAM is not handle by QEMU, and it is saved by >> Xen tools. >> So, we just avoid to register the RAM save state handler. >> >> - register_savevm_live(NULL, "ram", 0, 4, NULL, ram_save_live, NULL, >> - ram_load, NULL); >> + if (!xen_enabled()) { >> + register_savevm_live(NULL, "ram", 0, 4, NULL, ram_save_live, >> NULL, >> + ram_load, NULL); >> + } > > Why don't you just unregister the section in the xen initialization > code? That way we don't have xen_enabled()'s sprinkled all over the > place. It's better to see them up front, having the magical string "ram" connect the two is hard to follow. -- error compiling committee.c: too many arguments to function