aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@hp.com>2008-01-17 12:05:43 -0700
committerAlex Williamson <alex.williamson@hp.com>2008-01-17 12:05:43 -0700
commit5bdbe8cbbd5e60d491ac03ddd2f1af6c6ee77172 (patch)
tree818f3bfc3a47461caf886830e2ef600a2536c327
parent688b4b6745d1d9b882466d3a148faf02aa0b437d (diff)
downloadxen-5bdbe8cbbd5e60d491ac03ddd2f1af6c6ee77172.tar.gz
xen-5bdbe8cbbd5e60d491ac03ddd2f1af6c6ee77172.tar.bz2
xen-5bdbe8cbbd5e60d491ac03ddd2f1af6c6ee77172.zip
[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>
-rw-r--r--xen/arch/ia64/xen/domain.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/xen/arch/ia64/xen/domain.c b/xen/arch/ia64/xen/domain.c
index faf945cdb6..8a552db9cf 100644
--- a/xen/arch/ia64/xen/domain.c
+++ b/xen/arch/ia64/xen/domain.c
@@ -407,6 +407,7 @@ void relinquish_vcpu_resources(struct vcpu *v)
struct vcpu *alloc_vcpu_struct(void)
{
+ struct page_info *page;
struct vcpu *v;
struct thread_info *ti;
static int first_allocation = 1;
@@ -419,8 +420,10 @@ struct vcpu *alloc_vcpu_struct(void)
return idle_vcpu[0];
}
- if ((v = alloc_xenheap_pages(KERNEL_STACK_SIZE_ORDER)) == NULL)
+ page = alloc_domheap_pages(NULL, KERNEL_STACK_SIZE_ORDER, 0);
+ if (page == NULL)
return NULL;
+ v = page_to_virt(page);
memset(v, 0, sizeof(*v));
ti = alloc_thread_info(v);
@@ -435,7 +438,7 @@ struct vcpu *alloc_vcpu_struct(void)
void free_vcpu_struct(struct vcpu *v)
{
- free_xenheap_pages(v, KERNEL_STACK_SIZE_ORDER);
+ free_domheap_pages(virt_to_page(v), KERNEL_STACK_SIZE_ORDER);
}
int vcpu_initialise(struct vcpu *v)