On 01/25/2011 08:29 AM, anthony.per...@citrix.com wrote:
From: Anthony PERARD<anthony.per...@citrix.com>
Signed-off-by: Anthony PERARD<anthony.per...@citrix.com>
---
hw/acpi_piix4.c | 4 ++++
hw/xen.h | 2 ++
xen-all.c | 7 +++++++
xen-stub.c | 4 ++++
4 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c
index 5bbc2b5..ea94bf9 100644
--- a/hw/acpi_piix4.c
+++ b/hw/acpi_piix4.c
@@ -23,6 +23,7 @@
#include "acpi.h"
#include "sysemu.h"
#include "range.h"
+#include "xen.h"
//#define DEBUG
@@ -181,6 +182,9 @@ static void pm_ioport_write(IORange *ioport, uint64_t addr,
unsigned width,
if (s->cmos_s3) {
qemu_irq_raise(s->cmos_s3);
}
+ if (xen_enabled()) {
+ xen_set_hvm_sleep_state();
+ }
Can't you hook into cmos_s3?
Regards,
Anthony Liguori