[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] qemu_power_down_request handling
From: |
Alexander Graf |
Subject: |
Re: [Qemu-devel] qemu_power_down_request handling |
Date: |
Mon, 16 Apr 2012 12:24:25 +0200 |
On 16.04.2012, at 11:11, Bhushan Bharat-R65777 wrote:
>
>
>> -----Original Message-----
>> From: Alexander Graf [mailto:address@hidden
>> Sent: Monday, April 16, 2012 1:47 PM
>> To: Bhushan Bharat-R65777
>> Cc: address@hidden; Wood Scott-B07421
>> Subject: Re: qemu_power_down_request handling
>>
>>
>> On 16.04.2012, at 10:07, Bhushan Bharat-R65777 wrote:
>>
>>> Hi All,
>>>
>>> The "-watchdog-action shutdown" uses the monitor system_shutdown mechanism
>>> but
>> this does not actually powerdown the system.
>>>
>>> In code, If there is pending powerdown_request
>> (qemu_system_powerdown_request() called) then it try to raise an irq. What is
>> that irq supposed to do. Currently it in NULL pointer so does not do
>> anything.
>>>
>>> Code snapshot -- vl.c : main_loop_should_exit()
>>>
>>> ....
>>> if (qemu_powerdown_requested()) {
>>> monitor_protocol_event(QEVENT_POWERDOWN, NULL);
>>> qemu_irq_raise(qemu_system_powerdown);
>>> }
>>> . . . .
>>>
>>> Is the powerdown_request handling not complete?
>>
>> The watchdog shutdown event is a soft power off. Imagine a PC where you press
>> the power button, the OS gets notified through ACPI that it's supposed to
>> shut
>> down and shuts down the machine.
>>
>> I don't know of any BookE system that has a comparable mechanism. We could
>> implement it through qemu-ga and fall back to hard power off maybe?
>
> Till someone develop this interface, does it make sense to use
> qemu_system_shutdown_request() rather than qemu_system_powerdown_request()
> for "-watchdog-action shutdown" ?
I think it makes sense to just register the shutdown callback as powerdown hook
in the e500 machine :).
Alex