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

[Xen-devel] The store and restore?

On restore, we need to create a new event channel and update the shared
page information for the store, AFAICT.

I'm not quite sure how this *should* be done.  Thoughts welcome, patch
below.

Rusty.

diff -r 71883f17a80f tools/libxc/xc.h
--- a/tools/libxc/xc.h  Fri Jul 15 20:31:09 2005
+++ b/tools/libxc/xc.h  Sun Jul 17 07:54:28 2005
@@ -250,7 +250,8 @@
  * @parm nr_pfns the number of pages
  * @return 0 on success, -1 on failure
  */
-int xc_linux_restore(int xc_handle, int io_fd, u32 dom, unsigned long nr_pfns);
+int xc_linux_restore(int xc_handle, int io_fd, u32 dom, unsigned long nr_pfns,
+                    unsigned int store_evtchn, unsigned long *store_mfn);
 
 int xc_linux_build(int xc_handle,
                    u32 domid,
diff -r 71883f17a80f tools/libxc/xc_linux_restore.c
--- a/tools/libxc/xc_linux_restore.c    Fri Jul 15 20:31:09 2005
+++ b/tools/libxc/xc_linux_restore.c    Sun Jul 17 07:54:28 2005
@@ -48,7 +48,8 @@
     return r;
 }
 
-int xc_linux_restore(int xc_handle, int io_fd, u32 dom, unsigned long nr_pfns)
+int xc_linux_restore(int xc_handle, int io_fd, u32 dom, unsigned long nr_pfns,
+                    unsigned int store_evtchn, unsigned long *store_mfn)
 {
     dom0_op_t op;
     int rc = 1, i, n, k;
@@ -468,6 +469,10 @@
     p_srec->resume_info.nr_pages    = nr_pfns;
     p_srec->resume_info.shared_info = shared_info_frame << PAGE_SHIFT;
     p_srec->resume_info.flags       = 0;
+    p_srec->resume_info.store_evtchn = store_evtchn;
+    /* FIXME: How to calculate this properly? */
+    *store_mfn = pfn_to_mfn_table[(p_srec->resume_info.store_page-0xc0100000)
+                                  >> PAGE_SHIFT];
     munmap(p_srec, PAGE_SIZE);
 
     /* Uncanonicalise each GDT frame number. */

-- 
A bad analogy is like a leaky screwdriver -- Richard Braakman


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

<Prev in Thread] Current Thread [Next in Thread>