[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Implement save/restore (not migration) for unstable.
ChangeSet 1.1323.1.1, 2005/04/19 16:16:46+01:00, iap10@xxxxxxxxxxxxxxxxxxxxx Implement save/restore (not migration) for unstable. Signed-off-by: ian.pratt@xxxxxxxxxxxx gnttab.c | 18 +++++++++++++++++- reboot.c | 6 ++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/kernel/gnttab.c b/linux-2.6.11-xen-sparse/arch/xen/kernel/gnttab.c --- a/linux-2.6.11-xen-sparse/arch/xen/kernel/gnttab.c 2005-04-20 05:03:58 -04:00 +++ b/linux-2.6.11-xen-sparse/arch/xen/kernel/gnttab.c 2005-04-20 05:03:58 -04:00 @@ -319,7 +319,8 @@ return -ENOSYS; } -static int __init gnttab_init(void) + +int gnttab_resume(void) { gnttab_setup_table_t setup; unsigned long frames[NR_GRANT_FRAMES]; @@ -341,6 +342,21 @@ for ( i = 0; i < NR_GRANT_ENTRIES; i++ ) gnttab_free_list[i] = i + 1; + + return 0; +} + +int gnttab_suspend(void) +{ + int i; + for ( i = 0; i < NR_GRANT_FRAMES; i++ ) + clear_fixmap(FIX_GNTTAB_END - i); + return 0; +} + +static int __init gnttab_init(void) +{ + BUG_ON(gnttab_resume()); /* * /proc/xen/grant : used by libxc to access grant tables diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c b/linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c --- a/linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c 2005-04-20 05:03:58 -04:00 +++ b/linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c 2005-04-20 05:03:58 -04:00 @@ -84,6 +84,9 @@ #define usbif_resume() do{}while(0) #endif + extern int gnttab_suspend(void); + extern int gnttab_resume(void); + extern void time_suspend(void); extern void time_resume(void); extern unsigned long max_pfn; @@ -107,6 +110,8 @@ irq_suspend(); + gnttab_suspend(); + HYPERVISOR_shared_info = (shared_info_t *)empty_zero_page; clear_fixmap(FIX_SHARED_INFO); @@ -138,6 +143,7 @@ HYPERVISOR_shared_info->arch.pfn_to_mfn_frame_list = virt_to_machine(pfn_to_mfn_frame_list) >> PAGE_SHIFT; + gnttab_resume(); irq_resume(); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |