[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 09 of 10] Advertise address of grant table shared pages in suspend record



# HG changeset patch
# User Brendan Cully <brendan@xxxxxxxxx>
# Date 1166166342 28800
# Node ID 9182ff9b291d7fef7e05c6899922e88c54d0e419
# Parent  a5274ebef731512d9681c7b81667b509f2e5346a
Advertise address of grant table shared pages in suspend record.

A checkpointed guest keeps its mappings to the shared_info page and
grant table shared pages. To let xc_linux_save distinguish between
these legitimate mappings and page table races, export the addresses
in the suspend record. This patch puts the grant table shared page and
lengths into the start_info pt_base and nr_pt_frames fields, which are
otherwise unused after boot.

Signed-off-by: Brendan Cully <brendan@xxxxxxxxx>

diff -r a5274ebef731 -r 9182ff9b291d 
linux-2.6-xen-sparse/drivers/xen/core/gnttab.c
--- a/linux-2.6-xen-sparse/drivers/xen/core/gnttab.c    Thu Dec 14 23:05:42 
2006 -0800
+++ b/linux-2.6-xen-sparse/drivers/xen/core/gnttab.c    Thu Dec 14 23:05:42 
2006 -0800
@@ -426,6 +426,12 @@ int gnttab_suspend(void)
        return 0;
 }
 
+int gnttab_checkpoint(void)
+{
+       xen_start_info->pt_base = (unsigned long)shared;
+       xen_start_info->nr_pt_frames = NR_GRANT_FRAMES;
+}
+
 #else /* !CONFIG_XEN */
 
 #include <platform-pci.h>
diff -r a5274ebef731 -r 9182ff9b291d 
linux-2.6-xen-sparse/drivers/xen/core/machine_reboot.c
--- a/linux-2.6-xen-sparse/drivers/xen/core/machine_reboot.c    Thu Dec 14 
23:05:42 2006 -0800
+++ b/linux-2.6-xen-sparse/drivers/xen/core/machine_reboot.c    Thu Dec 14 
23:05:42 2006 -0800
@@ -229,6 +229,8 @@ int __xen_checkpoint(void)
 
        pre_checkpoint();
 
+       gnttab_checkpoint();
+
        /*
         * We'll stop somewhere inside this hypercall. When it returns,
         * we'll start resuming after the restore.
diff -r a5274ebef731 -r 9182ff9b291d linux-2.6-xen-sparse/include/xen/gnttab.h
--- a/linux-2.6-xen-sparse/include/xen/gnttab.h Thu Dec 14 23:05:42 2006 -0800
+++ b/linux-2.6-xen-sparse/include/xen/gnttab.h Thu Dec 14 23:05:42 2006 -0800
@@ -116,6 +116,7 @@ void gnttab_grant_foreign_transfer_ref(g
 #endif
 
 int gnttab_suspend(void);
+int gnttab_checkpoint(void);
 int gnttab_resume(void);
 
 static inline void

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.