WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Add a headroom check to MMUEXT_REASSIGN_PAGE.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Add a headroom check to MMUEXT_REASSIGN_PAGE.
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Fri, 22 Apr 2005 16:42:55 +0000
Delivery-date: Fri, 22 Apr 2005 17:04:09 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Add a headroom check to MMUEXT_REASSIGN_PAGE., BitKeeper Bot <=