ia64/xen-unstable

changeset 13121:4ef56c7cce12

[IA64] Fix dom0vp_expose_p2m

dom0vp_expose_p2m() assumes that memory is populated non-sparsely.
However with dom0 builder modification this assumption is not always true.
Make dom0vp_expose_p2m() allow sparsely populated memory.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author awilliam@xenbuild2.aw
date Thu Jan 04 16:22:31 2007 -0700 (2007-01-04)
parents b1c00767c6ae
children 0f571adbd700
files xen/arch/ia64/xen/mm.c
line diff
     1.1 --- a/xen/arch/ia64/xen/mm.c	Thu Jan 04 16:17:37 2007 -0700
     1.2 +++ b/xen/arch/ia64/xen/mm.c	Thu Jan 04 16:22:31 2007 -0700
     1.3 @@ -1439,10 +1439,9 @@ dom0vp_expose_p2m(struct domain* d,
     1.4      for (i = 0; i < expose_num_pfn / PTRS_PER_PTE + 1; i++) {
     1.5          assign_pte = lookup_noalloc_domain_pte(d, (assign_start_gpfn + i) <<
     1.6                                                 PAGE_SHIFT);
     1.7 -        BUG_ON(assign_pte == NULL);
     1.8 -        if (pte_present(*assign_pte)) {
     1.9 +        if (assign_pte == NULL || pte_present(*assign_pte))
    1.10              continue;
    1.11 -        }
    1.12 +
    1.13          if (expose_p2m_page(d, (assign_start_gpfn + i) << PAGE_SHIFT,
    1.14                              p2m_pte_zero_page) < 0) {
    1.15              gdprintk(XENLOG_INFO, "%s failed to assign zero-pte page\n", __func__);