[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Add a headroom check to MMUEXT_REASSIGN_PAGE.
ChangeSet 1.1370, 2005/04/22 17:42:55+01:00, kaf24@xxxxxxxxxxxxxxxxxxxx Add a headroom check to MMUEXT_REASSIGN_PAGE. Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> mm.c | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff -Nru a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c --- a/xen/arch/x86/mm.c 2005-04-22 13:04:28 -04:00 +++ b/xen/arch/x86/mm.c 2005-04-22 13:04:28 -04:00 @@ -1686,11 +1686,19 @@ spin_lock(&d->page_alloc_lock); } - /* A domain shouldn't have PGC_allocated pages when it is dying. */ + /* + * Check that 'e' will accept the page and has reservation + * headroom. Also, a domain mustn't have PGC_allocated pages when + * it is dying. + */ + ASSERT(e->tot_pages <= e->max_pages); if ( unlikely(test_bit(DF_DYING, &e->d_flags)) || + unlikely(e->tot_pages == e->max_pages) || unlikely(IS_XEN_HEAP_FRAME(page)) ) { - MEM_LOG("Reassign page is Xen heap, or dest dom is dying."); + MEM_LOG("Transferee has no reservation headroom (%d,%d), or " + "page is in Xen heap (%p), or dom is dying (%d).\n", + e->tot_pages, e->max_pages, op.mfn, e->d_flags); okay = 0; goto reassign_fail; } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |