From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:38753) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpMIL-0002Zn-Vk for qemu-devel@nongnu.org; Mon, 23 Jan 2012 10:59:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RpMIK-0006DK-PV for qemu-devel@nongnu.org; Mon, 23 Jan 2012 10:58:57 -0500 Received: from mail-gx0-f173.google.com ([209.85.161.173]:58703) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpMIK-0006DG-KI for qemu-devel@nongnu.org; Mon, 23 Jan 2012 10:58:56 -0500 Received: by ggnr1 with SMTP id r1so849436ggn.4 for ; Mon, 23 Jan 2012 07:58:56 -0800 (PST) Message-ID: <4F1D83BB.8070209@codemonkey.ws> Date: Mon, 23 Jan 2012 09:58:51 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <1327080085-8673-1-git-send-email-stefano.stabellini@eu.citrix.com> In-Reply-To: <1327080085-8673-1-git-send-email-stefano.stabellini@eu.citrix.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 1/6] vl.c: do not save the RAM state when Xen is enabled List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefano Stabellini Cc: Anthony PERARD , jan.kiszka@siemens.com, xen-devel@lists.xensource.com, avi@redhat.com, qemu-devel@nongnu.org On 01/20/2012 11:21 AM, Stefano Stabellini wrote: > From: Anthony PERARD > > In the 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 > Signed-off-by: Stefano Stabellini > --- > vl.c | 6 ++++-- > 1 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/vl.c b/vl.c > index ba55b35..6f0435b 100644 > --- a/vl.c > +++ b/vl.c > @@ -3270,8 +3270,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 not introduce new Xen specific commands like I suggested on IRC? This sort of change is extremely non-intuitive. We should do as much as we can to avoid magic #ifdefs like this. Regards, Anthony Liguori > > if (nb_numa_nodes> 0) { > int i;