From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:54042) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RyK5m-0004eL-7v for qemu-devel@nongnu.org; Fri, 17 Feb 2012 04:27:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RyK5i-0000na-7N for qemu-devel@nongnu.org; Fri, 17 Feb 2012 04:27:02 -0500 Received: from david.siemens.de ([192.35.17.14]:21278) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RyK5h-0000nR-TM for qemu-devel@nongnu.org; Fri, 17 Feb 2012 04:26:58 -0500 Message-ID: <4F3E1D52.6000105@siemens.com> Date: Fri, 17 Feb 2012 10:26:42 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <4F333AAA.1070601@cn.fujitsu.com> <4F333D4B.6090300@cn.fujitsu.com> <4F3AA11C.50408@siemens.com> <4F3E1546.9090303@cn.fujitsu.com> In-Reply-To: <4F3E1546.9090303@cn.fujitsu.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC][PATCH 09/16 v6] introduce a new monitor command 'dump' to dump guest's memory List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wen Congyang Cc: Eric Blake , HATAYAMA Daisuke , Dave Anderson , qemu-devel , Luiz Capitulino On 2012-02-17 09:52, Wen Congyang wrote: >>> +static DumpState *dump_init(int fd, Error **errp) >>> +{ >>> + CPUState *env; >>> + DumpState *s = dump_get_current(); >>> + int ret; >>> + >>> + vm_stop(RUN_STATE_PAUSED); >> >> I would save the current vm state first and restore it when finished. > > There is no API to get current vm state. If you want this feature, I will > add API to get it. You are looking for runstate_is_running(). Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux