# 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);
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
|