ia64/xen-unstable

changeset 8998:21f633fd90e4

[IA64] SMP_HOST: Alloc vhpt from domheap

It's more reasonable to alloc vhpt from domheap, instead of xenheap.

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
author awilliam@xenbuild.aw
date Mon Feb 27 13:16:16 2006 -0700 (2006-02-27)
parents 6c43118bdba8
children a4a4a28a1686
files xen/arch/ia64/xen/vhpt.c
line diff
     1.1 --- a/xen/arch/ia64/xen/vhpt.c	Fri Feb 24 15:41:08 2006 -0700
     1.2 +++ b/xen/arch/ia64/xen/vhpt.c	Mon Feb 27 13:16:16 2006 -0700
     1.3 @@ -121,7 +121,8 @@ void vhpt_multiple_insert(unsigned long 
     1.4  
     1.5  void vhpt_init(void)
     1.6  {
     1.7 -	unsigned long vhpt_total_size, vhpt_alignment, vhpt_imva;
     1.8 +	unsigned long vhpt_total_size, vhpt_alignment;
     1.9 +	struct page_info *page;
    1.10  #if !VHPT_ENABLED
    1.11  	return;
    1.12  #endif
    1.13 @@ -134,12 +135,13 @@ void vhpt_init(void)
    1.14  	 * from domain heap when each domain is created. Assume xen buddy
    1.15  	 * allocator can provide natural aligned page by order?
    1.16  	 */
    1.17 -	vhpt_imva = alloc_xenheap_pages(VHPT_SIZE_LOG2 - PAGE_SHIFT);
    1.18 -	if (!vhpt_imva) {
    1.19 +//	vhpt_imva = alloc_xenheap_pages(VHPT_SIZE_LOG2 - PAGE_SHIFT);
    1.20 +	page = alloc_domheap_pages(NULL, VHPT_SIZE_LOG2 - PAGE_SHIFT, 0);
    1.21 +	if (!page) {
    1.22  		printf("vhpt_init: can't allocate VHPT!\n");
    1.23  		while(1);
    1.24  	}
    1.25 -	vhpt_paddr = __pa(vhpt_imva);
    1.26 +	vhpt_paddr = page_to_maddr(page);
    1.27  	vhpt_pend = vhpt_paddr + vhpt_total_size - 1;
    1.28  	printf("vhpt_init: vhpt paddr=%p, end=%p\n",vhpt_paddr,vhpt_pend);
    1.29  	vhpt_pte = pte_val(pfn_pte(vhpt_paddr >> PAGE_SHIFT, PAGE_KERNEL));