[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH 1/5] suspend: add infrastructure
From: |
Gerd Hoffmann |
Subject: |
Re: [Qemu-devel] [RFC PATCH 1/5] suspend: add infrastructure |
Date: |
Mon, 16 Jan 2012 19:12:30 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111104 Red Hat/3.1.16-2.el6_1 Thunderbird/3.1.16 |
On 01/13/12 16:51, Paolo Bonzini wrote:
> On 01/11/2012 04:08 PM, Gerd Hoffmann wrote:
>> +void qemu_system_suspend_request(qemu_irq wake_irq)
>> +{
>> + if (suspend_wake_irq != NULL) {
>> + return;
>> + }
>> + cpu_stop_current();
>> + qemu_notify_event();
>> + suspend_wake_irq = wake_irq;
>> +}
>> +
>> +void qemu_system_wakeup_request(void)
>> +{
>> + if (suspend_wake_irq == NULL) {
>> + return;
>> + }
>> + reset_requested = 1;
>> + qemu_irq_raise(suspend_wake_irq);
>> + suspend_wake_irq = NULL;
>> +}
>
> The code in acpi.c is confusing, but it seems to me that IRQ is raised
> when the system _enters_ S3. See especially xen-all.c.
> Overall, it seems to me that with your new infrastructure a global
> Notifier would be a better fit than a qemu_irq that the board would have
> to pass all the way.
Indeed. Especially as it isn't actually a IRQ line but just a qemu_irq
struct which is abused as notifier ...
> A notifier would also remove the ugly Xen special
> casing.
Yes.
> However, this can be done separately.
It's easier to do it all in one go. It also gives some bonus points
because it'll remove more code than it adds ;)
v2 goes out in a minute ...
thanks for the review,
Gerd
- [Qemu-devel] [RFC PATCH 0/5] initial suspend support, Gerd Hoffmann, 2012/01/11
- [Qemu-devel] [RFC PATCH 4/5] suspend: make ps/2 devices wakeup the guest, Gerd Hoffmann, 2012/01/11
- [Qemu-devel] [RFC PATCH 5/5] suspend: make serial ports wakeup the guest., Gerd Hoffmann, 2012/01/11
- [Qemu-devel] [RFC PATCH 2/5] suspend: add wakeup monitor command, Gerd Hoffmann, 2012/01/11
- [Qemu-devel] [RFC PATCH 3/5] suspend: switch acpi s3 to new infrastructure., Gerd Hoffmann, 2012/01/11
- [Qemu-devel] [RFC PATCH 1/5] suspend: add infrastructure, Gerd Hoffmann, 2012/01/11