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] [PATCH 0/4] HVM Virtual S3

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH 0/4] HVM Virtual S3
From: "Ke, Liping" <liping.ke@xxxxxxxxx>
Date: Thu, 8 May 2008 13:13:24 +0800
Cc: "Tian, Kevin" <kevin.tian@xxxxxxxxx>, "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>, "Yu, Ke" <ke.yu@xxxxxxxxx>, "Ke, Liping" <liping.ke@xxxxxxxxx>
Delivery-date: Wed, 07 May 2008 22:13:54 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Aciwyj3GC5kFZyVcS9eJk6QW6cxy6g==
Thread-topic: [PATCH 0/4] HVM Virtual S3
[PATCH 0/4] HVM Virtual S3

These set of patches are our prototype for HVM virtual 
ACPI S3 support:
 - patch 1/4: Xen interface for HVM S3
 - patch 2/4: QEMU interface for HVM S3
 - patch 3/4: rombios interface for HVM S3
 - patch 4/4: xend interface for HVM S3

The main idea is:
- emulate ACPI PM1A control resiger in QEMU to capture guest S3 request
- when QEMU capture guest S3 request, it call hypercall to trap to Xen
- Xen will suspend HVM by reseting all vcpus
- on resume, "xm resume" will call hypercall to trap to Xen
- Xen will resume HVM by setting HVM vcpu EIP to 0xfff0, cs base to 0xf0000, 
  and also set other related registers/msr to the correct value/attributes 
  in realmode environment which will start from rombios post Entry code 
  in realmode directly when resuming.
- rombios post code will start s3 resume by jumping to wakeup vector set
  by guest OS.

How to use it:
- apply this patch to changeset 17589:9a6ad687ec20
- create and boot HVM domain 
- In HVM guest, enter S3 state
  * for Linux, "echo mem >/sys/power/state"
  * for Windows, shutdown windows by Standby
- to resume HVM domain, "xm resume <domid>"

Note: FC6/FC5 guest can successfully S3 suspend/resume in both text mode and
X window. Also, with vtd-enabled, network card assigned to HVM, it works
too. However, Windows guest can not suspend, because the windows
driver for QEMU VGA and monitor has no power management support, and
windows refuse to enter S3 sleep state. 

Kevin/Ke/Liping

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