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-changelog

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

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] Allocate struct vcpu from domheap.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 23 Jan 2008 01:10:59 -0800
Delivery-date: Wed, 23 Jan 2008 01:14:42 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [IA64] Allocate struct vcpu from domheap., Xen patchbot-unstable <=