From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=41730 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PiEZd-00063c-C1 for qemu-devel@nongnu.org; Wed, 26 Jan 2011 18:14:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PiEZZ-0003gg-Oo for qemu-devel@nongnu.org; Wed, 26 Jan 2011 18:14:47 -0500 Received: from mail-iy0-f173.google.com ([209.85.210.173]:54377) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PiEZZ-0003gP-LP for qemu-devel@nongnu.org; Wed, 26 Jan 2011 18:14:45 -0500 Received: by iye19 with SMTP id 19so931378iye.4 for ; Wed, 26 Jan 2011 15:14:45 -0800 (PST) Message-ID: <4D40AADD.9070102@codemonkey.ws> Date: Wed, 26 Jan 2011 17:14:37 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH V9 16/16] xen: Add Xen hypercall for sleep state in the cmos_s3 callback. References: <20110126024924.GA25296@valinux.co.jp> <1296052615-17814-1-git-send-email-anthony.perard@citrix.com> In-Reply-To: <1296052615-17814-1-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: Isaku Yamahata , Xen Devel , QEMU-devel , Stefano Stabellini On 01/26/2011 08:36 AM, anthony.perard@citrix.com wrote: > From: Anthony PERARD > > Signed-off-by: Anthony PERARD > --- > hw/xen_machine_fv.c | 11 ++++++++++- > 1 files changed, 10 insertions(+), 1 deletions(-) > > diff --git a/hw/xen_machine_fv.c b/hw/xen_machine_fv.c > index 0a90312..f48b978 100644 > --- a/hw/xen_machine_fv.c > +++ b/hw/xen_machine_fv.c > @@ -38,9 +38,18 @@ > #include "xen/hvm/hvm_info_table.h" > #include "xen_platform.h" > #include "xen_common.h" > +#include "xen_backend.h" > > #define MAX_IDE_BUS 2 > > +static void xen_cmos_set_s3_resume(void *opaque, int irq, int level) > +{ > + pc_cmos_set_s3_resume(opaque, irq, level); > + if (level) { > + xc_set_hvm_param(xen_xc, xen_domid, HVM_PARAM_ACPI_S_STATE, 3); > + } > +} > + > Ack. Regards, Anthony Liguori > static void xen_init_fv(ram_addr_t ram_size, > const char *boot_device, > const char *kernel_filename, > @@ -132,7 +141,7 @@ static void xen_init_fv(ram_addr_t ram_size, > } > > if (acpi_enabled) { > - cmos_s3 = qemu_allocate_irqs(pc_cmos_set_s3_resume, rtc_state, 1); > + cmos_s3 = qemu_allocate_irqs(xen_cmos_set_s3_resume, rtc_state, 1); > smi_irq = qemu_allocate_irqs(pc_acpi_smi_interrupt, first_cpu, 1); > piix4_pm_init(pci_bus, piix3_devfn + 3, 0xb100, > isa_reserve_irq(9), *cmos_s3, *smi_irq, 0); >