Re: [Qemu-devel] [PATCH v3 2/6] suspend: switch acpi s3 to new infrastructure.

2012-02-09 Thread Gleb Natapov
On Thu, Feb 09, 2012 at 01:47:30PM +0100, Paolo Bonzini wrote: > On 02/09/2012 01:31 PM, Gleb Natapov wrote: > >Real HW may have other ways to notify BIOS that system was S3 suspended > >(special chipset register for instance). I think we can write DSDT magic > >to write RTC for us, but I prefer t

Re: [Qemu-devel] [PATCH v3 2/6] suspend: switch acpi s3 to new infrastructure.

2012-02-09 Thread Paolo Bonzini
On 02/09/2012 01:31 PM, Gleb Natapov wrote: Real HW may have other ways to notify BIOS that system was S3 suspended (special chipset register for instance). I think we can write DSDT magic to write RTC for us, but I prefer to do it from inside QEMU. Heh, I would prefer DSDT magic, but I wouldn

Re: [Qemu-devel] [PATCH v3 2/6] suspend: switch acpi s3 to new infrastructure.

2012-02-09 Thread Gleb Natapov
On Thu, Feb 09, 2012 at 12:17:33PM +0100, Paolo Bonzini wrote: > On 02/08/2012 12:00 PM, Gerd Hoffmann wrote: > >+/* set CMOS shutdown status register (index 0xF) as S3_resume(0xFE) > >+ BIOS will read it and start S3 resume at POST Entry */ > >+static void rtc_notify_suspend(Notifier *notifier,

Re: [Qemu-devel] [PATCH v3 2/6] suspend: switch acpi s3 to new infrastructure.

2012-02-09 Thread Paolo Bonzini
On 02/08/2012 12:00 PM, Gerd Hoffmann wrote: +/* set CMOS shutdown status register (index 0xF) as S3_resume(0xFE) + BIOS will read it and start S3 resume at POST Entry */ +static void rtc_notify_suspend(Notifier *notifier, void *data) +{ +RTCState *s = container_of(notifier, RTCState, suspe

Re: [Qemu-devel] [PATCH v3 2/6] suspend: switch acpi s3 to new infrastructure.

2012-02-09 Thread Gleb Natapov
On Thu, Feb 09, 2012 at 11:51:45AM +0100, Gerd Hoffmann wrote: > Hi, > > >> Pretend that resume was caused by power button */ > >> pm1a->sts |= > >> (ACPI_BITMASK_WAKE_STATUS | > >> ACPI_BITMASK_POWER_BUTTON_STATUS); > > Here we should report real r

Re: [Qemu-devel] [PATCH v3 2/6] suspend: switch acpi s3 to new infrastructure.

2012-02-09 Thread Gerd Hoffmann
Hi, >> Pretend that resume was caused by power button */ >> pm1a->sts |= >> (ACPI_BITMASK_WAKE_STATUS | >> ACPI_BITMASK_POWER_BUTTON_STATUS); > Here we should report real reason for a wakeup (if it can be reported in > mp1sts that is). These are av

Re: [Qemu-devel] [PATCH v3 2/6] suspend: switch acpi s3 to new infrastructure.

2012-02-09 Thread Gleb Natapov
On Wed, Feb 08, 2012 at 12:00:15PM +0100, Gerd Hoffmann wrote: > This patch switches pc s3 suspend over to the new infrastructure. > The cmos_s3 qemu_irq is killed, the new notifier is used instead. > The xen hack goes away with that too, the hypercall can simply be > done in a notifier function no