aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/xen/enlighten.c
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2008-05-26 18:31:27 -0400
committerThomas Gleixner <tglx@linutronix.de>2008-05-27 04:11:38 -0400
commit0e91398f2a5d4eb6b07df8115917d0d1cf3e9b58 (patch)
treec6a3b31b7bcbbfb55bb2304d8651abdd28cdad54 /arch/x86/xen/enlighten.c
parent7d88d32a4670af583c896e5ecd3929b78538ca62 (diff)
xen: implement save/restore
This patch implements Xen save/restore and migration. Saving is triggered via xenbus, which is polled in drivers/xen/manage.c. When a suspend request comes in, the kernel prepares itself for saving by: 1 - Freeze all processes. This is primarily to prevent any partially-completed pagetable updates from confusing the suspend process. If CONFIG_PREEMPT isn't defined, then this isn't necessary. 2 - Suspend xenbus and other devices 3 - Stop_machine, to make sure all the other vcpus are quiescent. The Xen tools require the domain to run its save off vcpu0. 4 - Within the stop_machine state, it pins any unpinned pgds (under construction or destruction), performs canonicalizes various other pieces of state (mostly converting mfns to pfns), and finally 5 - Suspend the domain Restore reverses the steps used to save the domain, ending when all the frozen processes are thawed. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/xen/enlighten.c')
-rw-r--r--arch/x86/xen/enlighten.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index ce67dc8f36af..b94f63ac228b 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -857,7 +857,7 @@ static __init void xen_pagetable_setup_start(pgd_t *base)
857 PFN_DOWN(__pa(xen_start_info->pt_base))); 857 PFN_DOWN(__pa(xen_start_info->pt_base)));
858} 858}
859 859
860static __init void setup_shared_info(void) 860void xen_setup_shared_info(void)
861{ 861{
862 if (!xen_feature(XENFEAT_auto_translated_physmap)) { 862 if (!xen_feature(XENFEAT_auto_translated_physmap)) {
863 unsigned long addr = fix_to_virt(FIX_PARAVIRT_BOOTMAP); 863 unsigned long addr = fix_to_virt(FIX_PARAVIRT_BOOTMAP);
@@ -894,7 +894,7 @@ static __init void xen_pagetable_setup_done(pgd_t *base)
894 pv_mmu_ops.release_pmd = xen_release_pmd; 894 pv_mmu_ops.release_pmd = xen_release_pmd;
895 pv_mmu_ops.set_pte = xen_set_pte; 895 pv_mmu_ops.set_pte = xen_set_pte;
896 896
897 setup_shared_info(); 897 xen_setup_shared_info();
898 898
899 /* Actually pin the pagetable down, but we can't set PG_pinned 899 /* Actually pin the pagetable down, but we can't set PG_pinned
900 yet because the page structures don't exist yet. */ 900 yet because the page structures don't exist yet. */
@@ -902,7 +902,7 @@ static __init void xen_pagetable_setup_done(pgd_t *base)
902} 902}
903 903
904/* This is called once we have the cpu_possible_map */ 904/* This is called once we have the cpu_possible_map */
905void __init xen_setup_vcpu_info_placement(void) 905void xen_setup_vcpu_info_placement(void)
906{ 906{
907 int cpu; 907 int cpu;
908 908