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 3/6] Allow suspend/resume for driver domain

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH 3/6] Allow suspend/resume for driver domain
From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
Date: Tue, 6 Feb 2007 16:15:23 +0800
Delivery-date: Tue, 06 Feb 2007 00:15:30 -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: AcdJxvJZsORVlu8sS5qEnuIhSmx64w==
Thread-topic: [PATCH 3/6] Allow suspend/resume for driver domain
Add suspend/resume support for driver domain. Note, driver
domain will only work correctly for light-weight suspend
and resume, where domain itself is just suspended with all
context reserved. Machine addresses saved in private driver
structures make it impossible for save/restore and migration,
unless para-domU itself supports and uses IOMMU as the 
default DMA interface.


Signed-off-by Kevin Tian <kevin.tian@xxxxxxxxx>

diff -r 7c8c027475f5 -r ac24ecea9595
linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c  Mon Feb 05
16:58:10 2007 +0800
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c  Mon Feb 05
17:30:13 2007 +0800
@@ -852,8 +852,6 @@ static int timer_resume(struct sys_devic
 }
 
 static struct sysdev_class timer_sysclass = {
-       .resume = timer_resume,
-       .suspend = timer_suspend,
        set_kset_name("timer"),
 };
 
diff -r 7c8c027475f5 -r ac24ecea9595
linux-2.6-xen-sparse/drivers/xen/core/machine_reboot.c
--- a/linux-2.6-xen-sparse/drivers/xen/core/machine_reboot.c    Mon Feb
05 16:58:10 2007 +0800
+++ b/linux-2.6-xen-sparse/drivers/xen/core/machine_reboot.c    Mon Feb
05 17:30:13 2007 +0800
@@ -151,6 +151,14 @@ int __xen_suspend(void)
        if (err)
                return err;
 
+       if (freeze_processes()) {
+               err = -EAGAIN;
+               goto Thaw;
+       }
+
+       if ((err = device_suspend(PMSG_SUSPEND)))
+               goto Thaw;
+
        xenbus_suspend();
 
        preempt_disable();
@@ -158,6 +166,9 @@ int __xen_suspend(void)
        mm_pin_all();
        local_irq_disable();
        preempt_enable();
+
+       if ((err = device_power_down(PMSG_SUSPEND)))
+               goto Thaw;
 
        gnttab_suspend();
 
@@ -176,6 +187,8 @@ int __xen_suspend(void)
        if (!suspend_cancelled)
                irq_resume();
 
+       device_power_up();
+
        time_resume();
 
        switch_idle_mm();
@@ -189,6 +202,10 @@ int __xen_suspend(void)
                xenbus_suspend_cancel();
        }
 
+       device_resume();
+       err = 0;
+Thaw:
+       thaw_processes();
        smp_resume();
 
        return err;

Attachment: driver_domain_suspend.patch
Description: driver_domain_suspend.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH 3/6] Allow suspend/resume for driver domain, Tian, Kevin <=