From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47595) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5bDv-00078U-NS for qemu-devel@nongnu.org; Thu, 18 Jun 2015 10:55:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z5bDs-0008SX-F2 for qemu-devel@nongnu.org; Thu, 18 Jun 2015 10:55:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49568) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5bDs-0008S5-AX for qemu-devel@nongnu.org; Thu, 18 Jun 2015 10:55:20 -0400 Message-ID: <5582DBCF.9040805@redhat.com> Date: Thu, 18 Jun 2015 16:55:11 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1434617935-6924-1-git-send-email-zhang.zhanghailiang@huawei.com> <1434617935-6924-31-git-send-email-zhang.zhanghailiang@huawei.com> In-Reply-To: <1434617935-6924-31-git-send-email-zhang.zhanghailiang@huawei.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH COLO-Frame v6 30/31] COLO: Implement shutdown checkpoint List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: zhanghailiang , qemu-devel@nongnu.org Cc: lizhijian@cn.fujitsu.com, quintela@redhat.com, yunhong.jiang@intel.com, eddie.dong@intel.com, peter.huangpeng@huawei.com, dgilbert@redhat.com, arei.gonglei@huawei.com, amit.shah@redhat.com, laijs@cn.fujitsu.com On 18/06/2015 10:58, zhanghailiang wrote: > +void qemu_system_shutdown_request(void) > +{ > + trace_qemu_system_shutdown_request(); > + /* > + * if in colo mode, we need do some significant work before respond to the > + * shutdown request. > + */ > + if (loadvm_in_colo_state()) { > + return ; /* primary's responsibility */ > + } > + if (migrate_in_colo_state()) { > + colo_shutdown_requested = 1; > + return; > + } The patch looks sane---the only comment I have is that loadvm_in_colo_state() and migrate_in_colo_state() do not sound like great names. Paolo > + qemu_system_shutdown_request_core(); > +} > +