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 4/16] domheap: allocate PV privregs pages from d

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] [PATCH 4/16] domheap: allocate PV privregs pages from domain heap
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Mon, 7 Jan 2008 16:52:33 +0900
Cc: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Delivery-date: Sun, 06 Jan 2008 23:55:22 -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 1198240235 -32400
# Node ID cd6247c99298e5487098d45bc77325882d584284
# Parent  7f1e2deaf58ced913fc50b23cb561f88c7d89eaf
allocate PV privregs pages from domain heap
PATCHNAME: allocate_pv_privregs_domheap

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

diff -r 7f1e2deaf58c -r cd6247c99298 xen/arch/ia64/xen/domain.c
--- a/xen/arch/ia64/xen/domain.c        Fri Dec 21 20:41:59 2007 +0900
+++ b/xen/arch/ia64/xen/domain.c        Fri Dec 21 21:30:35 2007 +0900
@@ -400,7 +400,7 @@ void relinquish_vcpu_resources(struct vc
        if (HAS_PERVCPU_VHPT(v->domain))
                pervcpu_vhpt_free(v);
        if (v->arch.privregs != NULL) {
-               free_xenheap_pages(v->arch.privregs,
+               free_domheap_pages(virt_to_page(v->arch.privregs),
                                   get_order_from_shift(XMAPPEDREGS_SHIFT));
                v->arch.privregs = NULL;
        }
@@ -501,6 +501,7 @@ int vcpu_late_initialise(struct vcpu *v)
 int vcpu_late_initialise(struct vcpu *v)
 {
        struct domain *d = v->domain;
+       struct page_info *page;
        int rc, order;
 
        if (HAS_PERVCPU_VHPT(d)) {
@@ -511,7 +512,11 @@ int vcpu_late_initialise(struct vcpu *v)
 
        /* Create privregs page. */
        order = get_order_from_shift(XMAPPEDREGS_SHIFT);
-       v->arch.privregs = alloc_xenheap_pages(order);
+       page = alloc_domheap_pages(NULL, order, 0);
+       if (page == NULL)
+               return -ENOMEM;
+       
+       v->arch.privregs = page_to_virt(page);
        BUG_ON(v->arch.privregs == NULL);
        memset(v->arch.privregs, 0, 1 << XMAPPEDREGS_SHIFT);
        vcpu_share_privregs_with_guest(v);

Attachment: 16698_cd6247c99298_allocate_pv_privregs_domheap.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 4/16] domheap: allocate PV privregs pages from domain heap, Isaku Yamahata <=