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/12] Add S3 support to Xen

To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>, "Ian Pratt" <m+Ian.Pratt@xxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH 0/12] Add S3 support to Xen
From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
Date: Wed, 14 Feb 2007 17:10:15 +0800
Cc: "Yu, Ke" <ke.yu@xxxxxxxxx>
Delivery-date: Wed, 14 Feb 2007 01:09:46 -0800
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: AcdQF/CIJQwtbHEbTDOQf3lE5jDvMA==
Thread-topic: [PATCH 0/12] Add S3 support to Xen
Hi, all,
        Attached patch set is the first support to S3 (suspend to ram)
on 
Xen environment. We know that 3.0.5 is feature freeze now, and thus 
this version is just for trial and review first.

        X86-64 is to go (failed to compile), but we have a preliminary 
support in house which is however on an old version and not very 
stable yet. It's supposed to be out with next version.

        Totally 12 patches are attached. All files pulled from Linux are

based on current xenlinux version (2.6.18).

====[Xen specific changes]====
[PATCH 1/12] Add suspend/resume to devices owned by Xen
[PATCH 2/12] Pull necessary Linux PM files to Xen
[PATCH 3/12] Provide basic Xen PM infrastructure
[PATCH 4/12] PM interface between dom0 and Xen
[PATCH 5/12] Add HVM support

====[Linux specific changes]====
[PATCH 6/12] Make kthreads freezable
[PATCH 7/12] Pull Linux PM files to sparse tree
[PATCH 8/12] Enable ACPI sleep in Linux

====[Xen SMP related changes]====
[PATCH 9/12] Pull Linux CPU hotplug logic to Xen
[PATCH 10/12] Add Xen CPU hotplug support
[PATCH 11/12] Allow vcpu to pause self
(May not require, if force all cpus to sync lazy state)
[PATCH 12/12] SMP support to Xen PM

        For each patch mail, we also post in the body for easy review, 
except those simply pulling Linux files.

        Thanks a lot to guidance from Jun Nakajima.

=========================================
        Some important notes are attached here, and it's better to read 
them carefully before you try it out, since Linux itself still has much 
thing to do with a stable PM support.

#1. Ensure native linux (with same version as xenlinux) working on 
your environment first. Xen can never be more stable than native 
linux, thus please DO record all the information to make native Linux 
working stably, including kernel configuration changes, environmental 
setting, BIOS setting or any other tricky points you made. Then DO 
apply all these changes/settings to xen environment!!!

#2. SATA driver suspend/resume was unstable in earlier linux 
version, which is said to have full support since 2.6.19. However in 
our side, SATA does work correctly if AHCI is disabled by configuring 
SATA as Enhanced/IDE mode for linux-2.6.18. If you see SATA failure 
unfortunately like "SATA: I/O request error", you have to switch to 
legacy IDE mode, and use traditional IDE drivers to operate disk.

#3. VGA resume is the real boring issue, which may even crash the 
system on some boxes. The best case is that your BIOS support 
automatic VGA post after resume. If yes, congratulations! Or else, 
please read carefully linux-2.6.18/Documentation/power/video.txt, 
which lists some known workaround on some known types. Some 
supplements here:
        a) Xen also support "acpi_sleep=" option. You can add it to the 
xenlinux cmdline if applied. We just verified "acpi_sleep=s3_bios", 
which works on one box but failed another. "acpi_sleep=s3_mode" 
seems no effect on either box we have.

        b) On some boxes, VGA post have to be done in UP mode (For 
xen, it means UP-xenlinux), or else system may crash. S3_bios is a 
choice if applying to your box, since bios call is done in wakeup stub. 
Or else in case you have to use "vbetool post" from user space, one 
possible workaround is to manual unplug other cpus before suspend 
and re-plug them after VGA is resumed by:
                #echo "0" > /sys/devices/system/cpu/cpuN/online
                #echo "mem" > /sys/power/state
                ----After resume to user space----
                #vbetool post
                ----Wait til VGA is fully resumed----
                #echo "1" > /sys/devices/system/cpu/cpuN/online
          I guess such issue may be related to vm86 emulation under 
SMP, for both Xen and Linux. But not sure for now. :-(

        Just reiterative NOTE here, #2 and #3 both applies to native 
Linux and Xen. So MAKE SURE you have a STABLE native result first. 
It's better to run some workload when testing stability. For example, 
kernel build is easy to trigger instability when VGA resume method is 
incorrect.

Thanks,
Ke/Kevin

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

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