ia64/xen-unstable

changeset 4330:1fe76eb5830b

bitkeeper revision 1.1236.43.13 (42446124G6lMmGOZuWoCX4Jlr7Hj_w)

partial fix for save/migrate

signed-off-by: steven@xensource.com
author smh22@firebug.cl.cam.ac.uk
date Fri Mar 25 19:06:12 2005 +0000 (2005-03-25)
parents 9dd7bd4776a1
children 320b9cc5155c
files BitKeeper/etc/logging_ok linux-2.6.11-xen-sparse/drivers/xen/privcmd/privcmd.c
line diff
     1.1 --- a/BitKeeper/etc/logging_ok	Fri Mar 25 15:39:09 2005 +0000
     1.2 +++ b/BitKeeper/etc/logging_ok	Fri Mar 25 19:06:12 2005 +0000
     1.3 @@ -72,6 +72,7 @@ rneugeba@wyvis.research.intel-research.n
     1.4  sd386@font.cl.cam.ac.uk
     1.5  shand@spidean.research.intel-research.net
     1.6  smh22@boulderdash.cl.cam.ac.uk
     1.7 +smh22@firebug.cl.cam.ac.uk
     1.8  smh22@labyrinth.cl.cam.ac.uk
     1.9  smh22@tempest.cl.cam.ac.uk
    1.10  smh22@uridium.cl.cam.ac.uk
     2.1 --- a/linux-2.6.11-xen-sparse/drivers/xen/privcmd/privcmd.c	Fri Mar 25 15:39:09 2005 +0000
     2.2 +++ b/linux-2.6.11-xen-sparse/drivers/xen/privcmd/privcmd.c	Fri Mar 25 19:06:12 2005 +0000
     2.3 @@ -88,6 +88,8 @@ static int privcmd_ioctl(struct inode *i
     2.4          {
     2.5              int j, n = ((mmapcmd.num-i)>PRIVCMD_MMAP_SZ)?
     2.6                  PRIVCMD_MMAP_SZ:(mmapcmd.num-i);
     2.7 +
     2.8 +
     2.9              if ( copy_from_user(&msg, p, n*sizeof(privcmd_mmap_entry_t)) )
    2.10                  return -EFAULT;
    2.11       
    2.12 @@ -96,6 +98,7 @@ static int privcmd_ioctl(struct inode *i
    2.13                  struct vm_area_struct *vma = 
    2.14                      find_vma( current->mm, msg[j].va );
    2.15  
    2.16 +
    2.17                  if ( !vma )
    2.18                      return -EINVAL;
    2.19  
    2.20 @@ -151,6 +154,7 @@ static int privcmd_ioctl(struct inode *i
    2.21          addr = m.addr;
    2.22          for ( i = 0; i < m.num; i++, addr += PAGE_SIZE, p++ )
    2.23          {
    2.24 +
    2.25              if ( get_user(mfn, p) )
    2.26                  return -EFAULT;
    2.27  
    2.28 @@ -166,10 +170,12 @@ static int privcmd_ioctl(struct inode *i
    2.29  
    2.30              v = w;
    2.31          }
    2.32 +
    2.33          ret = 0;
    2.34          break;
    2.35  
    2.36      batch_err:
    2.37 +        printk(KERN_ALERT "XXX SMH: ERROR IN MMAPBATCH\n"); 
    2.38          printk("batch_err ret=%d vma=%p addr=%lx num=%d arr=%p %lx-%lx\n", 
    2.39                 ret, vma, m.addr, m.num, m.arr, vma->vm_start, vma->vm_end);
    2.40          break;
    2.41 @@ -183,7 +189,7 @@ static int privcmd_ioctl(struct inode *i
    2.42          pgd_t *pgd = pgd_offset_k(m2pv);
    2.43          pud_t *pud = pud_offset(pgd, m2pv);
    2.44          pmd_t *pmd = pmd_offset(pud, m2pv);
    2.45 -        unsigned long m2p_start_mfn = pfn_to_mfn(pmd_val(*pmd) >> PAGE_SHIFT);
    2.46 +        unsigned long m2p_start_mfn = (*(unsigned long *)pmd) >> PAGE_SHIFT; 
    2.47          ret = put_user(m2p_start_mfn, (unsigned long *)data) ? -EFAULT: 0;
    2.48      }
    2.49      break;