qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v5 07/12] suspend: add system_wakeup monitor com


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH v5 07/12] suspend: add system_wakeup monitor command
Date: Tue, 21 Feb 2012 10:56:39 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120210 Thunderbird/10.0.1

  Hi,

>> +# @system_wakeup:
>> +#
>> +# Wakeup guest from suspend
>> +#
>> +# Since:  1.1
>> +#
>> +# Returns:  nothing.
> 
> Would be nice to note that this command does nothing if the guest is already
> suspended (btw, does is_suspend account for guest initiated suspends too?).

s/suspended/running/, but yes.

There are only guest initiated suspends (well, libvirt-via-agent is
somewhat grey ...).

cheers,
  Gerd

>> diff --git a/qmp.c b/qmp.c
>> index 1f64844..a182b51 100644
>> --- a/qmp.c
>> +++ b/qmp.c
>> @@ -163,6 +163,11 @@ void qmp_cont(Error **errp)
>>      vm_start();
>>  }
>>  
>> +void qmp_system_wakeup(Error **errp)
>> +{
>> +    qemu_system_wakeup_request(QEMU_WAKEUP_REASON_OTHER);
> 
> qemu_system_wakeup_request() does:
> 
>     if (!(wakeup_reason_mask & (1 << reason))) {
>         return;
>     }
> 
> But I think you never disable REASON_OTHER, meaning that this will
> never be true when the wakeup request comes from the command, right?

Correct.  The mask is for wakeup events the guest is able to
enable/disable (i.e. rtc wakeups can be enabled/disabled via acpi).
REASON_OTHER can't be maked.

cheers,
  Gerd



reply via email to

[Prev in Thread] Current Thread [Next in Thread]