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-devel

[Xen-devel] [PATCH 2/6] xenpaging: prevent page-out of first 16MB

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 2/6] xenpaging: prevent page-out of first 16MB
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Sun, 16 Jan 2011 17:32:31 +0100
Delivery-date: Sun, 16 Jan 2011 08:35:26 -0800
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1295195550; l=930; s=domk; d=aepfle.de; h=References:Subject:To:From:Date:X-RZG-CLASS-ID:X-RZG-AUTH; bh=Px3LsztpNFJZ6sQttrNMQJngZic=; b=onSpoxcGwDb5TVrB2MsDIo++B9iiQPKrj13hBOmnlXmBvjs/LlXwIv8hKUJD1w/wBA/ XCtVgPrfFOuW8L+6x21p0lBlwM09qbKV2vPf1xeJseNs0g0SrjycE41ShUjfrYNHP5s6B A363htxod2OkHl88AboVeOL0mo6tRh7PHv4=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20110116163229.044047464@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: quilt/0.48-4.4
This is more a workaround than a bugfix:
Don't page out first 16MB of memory.
When the BIOS does its initialization process and xenpaging removes
pages, crashes will occour due to lack of support of xenpaging.

A more complet change to prevent the early crashes is to use the newly
added wait_queue feature in the gfn_to_mfn() variants.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>

---

 tools/xenpaging/policy_default.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- xen-unstable.hg-4.1.22746.orig/tools/xenpaging/policy_default.c
+++ xen-unstable.hg-4.1.22746/tools/xenpaging/policy_default.c
@@ -73,8 +73,9 @@ int policy_init(xenpaging_t *paging)
     for ( i = 0; i < mru_size; i++ )
         mru[i] = INVALID_MFN;
 
-    /* Don't page out page 0 */
-    set_bit(0, bitmap);
+    /* Don't page out first 16MB */
+    for ( i = 0; i < ((16*1024*1024)/4096); i++ )
+        set_bit(i, bitmap);
 
  out:
     return rc;


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel