|
| From: | Wen Congyang |
| Subject: | Re: [Qemu-devel] [RFC][PATCH 09/16 v6] introduce a new monitor command 'dump' to dump guest's memory |
| Date: | Fri, 17 Feb 2012 17:35:45 +0800 |
| User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100413 Fedora/3.0.4-2.fc13 Thunderbird/3.0.4 |
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
>
| [Prev in Thread] | Current Thread | [Next in Thread] |