From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:36363) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbCzZ-0007gw-R6 for qemu-devel@nongnu.org; Thu, 15 Dec 2011 10:13:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RbCzQ-0002Jd-7v for qemu-devel@nongnu.org; Thu, 15 Dec 2011 10:13:05 -0500 Received: from mail-iy0-f173.google.com ([209.85.210.173]:34063) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbCzP-0002JT-TL for qemu-devel@nongnu.org; Thu, 15 Dec 2011 10:12:56 -0500 Received: by iagj37 with SMTP id j37so3338062iag.4 for ; Thu, 15 Dec 2011 07:12:55 -0800 (PST) Message-ID: <4EEA0E72.20105@codemonkey.ws> Date: Thu, 15 Dec 2011 09:12:50 -0600 From: Anthony Liguori 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> In-Reply-To: <1323467645-24271-2-git-send-email-anthony.perard@citrix.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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 PERARD Cc: Xen Devel , QEMU-devel , Stefano Stabellini 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. > > Signed-off-by: Anthony PERARD > --- > vl.c | 6 ++++-- > 1 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/vl.c b/vl.c > index f5afed4..e7dced2 100644 > --- a/vl.c > +++ b/vl.c > @@ -3273,8 +3273,10 @@ int main(int argc, char **argv, char **envp) > default_drive(default_sdcard, snapshot, machine->use_scsi, > IF_SD, 0, SD_OPTS); > > - 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. Regards, Anthony Liguori > > if (nb_numa_nodes> 0) { > int i;