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

[Xen-changelog] partial fix for save/migrate



ChangeSet 1.1373, 2005/03/25 19:06:12+00:00, smh22@xxxxxxxxxxxxxxxxxxxx

        partial fix for save/migrate 
        
        signed-off-by: steven@xxxxxxxxxxxxx



 privcmd.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletion(-)


diff -Nru a/linux-2.6.11-xen-sparse/drivers/xen/privcmd/privcmd.c 
b/linux-2.6.11-xen-sparse/drivers/xen/privcmd/privcmd.c
--- a/linux-2.6.11-xen-sparse/drivers/xen/privcmd/privcmd.c     2005-03-25 
18:03:13 -05:00
+++ b/linux-2.6.11-xen-sparse/drivers/xen/privcmd/privcmd.c     2005-03-25 
18:03:13 -05:00
@@ -88,6 +88,8 @@
         {
             int j, n = ((mmapcmd.num-i)>PRIVCMD_MMAP_SZ)?
                 PRIVCMD_MMAP_SZ:(mmapcmd.num-i);
+
+
             if ( copy_from_user(&msg, p, n*sizeof(privcmd_mmap_entry_t)) )
                 return -EFAULT;
      
@@ -96,6 +98,7 @@
                 struct vm_area_struct *vma = 
                     find_vma( current->mm, msg[j].va );
 
+
                 if ( !vma )
                     return -EINVAL;
 
@@ -151,6 +154,7 @@
         addr = m.addr;
         for ( i = 0; i < m.num; i++, addr += PAGE_SIZE, p++ )
         {
+
             if ( get_user(mfn, p) )
                 return -EFAULT;
 
@@ -166,10 +170,12 @@
 
             v = w;
         }
+
         ret = 0;
         break;
 
     batch_err:
+        printk(KERN_ALERT "XXX SMH: ERROR IN MMAPBATCH\n"); 
         printk("batch_err ret=%d vma=%p addr=%lx num=%d arr=%p %lx-%lx\n", 
                ret, vma, m.addr, m.num, m.arr, vma->vm_start, vma->vm_end);
         break;
@@ -183,7 +189,7 @@
         pgd_t *pgd = pgd_offset_k(m2pv);
         pud_t *pud = pud_offset(pgd, m2pv);
         pmd_t *pmd = pmd_offset(pud, m2pv);
-        unsigned long m2p_start_mfn = pfn_to_mfn(pmd_val(*pmd) >> PAGE_SHIFT);
+        unsigned long m2p_start_mfn = (*(unsigned long *)pmd) >> PAGE_SHIFT; 
         ret = put_user(m2p_start_mfn, (unsigned long *)data) ? -EFAULT: 0;
     }
     break;


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-changelog


 


Rackspace

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