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-changelog

[Xen-changelog] Implement save/restore (not migration) for unstable.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Implement save/restore (not migration) for unstable.
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Tue, 19 Apr 2005 15:16:46 +0000
Delivery-date: Wed, 20 Apr 2005 09:03:41 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Implement save/restore (not migration) for unstable., BitKeeper Bot <=