WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

[Xen-ia64-devel] [PATCH 11/12] allocate vcpu from domheap

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] [PATCH 11/12] allocate vcpu from domheap
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Thu, 20 Dec 2007 16:37:05 +0900
Cc: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Delivery-date: Wed, 19 Dec 2007 23:38:07 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
# HG changeset patch
# User yamahata@xxxxxxxxxxxxx
# Date 1197960252 -32400
# Node ID 144d7d5b73551d5451f278f8f02647c85ffb51c3
# Parent  e532cad65b1cf039ef3ce7859c0fd6c4ef6fd7f4
allocate struct vcpu from domheap.
Now there's no constraint to allocate struct vcpu from xenheap.
So allocate it from domain heap.
PATCHNAME: allocate_vcpu_from_domain_heap

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>

diff -r e532cad65b1c -r 144d7d5b7355 xen/arch/ia64/xen/domain.c
--- a/xen/arch/ia64/xen/domain.c        Thu Dec 20 14:53:49 2007 +0900
+++ b/xen/arch/ia64/xen/domain.c        Tue Dec 18 15:44:12 2007 +0900
@@ -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)

Attachment: 16643_144d7d5b7355_allocate_vcpu_from_domain_heap.patch
Description: Text Data

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-ia64-devel] [PATCH 11/12] allocate vcpu from domheap, Isaku Yamahata <=