From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: [PATCH 2/6] xenpaging: prevent page-out of first 16MB Date: Sun, 16 Jan 2011 17:32:31 +0100 Message-ID: <20110116163229.790586912@aepfle.de> References: <20110116163229.044047464@aepfle.de> Return-path: Content-Disposition: inline; filename=xen-unstable.xenpaging.realmode_gfn_0x80.patch List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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 --- 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;