From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [PATCH V9 16/16] acpi-piix4: Add Xen hypercall for sleep state. Date: Wed, 26 Jan 2011 17:11:38 -0600 Message-ID: <4D40AA2A.6010207@codemonkey.ws> References: <1295965760-31508-1-git-send-email-anthony.perard@citrix.com> <1295965760-31508-17-git-send-email-anthony.perard@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1295965760-31508-17-git-send-email-anthony.perard@citrix.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org To: anthony.perard@citrix.com Cc: Xen Devel , QEMU-devel , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org 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