[IA64] Fix dom0vp_expose_p2m
authorawilliam@xenbuild2.aw <awilliam@xenbuild2.aw>
Thu, 4 Jan 2007 23:22:31 +0000 (16:22 -0700)
committerawilliam@xenbuild2.aw <awilliam@xenbuild2.aw>
Thu, 4 Jan 2007 23:22:31 +0000 (16:22 -0700)
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>
xen/arch/ia64/xen/mm.c

index 1effbf91605e4c1925330eeeb5b7d86ac69ada8c..b560abf5f8e0f439eeed82244b954054e111f7ca 100644 (file)
@@ -1439,10 +1439,9 @@ dom0vp_expose_p2m(struct domain* d,
     for (i = 0; i < expose_num_pfn / PTRS_PER_PTE + 1; i++) {
         assign_pte = lookup_noalloc_domain_pte(d, (assign_start_gpfn + i) <<
                                                PAGE_SHIFT);
-        BUG_ON(assign_pte == NULL);
-        if (pte_present(*assign_pte)) {
+        if (assign_pte == NULL || pte_present(*assign_pte))
             continue;
-        }
+
         if (expose_p2m_page(d, (assign_start_gpfn + i) << PAGE_SHIFT,
                             p2m_pte_zero_page) < 0) {
             gdprintk(XENLOG_INFO, "%s failed to assign zero-pte page\n", __func__);