WHQL complains otherwise.
Signed-off-by: Gleb Natapov gleb@redhat.com diff --git a/src/acpi.c b/src/acpi.c index 18830dc..27a78a8 100644 --- a/src/acpi.c +++ b/src/acpi.c @@ -259,8 +259,8 @@ build_fadt(int bdf) fadt->plvl2_lat = cpu_to_le16(0xfff); // C2 state not supported fadt->plvl3_lat = cpu_to_le16(0xfff); // C3 state not supported pci_init_device(fadt_init_tbl, bdf, fadt); - /* WBINVD + PROC_C1 + SLP_BUTTON + FIX_RTC */ - fadt->flags = cpu_to_le32((1 << 0) | (1 << 2) | (1 << 5) | (1 << 6)); + /* WBINVD + PROC_C1 + SLP_BUTTON + FIX_RTC + RTC_S4 */ + fadt->flags = cpu_to_le32((1 << 0) | (1 << 2) | (1 << 5) | (1 << 6) | (1 << 7));
build_header((void*)fadt, FACP_SIGNATURE, sizeof(*fadt), 1);
-- Gleb.
Typo in subject.
Gleb Natapov wrote:
WHQL complains otherwise.
Is there something further that should be activated, to actually allow the wakeup to work? Hm, isn't S4 hibernate?
//Peter
On Sun, Jan 30, 2011 at 03:01:43PM +0100, Peter Stuge wrote:
Typo in subject.
Gleb Natapov wrote:
WHQL complains otherwise.
Is there something further that should be activated, to actually allow the wakeup to work? Hm, isn't S4 hibernate?
Not in a bios. Qemu currently exits on S4 (hibernate to disk). Restarting it activates resume process. On real HW RTC may be programmed to initiate resume at certain time. Since qemu process exits on S4 it is not clear how to implement such functionality there.
-- Gleb.
Gleb Natapov wrote:
WHQL complains otherwise.
Is there something further that should be activated, to actually allow the wakeup to work? Hm, isn't S4 hibernate?
Not in a bios. Qemu currently exits on S4 (hibernate to disk). Restarting it activates resume process. On real HW RTC may be programmed to initiate resume at certain time. Since qemu process exits on S4 it is not clear how to implement such functionality there.
All right, but that can be solved somewhere closer to QEMU. :) As you know, SeaBIOS is also used outside QEMU, and maybe more action is needed there.
If the capability is advertised to the OS then it's of course also possible that the OS will try to use it. Does Windows e.g. rely on BIOS or AML for setting the RTC that will presumably wake the system up, or no?
//Peter
On Sun, Jan 30, 2011 at 03:30:43PM +0100, Peter Stuge wrote:
Gleb Natapov wrote:
WHQL complains otherwise.
Is there something further that should be activated, to actually allow the wakeup to work? Hm, isn't S4 hibernate?
Not in a bios. Qemu currently exits on S4 (hibernate to disk). Restarting it activates resume process. On real HW RTC may be programmed to initiate resume at certain time. Since qemu process exits on S4 it is not clear how to implement such functionality there.
All right, but that can be solved somewhere closer to QEMU. :) As you know, SeaBIOS is also used outside QEMU, and maybe more action is needed there.
The ACPI code in SeaBIOS is only used on emulators - it's all compiled out on coreboot.
-Kevin
On Sun, Jan 30, 2011 at 02:17:11PM +0200, Gleb Natapov wrote:
WHQL complains otherwise.
Signed-off-by: Gleb Natapov gleb@redhat.com
Can you get this acked by one of the kvm/qemu maintainers?
-Kevin
On Sun, Jan 30, 2011 at 09:29:57AM -0500, Kevin O'Connor wrote:
On Sun, Jan 30, 2011 at 02:17:11PM +0200, Gleb Natapov wrote:
WHQL complains otherwise.
Signed-off-by: Gleb Natapov gleb@redhat.com
Can you get this acked by one of the kvm/qemu maintainers?
Avi, Marcelo, Anthony can you look at it?
-- Gleb.
On 01/30/2011 04:34 PM, Gleb Natapov wrote:
On Sun, Jan 30, 2011 at 09:29:57AM -0500, Kevin O'Connor wrote:
On Sun, Jan 30, 2011 at 02:17:11PM +0200, Gleb Natapov wrote:
WHQL complains otherwise.
Signed-off-by: Gleb Natapovgleb@redhat.com
Can you get this acked by one of the kvm/qemu maintainers?
Avi, Marcelo, Anthony can you look at it?
Looks reasonable. What does the guest need to do to get the RTC to wake up the machine? We may need to add that to the DSDT.
We also need to add a notification about this event, so management can make note of the wake up time and schedule a powerup. We may also want to change the poweroff == exit() thing we do now. But these are all qemu issues, not seabios.
On Sun, Jan 30, 2011 at 05:08:18PM +0200, Avi Kivity wrote:
On 01/30/2011 04:34 PM, Gleb Natapov wrote:
On Sun, Jan 30, 2011 at 09:29:57AM -0500, Kevin O'Connor wrote:
On Sun, Jan 30, 2011 at 02:17:11PM +0200, Gleb Natapov wrote:
WHQL complains otherwise.
Signed-off-by: Gleb Natapovgleb@redhat.com
Can you get this acked by one of the kvm/qemu maintainers?
Avi, Marcelo, Anthony can you look at it?
Looks reasonable. What does the guest need to do to get the RTC to wake up the machine? We may need to add that to the DSDT.
This patch was enough to make WHQL happy. I think Windows talks to RTC directly, not via AML code.
We also need to add a notification about this event, so management can make note of the wake up time and schedule a powerup. We may also want to change the poweroff == exit() thing we do now. But these are all qemu issues, not seabios.
Yes. For now the only user of this functionality is WHQL. Just restarting qemu immediately after exit worked well till now.
-- Gleb.
On 01/30/2011 05:13 PM, Gleb Natapov wrote:
On Sun, Jan 30, 2011 at 05:08:18PM +0200, Avi Kivity wrote:
On 01/30/2011 04:34 PM, Gleb Natapov wrote:
On Sun, Jan 30, 2011 at 09:29:57AM -0500, Kevin O'Connor wrote:
On Sun, Jan 30, 2011 at 02:17:11PM +0200, Gleb Natapov wrote:
WHQL complains otherwise.
Signed-off-by: Gleb Natapovgleb@redhat.com
Can you get this acked by one of the kvm/qemu maintainers?
Avi, Marcelo, Anthony can you look at it?
Looks reasonable. What does the guest need to do to get the RTC to wake up the machine? We may need to add that to the DSDT.
This patch was enough to make WHQL happy. I think Windows talks to RTC directly, not via AML code.
What does it do? Set the alarm? Is there a way to set the alarm, and not cause a wake up, or does the alarm have a 1:1 relationship with wakeup?
On Sun, Jan 30, 2011 at 05:15:49PM +0200, Avi Kivity wrote:
On 01/30/2011 05:13 PM, Gleb Natapov wrote:
On Sun, Jan 30, 2011 at 05:08:18PM +0200, Avi Kivity wrote:
On 01/30/2011 04:34 PM, Gleb Natapov wrote:
On Sun, Jan 30, 2011 at 09:29:57AM -0500, Kevin O'Connor wrote:
On Sun, Jan 30, 2011 at 02:17:11PM +0200, Gleb Natapov wrote:
WHQL complains otherwise.
Signed-off-by: Gleb Natapovgleb@redhat.com
Can you get this acked by one of the kvm/qemu maintainers?
Avi, Marcelo, Anthony can you look at it?
Looks reasonable. What does the guest need to do to get the RTC to wake up the machine? We may need to add that to the DSDT.
This patch was enough to make WHQL happy. I think Windows talks to RTC directly, not via AML code.
What does it do? Set the alarm? Is there a way to set the alarm, and not cause a wake up, or does the alarm have a 1:1 relationship with wakeup?
According to ACPI spec guest needs to set RTC_EN in PM1x_EN register too. If wakeup was caused by RTC alarm RTC_STS will be set in PM1x_STS register. But all this has nothing to do with Seabios.
-- Gleb.
On 01/30/2011 05:23 PM, Gleb Natapov wrote:
On Sun, Jan 30, 2011 at 05:15:49PM +0200, Avi Kivity wrote:
On 01/30/2011 05:13 PM, Gleb Natapov wrote:
On Sun, Jan 30, 2011 at 05:08:18PM +0200, Avi Kivity wrote:
On 01/30/2011 04:34 PM, Gleb Natapov wrote:
On Sun, Jan 30, 2011 at 09:29:57AM -0500, Kevin O'Connor wrote:
On Sun, Jan 30, 2011 at 02:17:11PM +0200, Gleb Natapov wrote: > WHQL complains otherwise. > > Signed-off-by: Gleb Natapovgleb@redhat.com
Can you get this acked by one of the kvm/qemu maintainers?
Avi, Marcelo, Anthony can you look at it?
Looks reasonable. What does the guest need to do to get the RTC to wake up the machine? We may need to add that to the DSDT.
This patch was enough to make WHQL happy. I think Windows talks to RTC directly, not via AML code.
What does it do? Set the alarm? Is there a way to set the alarm, and not cause a wake up, or does the alarm have a 1:1 relationship with wakeup?
According to ACPI spec guest needs to set RTC_EN in PM1x_EN register too. If wakeup was caused by RTC alarm RTC_STS will be set in PM1x_STS register. But all this has nothing to do with Seabios.
In theory a guest could check whether RTC alarm reboot is supported, if not it keeps awake, if it is it can set the alarm to sleep. So if seabios lies it could break that guest.
However that's an unlikely scenario.
On Sun, Jan 30, 2011 at 05:25:05PM +0200, Avi Kivity wrote:
On 01/30/2011 05:23 PM, Gleb Natapov wrote:
On Sun, Jan 30, 2011 at 05:15:49PM +0200, Avi Kivity wrote:
On 01/30/2011 05:13 PM, Gleb Natapov wrote:
On Sun, Jan 30, 2011 at 05:08:18PM +0200, Avi Kivity wrote:
On 01/30/2011 04:34 PM, Gleb Natapov wrote:
On Sun, Jan 30, 2011 at 09:29:57AM -0500, Kevin O'Connor wrote: > On Sun, Jan 30, 2011 at 02:17:11PM +0200, Gleb Natapov wrote: > > WHQL complains otherwise. > > > > Signed-off-by: Gleb Natapovgleb@redhat.com > > Can you get this acked by one of the kvm/qemu maintainers? > Avi, Marcelo, Anthony can you look at it?
Looks reasonable. What does the guest need to do to get the RTC to wake up the machine? We may need to add that to the DSDT.
This patch was enough to make WHQL happy. I think Windows talks to RTC directly, not via AML code.
What does it do? Set the alarm? Is there a way to set the alarm, and not cause a wake up, or does the alarm have a 1:1 relationship with wakeup?
According to ACPI spec guest needs to set RTC_EN in PM1x_EN register too. If wakeup was caused by RTC alarm RTC_STS will be set in PM1x_STS register. But all this has nothing to do with Seabios.
In theory a guest could check whether RTC alarm reboot is supported, if not it keeps awake, if it is it can set the alarm to sleep. So if seabios lies it could break that guest.
Theoretically possible.
However that's an unlikely scenario.
I think so too.
-- Gleb.
On 01/30/2011 04:33 PM, Gleb Natapov wrote:
In theory a guest could check whether RTC alarm reboot is supported, if not it keeps awake, if it is it can set the alarm to sleep. So if seabios lies it could break that guest.
Theoretically possible.
However that's an unlikely scenario.
I think so too.
The alternative would be to get it via fw_cfg.
Paolo
On Wed, Feb 02, 2011 at 09:31:37AM +0100, Paolo Bonzini wrote:
On 01/30/2011 04:33 PM, Gleb Natapov wrote:
In theory a guest could check whether RTC alarm reboot is supported, if not it keeps awake, if it is it can set the alarm to sleep. So if seabios lies it could break that guest.
Theoretically possible.
However that's an unlikely scenario.
I think so too.
The alternative would be to get it via fw_cfg.
How will this help? We want to lie that we support RTC wakeup without actually supporting it.
-- Gleb.
On 02/02/2011 09:42 AM, Gleb Natapov wrote:
The alternative would be to get it via fw_cfg.
How will this help? We want to lie that we support RTC wakeup without actually supporting it.
We would be able to lie or say the truth at will. Distros that care about WHQL/SVVP can turn the lie on unconditionally.
I'm not saying it is worth it, just that it is an alternative.
Paolo
On Wed, Feb 02, 2011 at 09:43:38AM +0100, Paolo Bonzini wrote:
On 02/02/2011 09:42 AM, Gleb Natapov wrote:
The alternative would be to get it via fw_cfg.
How will this help? We want to lie that we support RTC wakeup without actually supporting it.
We would be able to lie or say the truth at will. Distros that care about WHQL/SVVP can turn the lie on unconditionally.
I see.
I'm not saying it is worth it, just that it is an alternative.
Yeah, I do not anticipate any problem with this patch applied. If problem arise we will implement RTC wakeup in QEMU: if guest requested RTC wake up QEMU will not exit, but wait for wakeup time and boot guest again instead.
-- Gleb.