[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [IA64] Allocate struct vcpu from domheap.



# HG changeset patch
# User Alex Williamson <alex.williamson@xxxxxx>
# Date 1200596743 25200
# Node ID 64653720c9e41bb575af1d56906b68e85be5462f
# Parent  e8d933b33f4bc99dbd0c99cb94650a2be58bdb7a
[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@xxxxxxxxxxxxx>
---
 xen/arch/ia64/xen/domain.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff -r e8d933b33f4b -r 64653720c9e4 xen/arch/ia64/xen/domain.c
--- a/xen/arch/ia64/xen/domain.c        Thu Jan 17 12:05:43 2008 -0700
+++ b/xen/arch/ia64/xen/domain.c        Thu Jan 17 12:05:43 2008 -0700
@@ -407,6 +407,7 @@ void relinquish_vcpu_resources(struct vc
 
 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)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.