ia64/xen-unstable

changeset 10874:1633293e20f8

[IA64] DOM0_GETPAGEFRAMEINFO & DOM0_GETPAGEFRAMEINFO2 removed

DOM0_GETPAGEFRAMEINFO and DOM0_GETPAGEFRAMEINFO2 are never used.
Removed.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
author awilliam@xenbuild.aw
date Mon Jul 31 13:15:55 2006 -0600 (2006-07-31)
parents 86ff604d8e20
children 00dd5eb7adc1
files xen/arch/ia64/xen/dom0_ops.c
line diff
     1.1 --- a/xen/arch/ia64/xen/dom0_ops.c	Mon Jul 31 13:12:30 2006 -0600
     1.2 +++ b/xen/arch/ia64/xen/dom0_ops.c	Mon Jul 31 13:15:55 2006 -0600
     1.3 @@ -34,129 +34,6 @@ long arch_do_dom0_op(dom0_op_t *op, XEN_
     1.4  
     1.5      switch ( op->cmd )
     1.6      {
     1.7 -    case DOM0_GETPAGEFRAMEINFO:
     1.8 -    {
     1.9 -        struct page_info *page;
    1.10 -        unsigned long mfn = op->u.getpageframeinfo.gmfn;
    1.11 -        domid_t dom = op->u.getpageframeinfo.domain;
    1.12 -        struct domain *d;
    1.13 -
    1.14 -        ret = -EINVAL;
    1.15 -
    1.16 -        if ( unlikely(!mfn_valid(mfn)) || 
    1.17 -             unlikely((d = find_domain_by_id(dom)) == NULL) )
    1.18 -            break;
    1.19 -
    1.20 -        page = mfn_to_page(mfn);
    1.21 -
    1.22 -        if ( likely(get_page(page, d)) )
    1.23 -        {
    1.24 -            ret = 0;
    1.25 -
    1.26 -            op->u.getpageframeinfo.type = NOTAB;
    1.27 -
    1.28 -            if ( (page->u.inuse.type_info & PGT_count_mask) != 0 )
    1.29 -            {
    1.30 -                switch ( page->u.inuse.type_info & PGT_type_mask )
    1.31 -                {
    1.32 -                default:
    1.33 -                    panic("No such page type\n");
    1.34 -                    break;
    1.35 -                }
    1.36 -            }
    1.37 -            
    1.38 -            put_page(page);
    1.39 -        }
    1.40 -
    1.41 -        put_domain(d);
    1.42 -
    1.43 -        copy_to_guest(u_dom0_op, op, 1);
    1.44 -    }
    1.45 -    break;
    1.46 -
    1.47 -    case DOM0_GETPAGEFRAMEINFO2:
    1.48 -    {
    1.49 -#define GPF2_BATCH 128
    1.50 -        int n,j;
    1.51 -        int num = op->u.getpageframeinfo2.num;
    1.52 -        domid_t dom = op->u.getpageframeinfo2.domain;
    1.53 -        struct domain *d;
    1.54 -        unsigned long *l_arr;
    1.55 -        ret = -ESRCH;
    1.56 -
    1.57 -        if ( unlikely((d = find_domain_by_id(dom)) == NULL) )
    1.58 -            break;
    1.59 -
    1.60 -        if ( unlikely(num > 1024) )
    1.61 -        {
    1.62 -            ret = -E2BIG;
    1.63 -            break;
    1.64 -        }
    1.65 -
    1.66 -        l_arr = (unsigned long *)alloc_xenheap_page();
    1.67 - 
    1.68 -        ret = 0;
    1.69 -        for( n = 0; n < num; )
    1.70 -        {
    1.71 -            int k = ((num-n)>GPF2_BATCH)?GPF2_BATCH:(num-n);
    1.72 -
    1.73 -            if ( copy_from_guest_offset(l_arr, op->u.getpageframeinfo2.array,
    1.74 -                                        n, k) )
    1.75 -            {
    1.76 -                ret = -EINVAL;
    1.77 -                break;
    1.78 -            }
    1.79 -     
    1.80 -            for( j = 0; j < k; j++ )
    1.81 -            {      
    1.82 -                struct page_info *page;
    1.83 -                unsigned long mfn = l_arr[j];
    1.84 -
    1.85 -                if ( unlikely(mfn >= max_page) )
    1.86 -                    goto e2_err;
    1.87 -
    1.88 -                page = mfn_to_page(mfn);
    1.89 -  
    1.90 -                if ( likely(get_page(page, d)) )
    1.91 -                {
    1.92 -                    unsigned long type = 0;
    1.93 -
    1.94 -                    switch( page->u.inuse.type_info & PGT_type_mask )
    1.95 -                    {
    1.96 -                    default:
    1.97 -                        panic("No such page type\n");
    1.98 -                        break;
    1.99 -                    }
   1.100 -
   1.101 -                    if ( page->u.inuse.type_info & PGT_pinned )
   1.102 -                        type |= LPINTAB;
   1.103 -                    l_arr[j] |= type;
   1.104 -                    put_page(page);
   1.105 -                }
   1.106 -                else
   1.107 -                {
   1.108 -                e2_err:
   1.109 -                    l_arr[j] |= XTAB;
   1.110 -                }
   1.111 -
   1.112 -            }
   1.113 -
   1.114 -            if ( copy_to_guest_offset(op->u.getpageframeinfo2.array,
   1.115 -                                      n, l_arr, k) )
   1.116 -            {
   1.117 -                ret = -EINVAL;
   1.118 -                break;
   1.119 -            }
   1.120 -
   1.121 -            n += j;
   1.122 -        }
   1.123 -
   1.124 -        free_xenheap_page((void *) l_arr);
   1.125 -
   1.126 -        put_domain(d);
   1.127 -    }
   1.128 -    break;
   1.129 -
   1.130      case DOM0_GETMEMLIST:
   1.131      {
   1.132          unsigned long i;