Even if the error propagates up through the p2m ops to the caller,
it'll look like ENOMEM, which won't be obviously a shadow-pool problem.
Warn on the console, once per domain.
Reported-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Tim Deegan <tim@xen.org>
Acked-by: Jan Beulich <jbeulich@suse.com>
page_set_owner(pg, d);
pg->count_info |= 1;
}
+ else if ( !d->arch.paging.p2m_alloc_failed )
+ {
+ d->arch.paging.p2m_alloc_failed = 1;
+ dprintk(XENLOG_ERR, "d%i failed to allocate from HAP pool",
+ d->domain_id);
+ }
paging_unlock(d);
return pg;
if ( d->arch.paging.shadow.total_pages
< shadow_min_acceptable_pages(d) + 1 )
{
+ if ( !d->arch.paging.p2m_alloc_failed )
+ {
+ d->arch.paging.p2m_alloc_failed = 1;
+ dprintk(XENLOG_ERR, "d%i failed to allocate from shadow pool",
+ d->domain_id);
+ }
paging_unlock(d);
return NULL;
}
-
+
shadow_prealloc(d, SH_type_p2m_table, 1);
pg = mfn_to_page(shadow_alloc(d, SH_type_p2m_table, 0));
d->arch.paging.shadow.p2m_pages++;
* (used by p2m and log-dirty code for their tries) */
struct page_info * (*alloc_page)(struct domain *d);
void (*free_page)(struct domain *d, struct page_info *pg);
+ /* Has that pool ever run out of memory? */
+ bool_t p2m_alloc_failed;
};
struct paging_vcpu {