From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:47845) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RyKJO-0001XB-0T for qemu-devel@nongnu.org; Fri, 17 Feb 2012 04:41:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RyKJM-0002SE-5m for qemu-devel@nongnu.org; Fri, 17 Feb 2012 04:41:05 -0500 Received: from [222.73.24.84] (port=59114 helo=song.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RyKC5-0001fF-Dc for qemu-devel@nongnu.org; Fri, 17 Feb 2012 04:33:34 -0500 Message-ID: <4F3E1F71.509@cn.fujitsu.com> Date: Fri, 17 Feb 2012 17:35:45 +0800 From: Wen Congyang MIME-Version: 1.0 References: <4F333AAA.1070601@cn.fujitsu.com> <4F333D4B.6090300@cn.fujitsu.com> <4F3AA11C.50408@siemens.com> <4F3E1546.9090303@cn.fujitsu.com> <4F3E1D52.6000105@siemens.com> In-Reply-To: <4F3E1D52.6000105@siemens.com> Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=ISO-8859-1 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: Jan Kiszka Cc: Eric Blake , HATAYAMA Daisuke , Dave Anderson , qemu-devel , Luiz Capitulino At 02/17/2012 05:26 PM, Jan Kiszka Wrote: > 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(). Yes. vm_stop() stops the vcpu only when runstate_is_running(). So I think you need to resume all vcpu after dumping is finished. Thanks Wen Congyang > > Jan >