ia64/xen-unstable

changeset 16772:64653720c9e4

[IA64] Allocate struct vcpu from domheap.

Now there's no constraint to allocate struct vcpu from xenheap.
So allocate it from domain heap.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Alex Williamson <alex.williamson@hp.com>
date Thu Jan 17 12:05:43 2008 -0700 (2008-01-17)
parents e8d933b33f4b
children ac296153ea64
files xen/arch/ia64/xen/domain.c
line diff
     1.1 --- a/xen/arch/ia64/xen/domain.c	Thu Jan 17 12:05:43 2008 -0700
     1.2 +++ b/xen/arch/ia64/xen/domain.c	Thu Jan 17 12:05:43 2008 -0700
     1.3 @@ -407,6 +407,7 @@ void relinquish_vcpu_resources(struct vc
     1.4  
     1.5  struct vcpu *alloc_vcpu_struct(void)
     1.6  {
     1.7 +	struct page_info *page;
     1.8  	struct vcpu *v;
     1.9  	struct thread_info *ti;
    1.10  	static int first_allocation = 1;
    1.11 @@ -419,8 +420,10 @@ struct vcpu *alloc_vcpu_struct(void)
    1.12  		return idle_vcpu[0];
    1.13  	}
    1.14  
    1.15 -	if ((v = alloc_xenheap_pages(KERNEL_STACK_SIZE_ORDER)) == NULL)
    1.16 +	page = alloc_domheap_pages(NULL, KERNEL_STACK_SIZE_ORDER, 0);
    1.17 +	if (page == NULL)
    1.18  		return NULL;
    1.19 +	v = page_to_virt(page);
    1.20  	memset(v, 0, sizeof(*v)); 
    1.21  
    1.22  	ti = alloc_thread_info(v);
    1.23 @@ -435,7 +438,7 @@ struct vcpu *alloc_vcpu_struct(void)
    1.24  
    1.25  void free_vcpu_struct(struct vcpu *v)
    1.26  {
    1.27 -	free_xenheap_pages(v, KERNEL_STACK_SIZE_ORDER);
    1.28 +	free_domheap_pages(virt_to_page(v), KERNEL_STACK_SIZE_ORDER);
    1.29  }
    1.30  
    1.31  int vcpu_initialise(struct vcpu *v)