From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=59294 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PiEWm-0004iP-3d for qemu-devel@nongnu.org; Wed, 26 Jan 2011 18:11:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PiEWg-00034o-EV for qemu-devel@nongnu.org; Wed, 26 Jan 2011 18:11:47 -0500 Received: from mail-iy0-f173.google.com ([209.85.210.173]:40526) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PiEWg-00034h-Bf for qemu-devel@nongnu.org; Wed, 26 Jan 2011 18:11:46 -0500 Received: by iye19 with SMTP id 19so929051iye.4 for ; Wed, 26 Jan 2011 15:11:45 -0800 (PST) Message-ID: <4D40AA2A.6010207@codemonkey.ws> Date: Wed, 26 Jan 2011 17:11:38 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH V9 16/16] acpi-piix4: Add Xen hypercall for sleep state. References: <1295965760-31508-1-git-send-email-anthony.perard@citrix.com> <1295965760-31508-17-git-send-email-anthony.perard@citrix.com> In-Reply-To: <1295965760-31508-17-git-send-email-anthony.perard@citrix.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: anthony.perard@citrix.com Cc: Xen Devel , QEMU-devel , Stefano Stabellini On 01/25/2011 08:29 AM, anthony.perard@citrix.com wrote: > From: Anthony PERARD > > Signed-off-by: Anthony PERARD > --- > 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