|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [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;
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 <=
|
|
|
|
|