ia64/xen-unstable

changeset 3684:2e9105d1c5a6

bitkeeper revision 1.1159.223.73 (42061207JyX53LmlrclgfiWwVqnF7w)

Avoid large stack frame in arch_dom0_op by dynamically allocating space
for getmeminfo batch.
Signed-off-by: keir.fraser@cl.cam.ac.uk
author kaf24@viper.(none)
date Sun Feb 06 12:48:07 2005 +0000 (2005-02-06)
parents 6bc867ecf95b
children f4eb69e2ad9e ef95f070a233
files xen/arch/x86/dom0_ops.c
line diff
     1.1 --- a/xen/arch/x86/dom0_ops.c	Sun Feb 06 12:09:52 2005 +0000
     1.2 +++ b/xen/arch/x86/dom0_ops.c	Sun Feb 06 12:48:07 2005 +0000
     1.3 @@ -216,7 +216,7 @@ long arch_do_dom0_op(dom0_op_t *op, dom0
     1.4          domid_t dom = op->u.getpageframeinfo2.domain;
     1.5          unsigned long *s_ptr = (unsigned long*) op->u.getpageframeinfo2.array;
     1.6          struct domain *d;
     1.7 -        unsigned long l_arr[GPF2_BATCH];
     1.8 +        unsigned long *l_arr;
     1.9          ret = -ESRCH;
    1.10  
    1.11          if ( unlikely((d = find_domain_by_id(dom)) == NULL) )
    1.12 @@ -227,6 +227,8 @@ long arch_do_dom0_op(dom0_op_t *op, dom0
    1.13              ret = -E2BIG;
    1.14              break;
    1.15          }
    1.16 +
    1.17 +        l_arr = (unsigned long *)alloc_xenheap_page();
    1.18   
    1.19          ret = 0;
    1.20          for( n = 0; n < num; )
    1.21 @@ -291,6 +293,8 @@ long arch_do_dom0_op(dom0_op_t *op, dom0
    1.22              n += j;
    1.23          }
    1.24  
    1.25 +        free_xenheap_page((unsigned long)l_arr);
    1.26 +
    1.27          put_domain(d);
    1.28      }
    1.29      break;