WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH V9 16/16] xen: Add Xen hypercall for sleep state

To: QEMU-devel <qemu-devel@xxxxxxxxxx>, Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH V9 16/16] xen: Add Xen hypercall for sleep state in the cmos_s3 callback.
From: anthony.perard@xxxxxxxxxx
Date: Wed, 26 Jan 2011 14:36:55 +0000
Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>, Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Anthony Liguori <anthony@xxxxxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Delivery-date: Wed, 26 Jan 2011 06:40:09 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20110126024924.GA25296@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20110126024924.GA25296@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
From: Anthony PERARD <anthony.perard@xxxxxxxxxx>

Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
---
 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);
+    }
+}
+
 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);
-- 
1.7.1


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>