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: [Qemu-devel] Re: [PATCH V9 16/16] xen: Add Xen hypercall

To: anthony.perard@xxxxxxxxxx
Subject: [Xen-devel] Re: [Qemu-devel] Re: [PATCH V9 16/16] xen: Add Xen hypercall for sleep state in the cmos_s3 callback.
From: Anthony Liguori <anthony@xxxxxxxxxxxxx>
Date: Wed, 26 Jan 2011 17:14:37 -0600
Cc: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>, Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, QEMU-devel <qemu-devel@xxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Delivery-date: Wed, 26 Jan 2011 15:30:04 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1296052615-17814-1-git-send-email-anthony.perard@xxxxxxxxxx>
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> <1296052615-17814-1-git-send-email-anthony.perard@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101027 Lightning/1.0b1 Thunderbird/3.0.10
On 01/26/2011 08:36 AM, anthony.perard@xxxxxxxxxx wrote:
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);
+    }
+}
+

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);


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